Get rid of checks for Qt3 types

These types don't exist anymore, so it's pointless to check for them.

Also remove the dead types from uic's type-to-header map.

Change-Id: I7f0af5c337859f3da1c103157a802bbe5372df9f
Reviewed-by: Jędrzej Nowacki <jedrzej.nowacki@nokia.com>
Reviewed-by: Jonas Gastal <jgastal@profusion.mobi>
Reviewed-by: João Abecasis <joao.abecasis@nokia.com>
Reviewed-by: Olivier Goffart <ogoffart@woboq.com>
Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
Reviewed-by: Lars Knoll <lars.knoll@nokia.com>
This commit is contained in:
Kent Hansen 2012-01-27 14:04:12 +01:00 committed by Qt by Nokia
parent 889092504e
commit 36c057787f
5 changed files with 6 additions and 40 deletions

View File

@ -80,15 +80,6 @@ uint qvariant_nameToType(const char* name)
if (!name)
return 0;
if (strcmp(name, "QCString") == 0)
return QMetaType::QByteArray;
if (strcmp(name, "Q_LLONG") == 0)
return QMetaType::LongLong;
if (strcmp(name, "Q_ULLONG") == 0)
return QMetaType::ULongLong;
if (strcmp(name, "QIconSet") == 0)
return QMetaType::QIcon;
uint tp = QMetaType::type(name);
return tp < QMetaType::User ? tp : 0;
}

View File

@ -1608,14 +1608,6 @@ QVariant::Type QVariant::nameToType(const char *name)
{
if (!name || !*name)
return Invalid;
if (strcmp(name, "Q3CString") == 0)
return ByteArray;
if (strcmp(name, "Q_LLONG") == 0)
return LongLong;
if (strcmp(name, "Q_ULLONG") == 0)
return ULongLong;
if (strcmp(name, "QIconSet") == 0)
return Icon;
if (strcmp(name, "UserType") == 0)
return UserType;

View File

@ -54,15 +54,6 @@ uint qvariant_nameToType(const char* name)
if (!name)
return 0;
if (strcmp(name, "QCString") == 0)
return QMetaType::QByteArray;
if (strcmp(name, "Q_LLONG") == 0)
return QMetaType::LongLong;
if (strcmp(name, "Q_ULLONG") == 0)
return QMetaType::ULongLong;
if (strcmp(name, "QIconSet") == 0)
return QMetaType::QIcon;
uint tp = QMetaType::type(name);
return tp < QMetaType::User ? tp : 0;
}

View File

@ -33,20 +33,8 @@ QT_CLASS_LIB(QIntegerForSize, QtCore, qglobal.h)
QT_CLASS_LIB(QIntegerForSize, QtCore, qglobal.h)
QT_CLASS_LIB(QIntegerForSize, QtCore, qglobal.h)
QT_CLASS_LIB(QNoImplicitBoolCast, QtCore, qglobal.h)
QT_CLASS_LIB(Q_INT8, QtCore, qglobal.h)
QT_CLASS_LIB(Q_UINT8, QtCore, qglobal.h)
QT_CLASS_LIB(Q_INT16, QtCore, qglobal.h)
QT_CLASS_LIB(Q_UINT16, QtCore, qglobal.h)
QT_CLASS_LIB(Q_INT32, QtCore, qglobal.h)
QT_CLASS_LIB(Q_UINT32, QtCore, qglobal.h)
QT_CLASS_LIB(Q_INT64, QtCore, qglobal.h)
QT_CLASS_LIB(Q_UINT64, QtCore, qglobal.h)
QT_CLASS_LIB(Q_LLONG, QtCore, qglobal.h)
QT_CLASS_LIB(Q_ULLONG, QtCore, qglobal.h)
QT_CLASS_LIB(Q_LONG, QtCore, qglobal.h)
QT_CLASS_LIB(Q_ULONG, QtCore, qglobal.h)
QT_CLASS_LIB(Q_LONG, QtCore, qglobal.h)
QT_CLASS_LIB(Q_ULONG, QtCore, qglobal.h)
QT_CLASS_LIB(QSysInfo, QtCore, qglobal.h)
QT_CLASS_LIB(QtMsgHandler, QtCore, qglobal.h)
QT_CLASS_LIB(QGlobalStatic, QtCore, qglobal.h)
@ -670,7 +658,6 @@ QT_CLASS_LIB(QGraphicsView, QtWidgets, qgraphicsview.h)
QT_CLASS_LIB(QGraphicsWidget, QtWidgets, qgraphicswidget.h)
QT_CLASS_LIB(QBitmap, QtGui, qbitmap.h)
QT_CLASS_LIB(QIcon, QtWidgets, qicon.h)
QT_CLASS_LIB(QIconSet, QtWidgets, qicon.h)
QT_CLASS_LIB(QIconEngine, QtWidgets, qiconengine.h)
QT_CLASS_LIB(QIconEngineV2, QtWidgets, qiconengine.h)
QT_CLASS_LIB(QIconEngineFactoryInterface, QtWidgets, qiconengineplugin.h)

View File

@ -1961,7 +1961,12 @@ void tst_QVariant::typeToName()
QVERIFY( QVariant::nameToType( 0 ) == QVariant::Invalid );
QVERIFY( QVariant::nameToType( "" ) == QVariant::Invalid );
QVERIFY( QVariant::nameToType( "foo" ) == QVariant::Invalid );
QCOMPARE(QVariant::nameToType("QIconSet"), QVariant::Icon);
// We don't support these old (Qt3) types anymore.
QCOMPARE(QVariant::nameToType("QIconSet"), QVariant::Invalid);
QCOMPARE(QVariant::nameToType("Q3CString"), QVariant::Invalid);
QCOMPARE(QVariant::nameToType("Q_LLONG"), QVariant::Invalid);
QCOMPARE(QVariant::nameToType("Q_ULLONG"), QVariant::Invalid);
}
void tst_QVariant::streamInvalidVariant()