Avoid repeatedly registering the same meta-type

Register the meta-type in initTestCase(), which is run once, rather than
in init(), which is run before every test function is run.

Change-Id: Ic62a2469da6a2a85254ffc7c4d893395202c50d8
Reviewed-by: Rohan McGovern <rohan.mcgovern@nokia.com>
This commit is contained in:
Jason McDonald 2011-12-28 15:40:50 +10:00 committed by Qt by Nokia
parent 36eb666391
commit b2f2258719

View File

@ -51,7 +51,7 @@ class tst_QAnimationGroup : public QObject
{
Q_OBJECT
public Q_SLOTS:
void init();
void initTestCase();
private slots:
void construction();
@ -63,7 +63,7 @@ private slots:
void loopWithoutStartValue();
};
void tst_QAnimationGroup::init()
void tst_QAnimationGroup::initTestCase()
{
qRegisterMetaType<QAbstractAnimation::State>("QAbstractAnimation::State");
}