summaryrefslogtreecommitdiffstats
path: root/src
diff options
context:
space:
mode:
authorJędrzej Nowacki <jedrzej.nowacki@nokia.com>2012-04-23 17:08:10 +0200
committerQt by Nokia <qt-info@nokia.com>2012-04-24 10:18:17 +0200
commit951f97722792fee9601425120f0b64408ec18a4a (patch)
treea1d1428ea22fb98330bed520e09bd1b6fef67b45 /src
parentad916301325629ce65992a14d65807154324b4cd (diff)
Fix warnings in autotests.
In Qt 5 QVariant can not be constructed for "void" type. Change-Id: Ic58ec9a17c93ec0f3e587da8b820e289699f67d7 Reviewed-by: Friedemann Kleint <Friedemann.Kleint@nokia.com>
Diffstat (limited to 'src')
-rw-r--r--src/declarative/qml/qdeclarativeobjectscriptclass.cpp4
1 files changed, 4 insertions, 0 deletions
diff --git a/src/declarative/qml/qdeclarativeobjectscriptclass.cpp b/src/declarative/qml/qdeclarativeobjectscriptclass.cpp
index 5fbcd368..2e0f9f95 100644
--- a/src/declarative/qml/qdeclarativeobjectscriptclass.cpp
+++ b/src/declarative/qml/qdeclarativeobjectscriptclass.cpp
@@ -762,6 +762,10 @@ void MetaCallArgument::initAsType(int callType, QDeclarativeEngine *e)
} else if (callType == qMetaTypeId<QList<QObject *> >()) {
type = callType;
qlistPtr = new (&allocData) QList<QObject *>();
+ } else if (callType == QMetaType::Void) {
+ // In Qt4 QMetaType::Void and QMetaType::UnknownType were both equals to 0 so QtQuick1
+ // doesn't always recognize the difference
+ return;
} else {
type = -1;
qvariantPtr = new (&allocData) QVariant(callType, (void *)0);