diff options
author | Jędrzej Nowacki <jedrzej.nowacki@nokia.com> | 2012-03-05 14:45:34 +0100 |
---|---|---|
committer | Qt by Nokia <qt-info@nokia.com> | 2012-03-13 12:58:48 +0100 |
commit | 83f11e33745180e9370d484cbcedd0bac020c9dd (patch) | |
tree | 83fc4cefbdb9af685ac172c499e3af938fc4e070 /src/qml/qml/qqmlboundsignal.cpp | |
parent | 7a5651b4f9fef530e1dc5516899c7f481f4480ef (diff) |
Crash fix after QMetaType change.
QMetaType::UnknownType was added so we can distinguish between "void"
and an unregistered type.
Change-Id: If8cee21b3f84bf129343dc457d10ab31a9bfc8b8
Reviewed-by: Kent Hansen <kent.hansen@nokia.com>
Diffstat (limited to 'src/qml/qml/qqmlboundsignal.cpp')
-rw-r--r-- | src/qml/qml/qqmlboundsignal.cpp | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/src/qml/qml/qqmlboundsignal.cpp b/src/qml/qml/qqmlboundsignal.cpp index 02f4941236..aa130d9493 100644 --- a/src/qml/qml/qqmlboundsignal.cpp +++ b/src/qml/qml/qqmlboundsignal.cpp @@ -226,14 +226,14 @@ QQmlBoundSignalParameters::QQmlBoundSignalParameters(const QMetaMethod &method, continue; } - QVariant::Type t = (QVariant::Type)QMetaType::type(type.constData()); + int t = QMetaType::type(type.constData()); if (QQmlMetaType::isQObject(t)) { types[ii] = QMetaType::QObjectStar; QMetaPropertyBuilder prop = mob.addProperty(name, "QObject*"); prop.setWritable(false); } else { QByteArray propType = type; - if (t >= QVariant::UserType || t == QVariant::Invalid) { + if (t >= int(QVariant::UserType) || t == QMetaType::UnknownType || t == QMetaType::Void) { QByteArray scope; QByteArray name; int scopeIdx = propType.lastIndexOf("::"); |