mirror of
https://bitbucket.org/smil3y/katie.git
synced 2025-02-23 10:22:55 +00:00
remove redundant metatype registrations
among other things Signed-off-by: Ivailo Monev <xakepa10@gmail.com>
This commit is contained in:
parent
f492e59888
commit
e297f68e33
22 changed files with 18 additions and 260 deletions
|
@ -92,7 +92,6 @@ private:
|
|||
};
|
||||
|
||||
Q_DECLARE_METATYPE(QList<Qt::Key>)
|
||||
Q_DECLARE_METATYPE(QPoint)
|
||||
|
||||
void tst_QAbstractSlider::initTestCase()
|
||||
{
|
||||
|
|
|
@ -51,11 +51,7 @@ static QBitArray QStringToQBitArray(const QString &str)
|
|||
|
||||
class tst_QBitArray : public QObject
|
||||
{
|
||||
Q_OBJECT
|
||||
|
||||
public:
|
||||
tst_QBitArray();
|
||||
virtual ~tst_QBitArray();
|
||||
Q_OBJECT
|
||||
|
||||
private slots:
|
||||
void size_data();
|
||||
|
@ -89,17 +85,6 @@ private slots:
|
|||
void resize();
|
||||
};
|
||||
|
||||
Q_DECLARE_METATYPE(QBitArray)
|
||||
|
||||
tst_QBitArray::tst_QBitArray()
|
||||
{
|
||||
}
|
||||
|
||||
tst_QBitArray::~tst_QBitArray()
|
||||
{
|
||||
|
||||
}
|
||||
|
||||
void tst_QBitArray::size_data()
|
||||
{
|
||||
//create the testtable instance and define the elements
|
||||
|
|
|
@ -35,9 +35,6 @@ class tst_QBrush : public QObject
|
|||
{
|
||||
Q_OBJECT
|
||||
|
||||
public:
|
||||
tst_QBrush();
|
||||
|
||||
private slots:
|
||||
void operator_eq_eq();
|
||||
void operator_eq_eq_data();
|
||||
|
@ -61,12 +58,6 @@ private slots:
|
|||
void debug();
|
||||
};
|
||||
|
||||
Q_DECLARE_METATYPE(QBrush)
|
||||
|
||||
tst_QBrush::tst_QBrush()
|
||||
{
|
||||
}
|
||||
|
||||
void tst_QBrush::operator_eq_eq_data()
|
||||
{
|
||||
QTest::addColumn<QBrush>("brush1");
|
||||
|
|
|
@ -34,9 +34,6 @@ class tst_QColor : public QObject
|
|||
{
|
||||
Q_OBJECT
|
||||
|
||||
public:
|
||||
tst_QColor();
|
||||
|
||||
private slots:
|
||||
void getSetCheck();
|
||||
void isValid_data();
|
||||
|
@ -215,13 +212,6 @@ void tst_QColor::getSetCheck()
|
|||
QCOMPARE(obj1.rgb(), qRgb(0, 0, 0));
|
||||
}
|
||||
|
||||
Q_DECLARE_METATYPE(QColor)
|
||||
|
||||
|
||||
tst_QColor::tst_QColor()
|
||||
{
|
||||
}
|
||||
|
||||
void tst_QColor::isValid_data()
|
||||
{
|
||||
QTest::addColumn<QColor>("color");
|
||||
|
|
|
@ -800,8 +800,6 @@ void tst_QCssParser::invalidAtKeywords()
|
|||
QCOMPARE(rule.declarations.at(0).d->values.at(0).variant.toString(), QString("blue"));
|
||||
}
|
||||
|
||||
Q_DECLARE_METATYPE(QColor)
|
||||
|
||||
void tst_QCssParser::colorValue_data()
|
||||
{
|
||||
QTest::addColumn<QString>("css");
|
||||
|
|
|
@ -29,11 +29,8 @@
|
|||
|
||||
#define SVGFILE "tests2.svg"
|
||||
|
||||
Q_DECLARE_METATYPE(QBitArray)
|
||||
Q_DECLARE_METATYPE(qint64)
|
||||
|
||||
//TESTED_CLASS=
|
||||
//TESTED_FILES=
|
||||
// TESTED_CLASS=
|
||||
// TESTED_FILES=
|
||||
|
||||
class tst_QDataStream : public QObject
|
||||
{
|
||||
|
|
|
@ -29,15 +29,8 @@
|
|||
|
||||
class tst_QDate : public QObject
|
||||
{
|
||||
Q_OBJECT
|
||||
Q_OBJECT
|
||||
|
||||
public:
|
||||
tst_QDate();
|
||||
virtual ~tst_QDate();
|
||||
|
||||
public slots:
|
||||
void init();
|
||||
void cleanup();
|
||||
private slots:
|
||||
void toString();
|
||||
void isValid_data();
|
||||
|
@ -82,29 +75,6 @@ private slots:
|
|||
void roundtrip() const;
|
||||
};
|
||||
|
||||
Q_DECLARE_METATYPE(QDate)
|
||||
|
||||
tst_QDate::tst_QDate()
|
||||
{
|
||||
}
|
||||
|
||||
tst_QDate::~tst_QDate()
|
||||
{
|
||||
|
||||
}
|
||||
|
||||
void tst_QDate::init()
|
||||
{
|
||||
// This will be executed immediately before each test is run.
|
||||
// TODO: Add initialization code here.
|
||||
}
|
||||
|
||||
void tst_QDate::cleanup()
|
||||
{
|
||||
// This will be executed immediately after each test is run.
|
||||
// TODO: Add cleanup code here.
|
||||
}
|
||||
|
||||
void tst_QDate::isValid_data()
|
||||
{
|
||||
QTest::addColumn<int>("year");
|
||||
|
|
|
@ -36,13 +36,10 @@ class tst_QDateTime : public QObject
|
|||
|
||||
public:
|
||||
tst_QDateTime();
|
||||
virtual ~tst_QDateTime();
|
||||
|
||||
static QString str( int y, int month, int d, int h, int min, int s );
|
||||
static QDateTime dt( const QString& str );
|
||||
public slots:
|
||||
void init();
|
||||
void cleanup();
|
||||
|
||||
private slots:
|
||||
void ctor();
|
||||
void operator_eq();
|
||||
|
@ -123,11 +120,6 @@ private:
|
|||
QTime invalidTime() const { return QTime(-1, -1, -1); }
|
||||
};
|
||||
|
||||
Q_DECLARE_METATYPE(QDateTime)
|
||||
Q_DECLARE_METATYPE(QDate)
|
||||
Q_DECLARE_METATYPE(QTime)
|
||||
|
||||
|
||||
tst_QDateTime::tst_QDateTime()
|
||||
{
|
||||
uint x1 = QDateTime(QDate(1990, 1, 1), QTime()).toTime_t();
|
||||
|
@ -135,18 +127,6 @@ tst_QDateTime::tst_QDateTime()
|
|||
europeanTimeZone = (x1 == 631148400 && x2 == 644191200);
|
||||
}
|
||||
|
||||
tst_QDateTime::~tst_QDateTime()
|
||||
{
|
||||
}
|
||||
|
||||
void tst_QDateTime::init()
|
||||
{
|
||||
}
|
||||
|
||||
void tst_QDateTime::cleanup()
|
||||
{
|
||||
}
|
||||
|
||||
QString tst_QDateTime::str( int y, int month, int d, int h, int min, int s )
|
||||
{
|
||||
return QDateTime( QDate(y, month, d), QTime(h, min, s) ).toString( Qt::ISODate );
|
||||
|
|
|
@ -25,8 +25,6 @@
|
|||
#include <QtCore/QObject>
|
||||
#include <QtDBus/QtDBus>
|
||||
|
||||
Q_DECLARE_METATYPE(QVariantList)
|
||||
|
||||
class MyObject: public QObject
|
||||
{
|
||||
Q_OBJECT
|
||||
|
|
|
@ -32,10 +32,8 @@
|
|||
|
||||
#include "../../shared/util.h"
|
||||
|
||||
Q_DECLARE_METATYPE(QSize)
|
||||
|
||||
//TESTED_CLASS=
|
||||
//TESTED_FILES=
|
||||
// TESTED_CLASS=
|
||||
// TESTED_FILES=
|
||||
|
||||
class tst_QDialog : public QObject
|
||||
{
|
||||
|
|
|
@ -37,7 +37,6 @@ class tst_QListWidget : public QObject
|
|||
|
||||
public:
|
||||
tst_QListWidget();
|
||||
~tst_QListWidget();
|
||||
|
||||
enum ModelChanged {
|
||||
RowsAboutToBeInserted,
|
||||
|
@ -54,7 +53,6 @@ public slots:
|
|||
void initTestCase();
|
||||
void cleanupTestCase();
|
||||
void init();
|
||||
void cleanup();
|
||||
|
||||
private slots:
|
||||
void addItem();
|
||||
|
@ -147,13 +145,9 @@ private:
|
|||
|
||||
typedef QList<int> IntList;
|
||||
Q_DECLARE_METATYPE(IntList)
|
||||
Q_DECLARE_METATYPE(QVariantList)
|
||||
|
||||
tst_QListWidget::tst_QListWidget(): testWidget(0), rcParent(8), rcFirst(8,0), rcLast(8,0)
|
||||
{
|
||||
}
|
||||
|
||||
tst_QListWidget::~tst_QListWidget()
|
||||
tst_QListWidget::tst_QListWidget()
|
||||
: testWidget(0), rcParent(8), rcFirst(8,0), rcLast(8,0)
|
||||
{
|
||||
}
|
||||
|
||||
|
@ -208,10 +202,6 @@ void tst_QListWidget::checkDefaultValues()
|
|||
QCOMPARE(testWidget->count(), 0);
|
||||
}
|
||||
|
||||
void tst_QListWidget::cleanup()
|
||||
{
|
||||
}
|
||||
|
||||
void tst_QListWidget::populate()
|
||||
{
|
||||
addItem();
|
||||
|
|
|
@ -37,8 +37,6 @@
|
|||
|
||||
QT_USE_NAMESPACE
|
||||
|
||||
Q_DECLARE_METATYPE(qlonglong)
|
||||
Q_DECLARE_METATYPE(QDate)
|
||||
Q_DECLARE_METATYPE(QLocale::FormatType)
|
||||
|
||||
//TESTED_CLASS=
|
||||
|
@ -792,8 +790,6 @@ void tst_QLocale::formatDate()
|
|||
QCOMPARE(l.toString(date, format), result);
|
||||
}
|
||||
|
||||
Q_DECLARE_METATYPE(QTime)
|
||||
|
||||
void tst_QLocale::formatTime_data()
|
||||
{
|
||||
QTest::addColumn<QTime>("time");
|
||||
|
|
|
@ -136,8 +136,6 @@ void tst_QPainterPath::swap()
|
|||
}
|
||||
|
||||
Q_DECLARE_METATYPE(QPainterPath)
|
||||
Q_DECLARE_METATYPE(QPointF)
|
||||
Q_DECLARE_METATYPE(QRectF)
|
||||
|
||||
void tst_QPainterPath::currentPosition()
|
||||
{
|
||||
|
|
|
@ -33,9 +33,6 @@ class tst_QPen : public QObject
|
|||
{
|
||||
Q_OBJECT
|
||||
|
||||
public:
|
||||
tst_QPen();
|
||||
|
||||
private slots:
|
||||
void getSetCheck();
|
||||
void swap();
|
||||
|
@ -83,14 +80,6 @@ void tst_QPen::swap()
|
|||
QCOMPARE(p2.color(), QColor(Qt::black));
|
||||
}
|
||||
|
||||
Q_DECLARE_METATYPE(QPen)
|
||||
Q_DECLARE_METATYPE(QBrush)
|
||||
|
||||
tst_QPen::tst_QPen()
|
||||
|
||||
{
|
||||
}
|
||||
|
||||
void tst_QPen::operator_eq_eq_data()
|
||||
{
|
||||
QTest::addColumn<QPen>("pen1");
|
||||
|
|
|
@ -22,16 +22,12 @@
|
|||
|
||||
#include <QtTest/QtTest>
|
||||
#include <qrect.h>
|
||||
#include <limits.h>
|
||||
#include <qdebug.h>
|
||||
|
||||
Q_DECLARE_METATYPE(QRectF)
|
||||
Q_DECLARE_METATYPE(QPointF)
|
||||
Q_DECLARE_METATYPE(QRect)
|
||||
Q_DECLARE_METATYPE(QPoint)
|
||||
#include <limits.h>
|
||||
|
||||
//TESTED_CLASS=
|
||||
//TESTED_FILES=
|
||||
// TESTED_CLASS=
|
||||
// TESTED_FILES=
|
||||
|
||||
class tst_QRect : public QObject
|
||||
{
|
||||
|
|
|
@ -39,9 +39,6 @@ class tst_QRegion : public QObject
|
|||
{
|
||||
Q_OBJECT
|
||||
|
||||
public:
|
||||
tst_QRegion();
|
||||
|
||||
private slots:
|
||||
void boundingRect();
|
||||
void rects();
|
||||
|
@ -85,13 +82,7 @@ private slots:
|
|||
void regionToPath();
|
||||
};
|
||||
|
||||
Q_DECLARE_METATYPE(QPolygon)
|
||||
Q_DECLARE_METATYPE(QVector<QRect>)
|
||||
Q_DECLARE_METATYPE(QRegion)
|
||||
|
||||
tst_QRegion::tst_QRegion()
|
||||
{
|
||||
}
|
||||
|
||||
void tst_QRegion::boundingRect()
|
||||
{
|
||||
|
|
|
@ -25,10 +25,8 @@
|
|||
|
||||
#include <limits.h>
|
||||
|
||||
Q_DECLARE_METATYPE(QSize)
|
||||
|
||||
//TESTED_CLASS=
|
||||
//TESTED_FILES=
|
||||
// TESTED_CLASS=
|
||||
// TESTED_FILES=
|
||||
|
||||
class tst_QSize : public QObject
|
||||
{
|
||||
|
|
|
@ -23,10 +23,8 @@
|
|||
#include <QtTest/QtTest>
|
||||
#include <qsize.h>
|
||||
|
||||
Q_DECLARE_METATYPE(QSizeF)
|
||||
|
||||
//TESTED_CLASS=
|
||||
//TESTED_FILES=corelib/tools/qsize.h corelib/tools/qsize.cpp
|
||||
// TESTED_CLASS=
|
||||
// TESTED_FILES=corelib/tools/qsize.h corelib/tools/qsize.cpp
|
||||
|
||||
class tst_QSizeF : public QObject {
|
||||
Q_OBJECT
|
||||
|
|
|
@ -28,16 +28,6 @@ class tst_QTime : public QObject
|
|||
{
|
||||
Q_OBJECT
|
||||
|
||||
public:
|
||||
tst_QTime();
|
||||
virtual ~tst_QTime();
|
||||
|
||||
|
||||
public slots:
|
||||
void initTestCase();
|
||||
void cleanupTestCase();
|
||||
void init();
|
||||
void cleanup();
|
||||
private slots:
|
||||
void toStringLocale();
|
||||
void toString();
|
||||
|
@ -73,39 +63,6 @@ private slots:
|
|||
void toString_format();
|
||||
};
|
||||
|
||||
Q_DECLARE_METATYPE(QTime)
|
||||
|
||||
tst_QTime::tst_QTime()
|
||||
{
|
||||
}
|
||||
|
||||
tst_QTime::~tst_QTime()
|
||||
{
|
||||
|
||||
}
|
||||
|
||||
// initTestCase will be executed once before the first testfunction is executed.
|
||||
void tst_QTime::initTestCase()
|
||||
{
|
||||
}
|
||||
|
||||
// cleanupTestCase will be executed once after the last testfunction is executed.
|
||||
void tst_QTime::cleanupTestCase()
|
||||
{
|
||||
}
|
||||
|
||||
// init() will be executed immediately before each testfunction is run.
|
||||
void tst_QTime::init()
|
||||
{
|
||||
// TODO: Add testfunction specific initialization code here.
|
||||
}
|
||||
|
||||
// cleanup() will be executed immediately after each testfunction is run.
|
||||
void tst_QTime::cleanup()
|
||||
{
|
||||
// TODO: Add testfunction specific cleanup code here.
|
||||
}
|
||||
|
||||
void tst_QTime::addSecs_data()
|
||||
{
|
||||
QTest::addColumn<QTime>("t1");
|
||||
|
|
|
@ -26,23 +26,13 @@
|
|||
#include "qpolygon.h"
|
||||
#include "qdebug.h"
|
||||
|
||||
Q_DECLARE_METATYPE(QRect)
|
||||
|
||||
//TESTED_CLASS=
|
||||
//TESTED_FILES=
|
||||
// TESTED_CLASS=
|
||||
// TESTED_FILES=
|
||||
|
||||
class tst_QTransform : public QObject
|
||||
{
|
||||
Q_OBJECT
|
||||
|
||||
public:
|
||||
tst_QTransform();
|
||||
virtual ~tst_QTransform();
|
||||
|
||||
|
||||
public slots:
|
||||
void init();
|
||||
void cleanup();
|
||||
private slots:
|
||||
void mapRect_data();
|
||||
void operator_star_qrect_data();
|
||||
|
@ -71,27 +61,6 @@ private:
|
|||
void mapping_data();
|
||||
};
|
||||
|
||||
Q_DECLARE_METATYPE(QTransform)
|
||||
Q_DECLARE_METATYPE(QPolygon)
|
||||
|
||||
tst_QTransform::tst_QTransform()
|
||||
{
|
||||
}
|
||||
|
||||
tst_QTransform::~tst_QTransform()
|
||||
{
|
||||
}
|
||||
|
||||
void tst_QTransform::init()
|
||||
{
|
||||
// No initialisation is required
|
||||
}
|
||||
|
||||
void tst_QTransform::cleanup()
|
||||
{
|
||||
// No cleanup is required.
|
||||
}
|
||||
|
||||
void tst_QTransform::mapRect_data()
|
||||
{
|
||||
mapping_data();
|
||||
|
|
|
@ -47,22 +47,6 @@
|
|||
|
||||
#include <limits.h>
|
||||
|
||||
Q_DECLARE_METATYPE(qlonglong)
|
||||
Q_DECLARE_METATYPE(qulonglong)
|
||||
Q_DECLARE_METATYPE(QPointF)
|
||||
Q_DECLARE_METATYPE(QRectF)
|
||||
Q_DECLARE_METATYPE(QSize)
|
||||
Q_DECLARE_METATYPE(QSizeF)
|
||||
Q_DECLARE_METATYPE(QLine)
|
||||
Q_DECLARE_METATYPE(QLineF)
|
||||
Q_DECLARE_METATYPE(QPoint)
|
||||
Q_DECLARE_METATYPE(QRect)
|
||||
Q_DECLARE_METATYPE(QPixmap)
|
||||
Q_DECLARE_METATYPE(QBrush)
|
||||
Q_DECLARE_METATYPE(QFont)
|
||||
Q_DECLARE_METATYPE(QColor)
|
||||
Q_DECLARE_METATYPE(QKeySequence)
|
||||
|
||||
//TESTED_CLASS=
|
||||
//TESTED_FILES=
|
||||
|
||||
|
@ -70,9 +54,6 @@ class tst_QVariant : public QObject
|
|||
{
|
||||
Q_OBJECT
|
||||
|
||||
public:
|
||||
tst_QVariant();
|
||||
|
||||
private slots:
|
||||
void constructor();
|
||||
void copy_constructor();
|
||||
|
@ -245,18 +226,11 @@ private slots:
|
|||
void forwardDeclare();
|
||||
};
|
||||
|
||||
Q_DECLARE_METATYPE(QDate)
|
||||
Q_DECLARE_METATYPE(QTime)
|
||||
Q_DECLARE_METATYPE(QDateTime)
|
||||
Q_DECLARE_METATYPE(QVariant)
|
||||
|
||||
const qlonglong intMax1 = (qlonglong)INT_MAX + 1;
|
||||
const qulonglong uintMax1 = (qulonglong)UINT_MAX + 1;
|
||||
|
||||
tst_QVariant::tst_QVariant()
|
||||
{
|
||||
}
|
||||
|
||||
void tst_QVariant::constructor()
|
||||
{
|
||||
QVariant variant;
|
||||
|
|
|
@ -29,10 +29,6 @@
|
|||
#include <qmath.h>
|
||||
#include <qguicommon_p.h>
|
||||
|
||||
Q_DECLARE_METATYPE(QLine)
|
||||
Q_DECLARE_METATYPE(QRect)
|
||||
Q_DECLARE_METATYPE(QSize)
|
||||
Q_DECLARE_METATYPE(QPoint)
|
||||
Q_DECLARE_METATYPE(QPainterPath)
|
||||
Q_DECLARE_METATYPE(QPainter::RenderHint)
|
||||
Q_DECLARE_METATYPE(QPainter::CompositionMode)
|
||||
|
|
Loading…
Add table
Reference in a new issue