summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorJędrzej Nowacki <jedrzej.nowacki@nokia.com>2012-04-03 15:12:47 +0200
committerQt by Nokia <qt-info@nokia.com>2012-04-18 12:16:09 +0200
commitab0bcd0792af76a938f8665c9c1082d9b9eb3c3a (patch)
tree56d501f4c4eeb95c907849b605a512cc6d0ddb25
parent6f0065944dc3c638553519bc7d4883f2cca6e04f (diff)
Remove redundant checks in QVariant.
QVariant and QMetaType have aligned type naming implementation. Change-Id: I9eaae1045c492c148e3e9d23f4e04d48272f7ec2 Reviewed-by: Stephen Kelly <stephen.kelly@kdab.com>
-rw-r--r--src/corelib/kernel/qvariant.cpp6
1 files changed, 0 insertions, 6 deletions
diff --git a/src/corelib/kernel/qvariant.cpp b/src/corelib/kernel/qvariant.cpp
index 7b0fab887b..179a33ca6e 100644
--- a/src/corelib/kernel/qvariant.cpp
+++ b/src/corelib/kernel/qvariant.cpp
@@ -1582,9 +1582,6 @@ void QVariant::clear()
*/
const char *QVariant::typeToName(int typeId)
{
- if (typeId == Invalid)
- return 0;
-
return QMetaType::typeName(typeId);
}
@@ -1598,9 +1595,6 @@ const char *QVariant::typeToName(int typeId)
*/
QVariant::Type QVariant::nameToType(const char *name)
{
- if (!name || !*name)
- return Invalid;
-
int metaType = QMetaType::type(name);
return metaType <= int(UserType) ? QVariant::Type(metaType) : UserType;
}