From e6b42646fd477daf31caf52ead3f9452f340c114 Mon Sep 17 00:00:00 2001 From: Christian Kandeler Date: Mon, 31 Mar 2014 16:29:06 +0200 Subject: Make "Qt.declarative" available as "Qt.quick" again for Qt 4. This was accidentally removed when switching to the new Qt modules approach. Change-Id: Ie8db5a183c2cc3a82d31c2793710983cf4206ef0 Reviewed-by: Joerg Bornemann --- .../auto/blackbox/testdata/qml-debugging/main.cpp | 22 +++++++++++++++++++--- 1 file changed, 19 insertions(+), 3 deletions(-) (limited to 'tests/auto/blackbox/testdata/qml-debugging') diff --git a/tests/auto/blackbox/testdata/qml-debugging/main.cpp b/tests/auto/blackbox/testdata/qml-debugging/main.cpp index 51f46ef65..e28c5e126 100644 --- a/tests/auto/blackbox/testdata/qml-debugging/main.cpp +++ b/tests/auto/blackbox/testdata/qml-debugging/main.cpp @@ -1,12 +1,28 @@ +#include +#include + +#if (QT_VERSION >= QT_VERSION_CHECK(5, 0, 0)) #include #include +typedef QGuiApplication Application; +#define AH_SO_THIS_IS_QT5 +#else +#include +#include +#define AH_SO_THIS_IS_QT4 +typedef QApplication Application; +#endif int main(int argc, char *argv[]) { - QGuiApplication app(argc, argv); - + Application app(argc, argv); +#ifdef AH_SO_THIS_IS_QT5 QQmlApplicationEngine engine; - engine.load(QUrl(QStringLiteral("qrc:///qml/main.qml"))); + engine.load(QUrl("blubb")); +#else + QDeclarativeView view; + view.setSource(QUrl("blubb")); +#endif return app.exec(); } -- cgit v1.2.3