diff options
author | Jędrzej Nowacki <jedrzej.nowacki@nokia.com> | 2012-02-13 16:26:35 +0100 |
---|---|---|
committer | Qt by Nokia <qt-info@nokia.com> | 2012-03-02 12:57:29 +0100 |
commit | 362bde8e8eef41fc6a338ed8fbe6cbf7e9996019 (patch) | |
tree | 96f93a2b19acaba947d13e936f9f6b3cba12d2ff /src/dbus/qdbusmetatype.cpp | |
parent | 2b70a7d25c3e73d02d6d14075790668dcfc16e64 (diff) |
Introduce QMetaType::UnknownType.
QMetaType::Void was ambiguous, it was pointing to a valid type (void)
and in the same time it was signaling errors in QMetaType. There was
no clean way to check if returned type was valid void or some
unregistered type.
This feature will be used by new QMetaObject revision which will
store type ids instead of type names. So it will be easy to
distinguish between:
void mySlot();
MyUnregisteredType mySlot();
Change-Id: I73ff097f75585a95e12df74d50c6f3141153e771
Reviewed-by: Kent Hansen <kent.hansen@nokia.com>
Reviewed-by: Olivier Goffart <ogoffart@woboq.com>
Diffstat (limited to 'src/dbus/qdbusmetatype.cpp')
-rw-r--r-- | src/dbus/qdbusmetatype.cpp | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/src/dbus/qdbusmetatype.cpp b/src/dbus/qdbusmetatype.cpp index b0d640608a..7c8d8cf679 100644 --- a/src/dbus/qdbusmetatype.cpp +++ b/src/dbus/qdbusmetatype.cpp @@ -311,7 +311,7 @@ bool QDBusMetaType::demarshall(const QDBusArgument &arg, int id, void *data) int QDBusMetaType::signatureToType(const char *signature) { if (!signature) - return QVariant::Invalid; + return QMetaType::UnknownType; QDBusMetaTypeId::init(); switch (signature[0]) @@ -378,7 +378,7 @@ int QDBusMetaType::signatureToType(const char *signature) } // fall through default: - return QVariant::Invalid; + return QMetaType::UnknownType; } } |