From cc5a370e2daad34e05dde7c9c0854ea3bf4eb3fc Mon Sep 17 00:00:00 2001 From: Alex Blasche Date: Thu, 30 Oct 2014 13:48:32 +0100 Subject: Make compile unit tests The ControllerState and Error enums were recently registered declared via Q_DECLARE_METATYPE. This fix removes the duplication and resulting compile error. Change-Id: I38233bc067f7d94fd0dbfefbf5a6a2b08d2c6a49 Reviewed-by: Timur Pocheptsov Reviewed-by: Alex Blasche --- tests/auto/qlowenergycharacteristic/tst_qlowenergycharacteristic.cpp | 4 ---- tests/auto/qlowenergycontroller/tst_qlowenergycontroller.cpp | 4 ---- tests/auto/qlowenergydescriptor/tst_qlowenergydescriptor.cpp | 4 ---- 3 files changed, 12 deletions(-) (limited to 'tests') diff --git a/tests/auto/qlowenergycharacteristic/tst_qlowenergycharacteristic.cpp b/tests/auto/qlowenergycharacteristic/tst_qlowenergycharacteristic.cpp index e65b573c..da748b05 100644 --- a/tests/auto/qlowenergycharacteristic/tst_qlowenergycharacteristic.cpp +++ b/tests/auto/qlowenergycharacteristic/tst_qlowenergycharacteristic.cpp @@ -67,14 +67,10 @@ private: QLowEnergyService *globalService; }; -Q_DECLARE_METATYPE(QLowEnergyController::ControllerState) - tst_QLowEnergyCharacteristic::tst_QLowEnergyCharacteristic() : globalControl(0), globalService(0) { QLoggingCategory::setFilterRules(QStringLiteral("qt.bluetooth* = true")); - - qRegisterMetaType(); } tst_QLowEnergyCharacteristic::~tst_QLowEnergyCharacteristic() diff --git a/tests/auto/qlowenergycontroller/tst_qlowenergycontroller.cpp b/tests/auto/qlowenergycontroller/tst_qlowenergycontroller.cpp index 10fceb00..3cb57e3f 100644 --- a/tests/auto/qlowenergycontroller/tst_qlowenergycontroller.cpp +++ b/tests/auto/qlowenergycontroller/tst_qlowenergycontroller.cpp @@ -83,15 +83,11 @@ private: Q_DECLARE_METATYPE(QLowEnergyCharacteristic) Q_DECLARE_METATYPE(QLowEnergyDescriptor) Q_DECLARE_METATYPE(QLowEnergyService::ServiceError) -Q_DECLARE_METATYPE(QLowEnergyController::ControllerState) -Q_DECLARE_METATYPE(QLowEnergyController::Error) tst_QLowEnergyController::tst_QLowEnergyController() { qRegisterMetaType(); qRegisterMetaType(); - qRegisterMetaType(); - qRegisterMetaType(); //QLoggingCategory::setFilterRules(QStringLiteral("qt.bluetooth* = true")); const QString remote = qgetenv("BT_TEST_DEVICE"); diff --git a/tests/auto/qlowenergydescriptor/tst_qlowenergydescriptor.cpp b/tests/auto/qlowenergydescriptor/tst_qlowenergydescriptor.cpp index 6678daab..a0960c57 100644 --- a/tests/auto/qlowenergydescriptor/tst_qlowenergydescriptor.cpp +++ b/tests/auto/qlowenergydescriptor/tst_qlowenergydescriptor.cpp @@ -67,14 +67,10 @@ private: QLowEnergyService *globalService; }; -Q_DECLARE_METATYPE(QLowEnergyController::ControllerState) - tst_QLowEnergyDescriptor::tst_QLowEnergyDescriptor() : globalControl(0), globalService(0) { QLoggingCategory::setFilterRules(QStringLiteral("qt.bluetooth* = true")); - - qRegisterMetaType(); } tst_QLowEnergyDescriptor::~tst_QLowEnergyDescriptor() -- cgit v1.2.3