summaryrefslogtreecommitdiffstats
path: root/src/tools
diff options
context:
space:
mode:
authorKent Hansen <kent.hansen@nokia.com>2012-01-06 13:43:40 +0100
committerQt by Nokia <qt-info@nokia.com>2012-01-25 08:46:40 +0100
commit00c8984b4e48b2a7eadfee6c3cd0cbb19f586118 (patch)
treea4f3f1c958d43b737ef669578c35789134f34341 /src/tools
parent79ebb1621e6cdb68a4ad107c8ac80eadb9c60366 (diff)
moc: Use QMetaType::QVariant as the type for QVariant
QMetaType::QVariant has existed as a proper type for almost two years, but the qvariant_nameToType function was written in 2006. Using QMetaType::QVariant means QVariant can be treated just like any other type. We can get rid of those hacky checks for LastType, and the remaining checks become more readable. The fact that QMetaProperty::{type,userType}() returned LastType (0xffffffff) for QVariants was never documented (LastType itself is internal). But there are other Qt modules that assume so. I'll fix the ones I know about (qtdeclarative, qtscript, activeqt). Change-Id: I799b9079bb8bbb1fe76c132525440b30415cbac5 Reviewed-by: Bradley T. Hughes <bradley.hughes@nokia.com> Reviewed-by: Jędrzej Nowacki <jedrzej.nowacki@nokia.com> Reviewed-by: Olivier Goffart <ogoffart@woboq.com>
Diffstat (limited to 'src/tools')
-rw-r--r--src/tools/moc/generator.cpp2
1 files changed, 0 insertions, 2 deletions
diff --git a/src/tools/moc/generator.cpp b/src/tools/moc/generator.cpp
index 605e751df4..dc902ece33 100644
--- a/src/tools/moc/generator.cpp
+++ b/src/tools/moc/generator.cpp
@@ -54,8 +54,6 @@ uint qvariant_nameToType(const char* name)
if (!name)
return 0;
- if (strcmp(name, "QVariant") == 0)
- return 0xffffffff;
if (strcmp(name, "QCString") == 0)
return QMetaType::QByteArray;
if (strcmp(name, "Q_LLONG") == 0)