summaryrefslogtreecommitdiffstats
path: root/tests
diff options
context:
space:
mode:
authorMarc Mutz <marc.mutz@kdab.com>2012-07-20 11:02:31 +0200
committerQt by Nokia <qt-info@nokia.com>2012-07-25 13:33:05 +0200
commit5fd8dd19ea28e2bd9cc8ce88321a401206a88f89 (patch)
tree2fc3748fd9ca85521c23da139428c69324f63e43 /tests
parent790aca0ea1bbd33a8ff29c83c0ab0bd968304f03 (diff)
QtWidgets: use nullary version of qRegisterMetaType<T>("T")
Using qRegisterMetaType<T>() has the advantage that multiple calls during a program run are much more efficient, since an inlined atomic is used to store the result. It also ensures that Q_DECLARE_METATYPE(T) has been used, whereas qRegisterMetaType<T>("T") will happily register anything. Had to add Q_DECLARE_METATYPE to QFileInfo, for QList<QPair<QString,QFileInfo>> of QFileSystemModel to work with the partial specialisations of Q_DECLARE_METATYPE for QList, QPair. In order to synchronize this change with other modules that did their own Q_DECLARE_METATYPE(QFileInfo), a sync macro is defined that can be tested in other modules, and will later be removed again. Change-Id: I3004664e07e64cd885d5a03a57ff4e4379804aec Reviewed-by: Stephen Kelly <stephen.kelly@kdab.com>
Diffstat (limited to 'tests')
-rw-r--r--tests/auto/widgets/itemviews/qfileiconprovider/tst_qfileiconprovider.cpp1
1 files changed, 0 insertions, 1 deletions
diff --git a/tests/auto/widgets/itemviews/qfileiconprovider/tst_qfileiconprovider.cpp b/tests/auto/widgets/itemviews/qfileiconprovider/tst_qfileiconprovider.cpp
index f01b3679b4..d3dd29fa38 100644
--- a/tests/auto/widgets/itemviews/qfileiconprovider/tst_qfileiconprovider.cpp
+++ b/tests/auto/widgets/itemviews/qfileiconprovider/tst_qfileiconprovider.cpp
@@ -130,7 +130,6 @@ void tst_QFileIconProvider::iconType()
QVERIFY(!provider.icon(type).isNull());
}
-Q_DECLARE_METATYPE(QFileInfo)
void tst_QFileIconProvider::iconInfo_data()
{
QTest::addColumn<QFileInfo>("info");