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:
parent
36eb666391
commit
b2f2258719
@ -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");
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user