diff options
Diffstat (limited to 'src/network/kernel/qhostinfo.cpp')
-rw-r--r-- | src/network/kernel/qhostinfo.cpp | 8 |
1 files changed, 5 insertions, 3 deletions
diff --git a/src/network/kernel/qhostinfo.cpp b/src/network/kernel/qhostinfo.cpp index db414a52f2..dff87217d4 100644 --- a/src/network/kernel/qhostinfo.cpp +++ b/src/network/kernel/qhostinfo.cpp @@ -160,10 +160,12 @@ void QHostInfoResult::postResultsReady(const QHostInfo &info) Q_CHECK_PTR(metaCallEvent); void **args = metaCallEvent->args(); int *types = metaCallEvent->types(); - types[0] = QMetaType::type("void"); - types[1] = QMetaType::type("QHostInfo"); + auto voidType = QMetaType::fromType<void>(); + auto hostInfoType = QMetaType::fromType<QHostInfo>(); + types[0] = voidType.id(); + types[1] = hostInfoType.id(); args[0] = nullptr; - args[1] = QMetaType::create(types[1], &info); + args[1] = hostInfoType.create(&info); Q_CHECK_PTR(args[1]); qApp->postEvent(result, metaCallEvent); } |