diff options
Diffstat (limited to 'src/qml/qml/qqmlvme.cpp')
-rw-r--r-- | src/qml/qml/qqmlvme.cpp | 9 |
1 files changed, 6 insertions, 3 deletions
diff --git a/src/qml/qml/qqmlvme.cpp b/src/qml/qml/qqmlvme.cpp index 2b66e00bad..9ef9ca96ef 100644 --- a/src/qml/qml/qqmlvme.cpp +++ b/src/qml/qml/qqmlvme.cpp @@ -690,11 +690,14 @@ QObject *QQmlVME::run(QList<QQmlError> *errors, if (prop.type() & QQmlProperty::SignalProperty) { QMetaMethod method = QQmlMetaType::defaultMethod(assign); - if (method.signature() == 0) + if (!method.isValid()) VME_EXCEPTION(tr("Cannot assign object type %1 with no default method").arg(QString::fromLatin1(assign->metaObject()->className())), instr.line); - if (!QMetaObject::checkConnectArgs(prop.method().signature(), method.signature())) - VME_EXCEPTION(tr("Cannot connect mismatched signal/slot %1 %vs. %2").arg(QString::fromLatin1(method.signature())).arg(QString::fromLatin1(prop.method().signature())), instr.line); + if (!QMetaObject::checkConnectArgs(prop.method(), method)) { + VME_EXCEPTION(tr("Cannot connect mismatched signal/slot %1 %vs. %2") + .arg(QString::fromLatin1(method.methodSignature().constData())) + .arg(QString::fromLatin1(prop.method().methodSignature().constData())), instr.line); + } QQmlPropertyPrivate::connect(target, prop.index(), assign, method.methodIndex()); |