MCPcopy Create free account
hub / github.com/KDAB/GammaRay / convertArguments

Method convertArguments

core/multisignalmapper.cpp:47–68  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

45 }
46
47 static QVector<QVariant> convertArguments(QObject *sender, int signalIndex, void **args)
48 {
49 Q_ASSERT(sender);
50 Q_ASSERT(signalIndex >= 0);
51
52 const QMetaMethod signal = sender->metaObject()->method(signalIndex);
53 Q_ASSERT(signal.methodType() == QMetaMethod::Signal);
54
55 QVector<QVariant> v;
56 const QList<QByteArray> paramTypes = signal.parameterTypes();
57 for (int i = 0; i < paramTypes.size(); ++i) {
58 int type = QMetaType::fromName(paramTypes[i]).id();
59 if (type == QMetaType::Void || type == QMetaType::UnknownType) {
60 qWarning() << Q_FUNC_INFO << "unknown metatype for signal argument type"
61 << paramTypes[i];
62 continue;
63 }
64 v.push_back(QVariant(QMetaType(type), args[i + 1]));
65 }
66
67 return v;
68 }
69
70private:
71 MultiSignalMapper *q;

Callers

nothing calls this directly

Calls 4

QVariantClass · 0.70
metaObjectMethod · 0.45
sizeMethod · 0.45
idMethod · 0.45

Tested by

no test coverage detected