diff options
author | Jens Bache-Wiig <jens.bache-wiig@digia.com> | 2013-04-11 19:49:39 +0200 |
---|---|---|
committer | The Qt Project <gerrit-noreply@qt-project.org> | 2013-04-15 15:09:57 +0200 |
commit | 5857ea03a77e44879191dd922b7c38c49616517b (patch) | |
tree | bff6d278b83e1ee1699ae36a89dfea463d08caa9 /tests | |
parent | 2b309cf52dfff7307a055b2662e7ce1a53d44bdb (diff) | |
download | qtquickcontrols-5857ea03a77e44879191dd922b7c38c49616517b.tar.gz |
Remove hard dependency on widgets
Change-Id: I1fabb4efcc931f12f0a65ac5c66e6e085108269b
Reviewed-by: J-P Nurmi <jpnurmi@digia.com>
Diffstat (limited to 'tests')
-rw-r--r-- | tests/auto/activeFocusOnTab/activeFocusOnTab.pro | 3 | ||||
-rw-r--r-- | tests/auto/applicationwindow/applicationwindow.pro | 2 | ||||
-rw-r--r-- | tests/auto/controls/controls.pro | 2 | ||||
-rw-r--r-- | tests/auto/testplugin/QtQuickControlsTests/qmldir | 2 | ||||
-rw-r--r-- | tests/auto/testplugin/testplugin.pro | 4 | ||||
-rw-r--r-- | tests/shared/qt_quick_controls_quicktest.h | 17 |
6 files changed, 22 insertions, 8 deletions
diff --git a/tests/auto/activeFocusOnTab/activeFocusOnTab.pro b/tests/auto/activeFocusOnTab/activeFocusOnTab.pro index 1a32e0e6..7ca9e7e1 100644 --- a/tests/auto/activeFocusOnTab/activeFocusOnTab.pro +++ b/tests/auto/activeFocusOnTab/activeFocusOnTab.pro @@ -8,5 +8,6 @@ include (../shared/util.pri) TESTDATA = data/* -QT += widgets core-private gui-private v8-private qml-private quick-private testlib +QT += core-private gui-private v8-private qml-private quick-private testlib +qtHaveModule(widgets) { QT += widgets } DEFINES += QT_DISABLE_DEPRECATED_BEFORE=0 diff --git a/tests/auto/applicationwindow/applicationwindow.pro b/tests/auto/applicationwindow/applicationwindow.pro index 1e4dcf9e..0a66bf5b 100644 --- a/tests/auto/applicationwindow/applicationwindow.pro +++ b/tests/auto/applicationwindow/applicationwindow.pro @@ -4,7 +4,7 @@ SOURCES += tst_applicationwindow.cpp macx:CONFIG -= app_bundle -QT += widgets core-private gui-private qml-private quick-private v8-private testlib +QT += core-private gui-private qml-private quick-private v8-private testlib include (../shared/util.pri) diff --git a/tests/auto/controls/controls.pro b/tests/auto/controls/controls.pro index 3286e9eb..949991a9 100644 --- a/tests/auto/controls/controls.pro +++ b/tests/auto/controls/controls.pro @@ -3,7 +3,7 @@ TARGET = tst_controls IMPORTPATH = $$OUT_PWD/../testplugin -QT += widgets +qtHaveModule(widgets) { QT += widgets } CONFIG += qmltestcase console diff --git a/tests/auto/testplugin/QtQuickControlsTests/qmldir b/tests/auto/testplugin/QtQuickControlsTests/qmldir index 10c6cbab..e5e0015e 100644 --- a/tests/auto/testplugin/QtQuickControlsTests/qmldir +++ b/tests/auto/testplugin/QtQuickControlsTests/qmldir @@ -1,2 +1,2 @@ -module QtQuickControlsTests + module QtQuickControlsTests plugin testplugin diff --git a/tests/auto/testplugin/testplugin.pro b/tests/auto/testplugin/testplugin.pro index d656517f..d25d3a9f 100644 --- a/tests/auto/testplugin/testplugin.pro +++ b/tests/auto/testplugin/testplugin.pro @@ -3,7 +3,9 @@ CONFIG += plugin TARGET = testplugin TARGETPATH = QtQuickControlsTests -QT += qml quick widgets +QT += qml quick +qtHaveModule(widgets) { QT += widgets } + QMLDIR = $$PWD/$$TARGETPATH/qmldir diff --git a/tests/shared/qt_quick_controls_quicktest.h b/tests/shared/qt_quick_controls_quicktest.h index 0e1873af..8bcd0d47 100644 --- a/tests/shared/qt_quick_controls_quicktest.h +++ b/tests/shared/qt_quick_controls_quicktest.h @@ -43,7 +43,12 @@ #define QT_QUICK_CONTROLS_QUICKTEST_H #include <QtQuickTest/quicktestglobal.h> + +#ifndef QT_NO_WIDGETS #include <QtWidgets/QApplication> +#else +#include <QtGui/QGuiApplication> +#endif QT_BEGIN_NAMESPACE @@ -53,12 +58,18 @@ QT_BEGIN_NAMESPACE #define QT_QUICK_CONTROLS_TEST_MAIN_VAR 0 #endif +#ifndef QT_NO_WIDGETS +#define Application QApplication +#else +#define Application QGuiApplication +#endif + #define QT_QUICK_CONTROLS_TEST_MAIN(name) \ int main(int argc, char **argv) \ { \ - QApplication* app = 0; \ + Application* app = 0; \ if (!QCoreApplication::instance()) \ - app = new QApplication(argc, argv); \ + app = new Application(argc, argv); \ int i = quick_test_main(argc, argv, #name, QT_QUICK_CONTROLS_TEST_MAIN_VAR); \ delete app; \ return i; \ @@ -66,4 +77,4 @@ QT_BEGIN_NAMESPACE QT_END_NAMESPACE -#endif +#endif // QT_QUICK_CONTROLS_QUICKTEST_H |