Make the meta type shortcut in this test more robust.
authorStephen Kelly <stephen.kelly@kdab.com>
Mon, 9 Jan 2012 14:57:00 +0000 (15:57 +0100)
committerQt by Nokia <qt-info@nokia.com>
Mon, 9 Jan 2012 19:01:16 +0000 (20:01 +0100)
Change-Id: Ie9f5ea3a62c80b2a4255eda0995133d0471c7538
Reviewed-by: Jędrzej Nowacki <jedrzej.nowacki@nokia.com>
tests/auto/gui/kernel/qshortcut/tst_qshortcut.cpp

index c4b9a5d..228b734 100644 (file)
@@ -152,12 +152,12 @@ protected:
 };
 
 QT_BEGIN_NAMESPACE
-template<> struct QMetaTypeId<tst_QShortcut::Widget>
-{ enum { Defined = 1 }; static inline int qt_metatype_id() { return QMetaType::Int; } };
-template<> struct QMetaTypeId<tst_QShortcut::Result>
-{ enum { Defined = 1 }; static inline int qt_metatype_id() { return QMetaType::Int; } };
-template<> struct QMetaTypeId<tst_QShortcut::Action>
-{ enum { Defined = 1 }; static inline int qt_metatype_id() { return QMetaType::Int; } };
+template<> struct QMetaTypeId<tst_QShortcut::Widget> : public QMetaTypeId<int>
+{ static inline int qt_metatype_id() { return QMetaType::Int; } };
+template<> struct QMetaTypeId<tst_QShortcut::Result> : public QMetaTypeId<int>
+{ static inline int qt_metatype_id() { return QMetaType::Int; } };
+template<> struct QMetaTypeId<tst_QShortcut::Action> : public QMetaTypeId<int>
+{ static inline int qt_metatype_id() { return QMetaType::Int; } };
 QT_END_NAMESPACE
 
 class TestEdit : public QTextEdit