Avoid repeatedly registering the same meta-type
authorJason McDonald <jason.mcdonald@nokia.com>
Wed, 28 Dec 2011 05:40:50 +0000 (15:40 +1000)
committerQt by Nokia <qt-info@nokia.com>
Wed, 28 Dec 2011 07:16:47 +0000 (08:16 +0100)
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>
tests/auto/corelib/animation/qanimationgroup/tst_qanimationgroup.cpp

index d020fe9..223998b 100644 (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");
 }