aboutsummaryrefslogtreecommitdiffstats
path: root/tests
diff options
context:
space:
mode:
Diffstat (limited to 'tests')
-rw-r--r--tests/auto/blackbox/testdata/qml-debugging/main.cpp22
-rw-r--r--tests/auto/blackbox/tst_blackbox.cpp2
2 files changed, 20 insertions, 4 deletions
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 <QtGlobal>
+#include <QString>
+
+#if (QT_VERSION >= QT_VERSION_CHECK(5, 0, 0))
#include <QGuiApplication>
#include <QQmlApplicationEngine>
+typedef QGuiApplication Application;
+#define AH_SO_THIS_IS_QT5
+#else
+#include <QApplication>
+#include <QDeclarativeView>
+#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();
}
diff --git a/tests/auto/blackbox/tst_blackbox.cpp b/tests/auto/blackbox/tst_blackbox.cpp
index 821438cb9..c08054877 100644
--- a/tests/auto/blackbox/tst_blackbox.cpp
+++ b/tests/auto/blackbox/tst_blackbox.cpp
@@ -1698,7 +1698,7 @@ void TestBlackbox::qmlDebugging()
QVERIFY2(nm.waitForFinished(), qPrintable(nm.errorString()));
QVERIFY2(nm.exitCode() == 0, nm.readAllStandardError().constData());
const QByteArray output = nm.readAllStandardOutput();
- QVERIFY2(output.contains("qQmlEnableDebuggingHelper"), output.constData());
+ QVERIFY2(output.toLower().contains("debugginghelper"), output.constData());
}
}