Core: Remove declaration of built-in and automatic metatypes.
These types are either built-in or 'automatically declared' and so don't need to be explicitly declared as metatypes. Change-Id: I54523eb854619917123d8816d3cd6c3a1f5b4c55 Reviewed-by: David Faure <david.faure@kdab.com>
This commit is contained in:
parent
fc032aa713
commit
79f1afc23c
@ -774,7 +774,6 @@ void tst_QPropertyAnimation::interpolated()
|
||||
}
|
||||
}
|
||||
|
||||
Q_DECLARE_METATYPE(QVariant)
|
||||
|
||||
void tst_QPropertyAnimation::setStartEndValues_data()
|
||||
{
|
||||
|
@ -50,9 +50,6 @@
|
||||
|
||||
#include "../../../qtest-config.h"
|
||||
|
||||
Q_DECLARE_METATYPE(QBitArray)
|
||||
Q_DECLARE_METATYPE(qint64)
|
||||
|
||||
class tst_QDataStream : public QObject
|
||||
{
|
||||
Q_OBJECT
|
||||
|
@ -61,8 +61,6 @@ private slots:
|
||||
void setLocale();
|
||||
};
|
||||
|
||||
Q_DECLARE_METATYPE(QLocale)
|
||||
Q_DECLARE_METATYPE(qlonglong)
|
||||
|
||||
void tst_QResourceEngine::initTestCase()
|
||||
{
|
||||
|
@ -758,7 +758,6 @@ void tst_QSettings::testErrorHandling()
|
||||
#endif // !Q_OS_WIN
|
||||
}
|
||||
|
||||
Q_DECLARE_METATYPE(QVariant)
|
||||
Q_DECLARE_METATYPE(QSettings::Status)
|
||||
|
||||
#ifdef QT_BUILD_INTERNAL
|
||||
|
@ -57,9 +57,6 @@
|
||||
|
||||
#include "../../../network-settings.h"
|
||||
|
||||
Q_DECLARE_METATYPE(qlonglong)
|
||||
Q_DECLARE_METATYPE(qulonglong)
|
||||
Q_DECLARE_METATYPE(QList<int>)
|
||||
|
||||
QT_BEGIN_NAMESPACE
|
||||
template<> struct QMetaTypeId<QIODevice::OpenModeFlag>
|
||||
|
@ -123,8 +123,6 @@ void tst_QAbstractProxyModel::qabstractproxymodel()
|
||||
model.submit();
|
||||
}
|
||||
|
||||
Q_DECLARE_METATYPE(QVariant)
|
||||
Q_DECLARE_METATYPE(QModelIndex)
|
||||
void tst_QAbstractProxyModel::data_data()
|
||||
{
|
||||
QTest::addColumn<QModelIndex>("proxyIndex");
|
||||
|
@ -114,10 +114,6 @@ typedef QList<int> IntList;
|
||||
typedef QPair<int, int> IntPair;
|
||||
typedef QList<IntPair> PairList;
|
||||
|
||||
Q_DECLARE_METATYPE(PairList)
|
||||
Q_DECLARE_METATYPE(QModelIndex)
|
||||
Q_DECLARE_METATYPE(QModelIndexList)
|
||||
Q_DECLARE_METATYPE(IntList)
|
||||
Q_DECLARE_METATYPE(QItemSelection)
|
||||
|
||||
class QStreamHelper: public QAbstractItemModel
|
||||
@ -1683,9 +1679,6 @@ void tst_QItemSelectionModel::removeColumns()
|
||||
typedef QList<IntList> IntListList;
|
||||
typedef QPair<IntPair, IntPair> IntPairPair;
|
||||
typedef QList<IntPairPair> IntPairPairList;
|
||||
Q_DECLARE_METATYPE(IntListList)
|
||||
Q_DECLARE_METATYPE(IntPairPair)
|
||||
Q_DECLARE_METATYPE(IntPairPairList)
|
||||
|
||||
void tst_QItemSelectionModel::modelLayoutChanged_data()
|
||||
{
|
||||
|
@ -54,11 +54,6 @@ typedef QList<int> IntList;
|
||||
typedef QPair<int, int> IntPair;
|
||||
typedef QList<IntPair> IntPairList;
|
||||
|
||||
Q_DECLARE_METATYPE(IntList)
|
||||
Q_DECLARE_METATYPE(IntPair)
|
||||
Q_DECLARE_METATYPE(IntPairList)
|
||||
Q_DECLARE_METATYPE(QModelIndex)
|
||||
|
||||
class tst_QSortFilterProxyModel : public QObject
|
||||
{
|
||||
Q_OBJECT
|
||||
|
@ -572,8 +572,6 @@ void tst_QEventLoop::processEventsExcludeTimers()
|
||||
timerReceiver.gotTimerEvent = -1;
|
||||
}
|
||||
|
||||
Q_DECLARE_METATYPE(QThread*)
|
||||
|
||||
namespace DeliverInDefinedOrder {
|
||||
enum { NbThread = 3, NbObject = 500, NbEventQueue = 5, NbEvent = 50 };
|
||||
|
||||
|
@ -396,7 +396,6 @@ void tst_QAlgorithms::sortedList()
|
||||
QCOMPARE(list.at(5), 8);
|
||||
}
|
||||
|
||||
Q_DECLARE_METATYPE(QList<int>)
|
||||
|
||||
void tst_QAlgorithms::test_qLowerBound_data()
|
||||
{
|
||||
@ -615,7 +614,6 @@ void tst_QAlgorithms::stableSortTest()
|
||||
}
|
||||
}
|
||||
|
||||
Q_DECLARE_METATYPE(QVector<int>)
|
||||
|
||||
void tst_QAlgorithms::stableSortCorrectnessTest_data()
|
||||
{
|
||||
|
@ -99,8 +99,6 @@ private slots:
|
||||
void resize();
|
||||
};
|
||||
|
||||
Q_DECLARE_METATYPE(QBitArray)
|
||||
|
||||
void tst_QBitArray::size_data()
|
||||
{
|
||||
//create the testtable instance and define the elements
|
||||
|
@ -1234,7 +1234,6 @@ void tst_QByteArray::toInt()
|
||||
QCOMPARE( number, expectednumber );
|
||||
}
|
||||
|
||||
Q_DECLARE_METATYPE(qulonglong)
|
||||
void tst_QByteArray::toULong_data()
|
||||
{
|
||||
QTest::addColumn<QByteArray>("str");
|
||||
|
@ -109,7 +109,6 @@ private:
|
||||
QDate invalidDate() const { return QDate(); }
|
||||
};
|
||||
|
||||
Q_DECLARE_METATYPE(QDate)
|
||||
Q_DECLARE_METATYPE(Qt::DateFormat)
|
||||
|
||||
void tst_QDate::isNull_data()
|
||||
|
@ -147,9 +147,6 @@ private:
|
||||
QTime invalidTime() const { return QTime(-1, -1, -1); }
|
||||
};
|
||||
|
||||
Q_DECLARE_METATYPE(QDateTime)
|
||||
Q_DECLARE_METATYPE(QDate)
|
||||
Q_DECLARE_METATYPE(QTime)
|
||||
Q_DECLARE_METATYPE(Qt::TimeSpec)
|
||||
Q_DECLARE_METATYPE(Qt::DateFormat)
|
||||
|
||||
|
@ -158,8 +158,6 @@ void tst_QEasingCurve::propertyDefaults()
|
||||
|
||||
typedef QList<int> IntList;
|
||||
typedef QList<qreal> RealList;
|
||||
Q_DECLARE_METATYPE(IntList)
|
||||
Q_DECLARE_METATYPE(RealList)
|
||||
|
||||
void tst_QEasingCurve::valueForProgress_data()
|
||||
{
|
||||
|
@ -1546,9 +1546,6 @@ void tst_QList::constSharedNullComplex() const
|
||||
QCOMPARE(liveCount, Complex::getLiveCount());
|
||||
}
|
||||
|
||||
Q_DECLARE_METATYPE(QList<int>);
|
||||
Q_DECLARE_METATYPE(QList<Complex>);
|
||||
|
||||
template <class T>
|
||||
void generateSetSharableData()
|
||||
{
|
||||
|
@ -74,8 +74,6 @@ extern "C" DWORD GetThreadLocale(void) {
|
||||
# include <stdlib.h>
|
||||
#endif
|
||||
|
||||
Q_DECLARE_METATYPE(qlonglong)
|
||||
Q_DECLARE_METATYPE(QDate)
|
||||
Q_DECLARE_METATYPE(QLocale::FormatType)
|
||||
|
||||
class tst_QLocale : public QObject
|
||||
@ -957,7 +955,6 @@ void tst_QLocale::formatDate()
|
||||
QCOMPARE(l.toString(date, format), result);
|
||||
}
|
||||
|
||||
Q_DECLARE_METATYPE(QTime)
|
||||
|
||||
void tst_QLocale::formatTime_data()
|
||||
{
|
||||
|
@ -44,10 +44,6 @@
|
||||
#include <limits.h>
|
||||
#include <qdebug.h>
|
||||
|
||||
Q_DECLARE_METATYPE(QRectF)
|
||||
Q_DECLARE_METATYPE(QPointF)
|
||||
Q_DECLARE_METATYPE(QRect)
|
||||
Q_DECLARE_METATYPE(QPoint)
|
||||
|
||||
class tst_QRect : public QObject
|
||||
{
|
||||
|
@ -71,7 +71,6 @@ struct Match
|
||||
};
|
||||
|
||||
Q_DECLARE_METATYPE(Match)
|
||||
Q_DECLARE_METATYPE(QList<Match>)
|
||||
|
||||
bool operator==(const QRegularExpressionMatch &rem, const Match &m)
|
||||
{
|
||||
|
@ -42,7 +42,6 @@
|
||||
#include <QtTest/QtTest>
|
||||
#include <qsize.h>
|
||||
|
||||
Q_DECLARE_METATYPE(QSize)
|
||||
|
||||
class tst_QSize : public QObject
|
||||
{
|
||||
|
@ -42,7 +42,6 @@
|
||||
#include <QtTest/QtTest>
|
||||
#include <qsize.h>
|
||||
|
||||
Q_DECLARE_METATYPE(QSizeF)
|
||||
|
||||
class tst_QSizeF : public QObject
|
||||
{
|
||||
|
@ -67,7 +67,6 @@
|
||||
#include <locale.h>
|
||||
#include <qhash.h>
|
||||
|
||||
Q_DECLARE_METATYPE(qlonglong)
|
||||
|
||||
#define CREATE_REF(string) \
|
||||
const QString padded = QString::fromLatin1(" %1 ").arg(string); \
|
||||
@ -316,9 +315,6 @@ QString verifyZeroTermination(const QString &str)
|
||||
|
||||
typedef QList<int> IntList;
|
||||
|
||||
Q_DECLARE_METATYPE(QList<QVariant>)
|
||||
Q_DECLARE_METATYPE(IntList)
|
||||
|
||||
// This next bit is needed for the NAN and INF in string -> number conversion tests
|
||||
#include <float.h>
|
||||
#include <limits.h>
|
||||
|
@ -46,7 +46,6 @@
|
||||
#include <qlocale.h>
|
||||
#include <locale.h>
|
||||
|
||||
Q_DECLARE_METATYPE(qlonglong)
|
||||
|
||||
class tst_QStringRef : public QObject
|
||||
{
|
||||
@ -84,9 +83,6 @@ static QStringRef emptyRef()
|
||||
|
||||
typedef QList<int> IntList;
|
||||
|
||||
Q_DECLARE_METATYPE(QList<QVariant>)
|
||||
Q_DECLARE_METATYPE(IntList)
|
||||
|
||||
// This next bit is needed for the NAN and INF in string -> number conversion tests
|
||||
#include <float.h>
|
||||
#include <limits.h>
|
||||
|
@ -78,7 +78,6 @@ private slots:
|
||||
void thaiLineBreak();
|
||||
};
|
||||
|
||||
Q_DECLARE_METATYPE(QList<int>)
|
||||
|
||||
QT_BEGIN_NAMESPACE
|
||||
namespace QTest {
|
||||
|
@ -80,7 +80,6 @@ private:
|
||||
QTime invalidTime() { return QTime(-1, -1, -1); }
|
||||
};
|
||||
|
||||
Q_DECLARE_METATYPE(QTime)
|
||||
Q_DECLARE_METATYPE(Qt::DateFormat)
|
||||
|
||||
void tst_QTime::addSecs_data()
|
||||
|
@ -296,7 +296,6 @@ private:
|
||||
template<typename T> void detach() const;
|
||||
};
|
||||
|
||||
Q_DECLARE_METATYPE(QVector<int>);
|
||||
|
||||
template<typename T> struct SimpleValue
|
||||
{
|
||||
|
Loading…
Reference in New Issue
Block a user