Fix the logic in void return type check
authorKent Hansen <kent.hansen@nokia.com>
Wed, 23 May 2012 21:09:15 +0000 (23:09 +0200)
committerQt by Nokia <qt-info@nokia.com>
Thu, 24 May 2012 09:22:14 +0000 (11:22 +0200)
Since the introduction of QMetaType::UnknownType, QMetaType::Void no
longer has value 0. Hence, the optimization in this code (avoiding
return type construction/passing/conversion when the return type is
void) was "lost".

Change-Id: I32313f8287c4f0e01fee3c2b4ba722f31457242c
Reviewed-by: Jędrzej Nowacki <jedrzej.nowacki@nokia.com>
src/qml/qml/v8/qv8qobjectwrapper.cpp

index f540ce1..d7e55e2 100644 (file)
@@ -1555,7 +1555,7 @@ static v8::Handle<v8::Value> CallMethod(QObject *object, int index, int returnTy
 
         return args[0].toValue(engine);
 
-    } else if (returnType != 0) {
+    } else if (returnType != QMetaType::Void) {
         
         CallArgument arg;
         arg.initAsType(returnType);