Remove redundant checks in QVariant.

QVariant and QMetaType have aligned type naming implementation.

Change-Id: I9eaae1045c492c148e3e9d23f4e04d48272f7ec2
Reviewed-by: Stephen Kelly <stephen.kelly@kdab.com>
bb10
Jędrzej Nowacki 2012-04-03 15:12:47 +02:00 committed by Qt by Nokia
parent 6f0065944d
commit ab0bcd0792
1 changed files with 0 additions and 6 deletions

View File

@ -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;
}