fix_test_remove_qlibraryinfo
authorDebian Qt/KDE Maintainers <debian-qt-kde@lists.debian.org>
Fri, 7 Oct 2016 07:03:28 +0000 (07:03 +0000)
committerDmitry Shachnev <mitya57@debian.org>
Fri, 7 Oct 2016 07:03:28 +0000 (07:03 +0000)
Gbp-Pq: Name fix_test_remove_qlibraryinfo.patch

13 files changed:
.qmake.conf
tests/auto/qml/debugger/qdebugmessageservice/tst_qdebugmessageservice.cpp
tests/auto/qml/debugger/qqmldebuggingenabler/qqmldebuggingenabler/tst_qqmldebuggingenabler.cpp
tests/auto/qml/debugger/qqmldebugjs/tst_qqmldebugjs.cpp
tests/auto/qml/debugger/qqmldebugservice/tst_qqmldebugservice.cpp
tests/auto/qml/debugger/qqmlenginecontrol/tst_qqmlenginecontrol.cpp
tests/auto/qml/debugger/qqmlenginedebuginspectorintegrationtest/tst_qqmlenginedebuginspectorintegration.cpp
tests/auto/qml/debugger/qqmlinspector/tst_qqmlinspector.cpp
tests/auto/qml/debugger/qqmlprofilerservice/tst_qqmlprofilerservice.cpp
tests/auto/qml/qmllint/main.cpp
tests/auto/qml/qmlmin/tst_qmlmin.cpp
tests/auto/qml/qmlplugindump/tst_qmlplugindump.cpp
tests/auto/quick/examples/tst_examples.cpp

index 5c427194442118f9e6672e6748533dec2dff318f..68a7d9bc0077ac1c0d4c38e9104fdd094d405f65 100644 (file)
@@ -2,4 +2,7 @@ load(qt_build_config)
 CONFIG += qt_example_installs
 CONFIG += warning_clean
 
+QMAKE_CXXFLAGS += -DTESTBINDIR=\\\"$$PWD/bin\\\"
+QMAKE_CXXFLAGS += -DTESTEXAMPLEDIR=\\\"$$PWD/examples\\\"
+
 MODULE_VERSION = 5.6.1
index d0801dd4ee8e5515d2cf8334de2f5a43446552b6..c515d2e3c35fc2db12533a51c03ac1cad883e92e 100644 (file)
@@ -171,7 +171,7 @@ void tst_QDebugMessageService::cleanupTestCase()
 void tst_QDebugMessageService::init()
 {
     m_connection = new QQmlDebugConnection();
-    m_process = new QQmlDebugProcess(QLibraryInfo::location(QLibraryInfo::BinariesPath) + "/qml", this);
+    m_process = new QQmlDebugProcess(TESTBINDIR "/qml", this);
     m_client = new QQmlDebugMsgClient(m_connection);
 
     m_process->start(QStringList() << QLatin1String(NORMALMODE) << QQmlDataTest::instance()->testFile(QMLFILE));
index 98ef59031760b0f61dcf379015e5abfda618d954..55dd2da94e5bb3dbe1d62fcbbd9cf8abca27d0c5 100644 (file)
@@ -89,7 +89,7 @@ bool tst_QQmlDebuggingEnabler::init(bool blockMode, bool qmlscene, int portFrom,
     connection = new QQmlDebugConnection();
 
     if (qmlscene) {
-        process = new QQmlDebugProcess(QLibraryInfo::location(QLibraryInfo::BinariesPath) + "/qmlscene", this);
+        process = new QQmlDebugProcess(TESTBINDIR "/qmlscene", this);
         process->setMaximumBindErrors(1);
     } else {
         process = new QQmlDebugProcess(QCoreApplication::applicationDirPath() + QLatin1String("/qqmldebuggingenablerserver"), this);
index 7dbe35807d7de85e24e6aad1c949e72390dc8e44..18c2e7ed76f38ee8fba662a9e037dbbc1a35d0d0 100644 (file)
@@ -829,7 +829,7 @@ void tst_QQmlDebugJS::cleanupTestCase()
 void tst_QQmlDebugJS::init(const QString &qmlFile, bool blockMode, bool restrictServices)
 {
     connection = new QQmlDebugConnection();
-    process = new QQmlDebugProcess(QLibraryInfo::location(QLibraryInfo::BinariesPath) + "/qmlscene", this);
+    process = new QQmlDebugProcess(TESTBINDIR "/qmlscene", this);
     client = new QJSDebugClient(connection);
 
     const char *args = 0;
index b63c5c0a6d30b1726630bea17ae05b3d6c6e5229..85adf1f74b6c2a6aa4ee3a44e3316f07c33f1532 100644 (file)
@@ -99,7 +99,7 @@ void tst_QQmlDebugService::initTestCase()
 void tst_QQmlDebugService::checkPortRange()
 {
     QQmlDebugConnection *connection1 = new QQmlDebugConnection();
-    QQmlDebugProcess *process1 = new QQmlDebugProcess(QLibraryInfo::location(QLibraryInfo::BinariesPath) + "/qmlscene", this);
+    QQmlDebugProcess *process1 = new QQmlDebugProcess(TESTBINDIR "/qmlscene", this);
 
     process1->start(QStringList() << QLatin1String("-qmljsdebugger=port:3782,3792") << testFile("test.qml"));
 
@@ -113,7 +113,7 @@ void tst_QQmlDebugService::checkPortRange()
 
     // Second instance
     QQmlDebugConnection *connection2 = new QQmlDebugConnection();
-    QQmlDebugProcess *process2 = new QQmlDebugProcess(QLibraryInfo::location(QLibraryInfo::BinariesPath) + "/qmlscene", this);
+    QQmlDebugProcess *process2 = new QQmlDebugProcess(TESTBINDIR "/qmlscene", this);
 
     process2->start(QStringList() << QLatin1String("-qmljsdebugger=port:3782,3792") << testFile("test.qml"));
 
index 11fa56d7101c0ae6664158e951cae4a0552d2041..6f31c16ba3748841e49b369167d47e93e41010b5 100644 (file)
@@ -153,7 +153,7 @@ void QQmlEngineControlClient::messageReceived(const QByteArray &message)
 
 void tst_QQmlEngineControl::connect(const QString &testFile, bool restrictServices)
 {
-    const QString executable = QLibraryInfo::location(QLibraryInfo::BinariesPath) + "/qmlscene";
+    const QString executable = TESTBINDIR "/qmlscene";
     QStringList arguments;
     arguments << QString::fromLatin1("-qmljsdebugger=port:%1,%2,block%3")
                  .arg(STR_PORT_FROM).arg(STR_PORT_TO)
index 0285bae189ddd7bd5edc006fb404c2a68c4d7924..e38157763d68562f68bfc8214ffbf5976e47d4e1 100644 (file)
@@ -102,8 +102,7 @@ void tst_QQmlEngineDebugInspectorIntegration::init(bool restrictServices)
                                     QString());
 
     // ### Still using qmlscene because of QTBUG-33376
-    m_process = new QQmlDebugProcess(QLibraryInfo::location(QLibraryInfo::BinariesPath)
-                                     + "/qmlscene", this);
+    m_process = new QQmlDebugProcess(TESTBINDIR "/qmlscene", this);
     m_process->start(QStringList() << argument << testFile("qtquick2.qml"));
     QVERIFY2(m_process->waitForSessionStart(),
              "Could not launch application, or did not get 'Waiting for connection'.");
index 70833f5e2cd2170bc1dfbe7d7e8ae62d83a6cce3..4a1a565c95daf755f6751798d354f96c0d525876 100644 (file)
@@ -84,7 +84,7 @@ void tst_QQmlInspector::startQmlsceneProcess(const char * /* qmlFile */, bool re
             .arg(restrictServices ? QStringLiteral(",services:QmlInspector") : QString());
 
     // ### This should be using qml instead of qmlscene, but can't because of QTBUG-33376 (same as the XFAIL testcase)
-    m_process = new QQmlDebugProcess(QLibraryInfo::location(QLibraryInfo::BinariesPath) + "/qmlscene", this);
+    m_process = new QQmlDebugProcess(TESTBINDIR "/qmlscene", this);
     m_process->start(QStringList() << argument << testFile("qtquick2.qml"));
     QVERIFY2(m_process->waitForSessionStart(),
              "Could not launch application, or did not get 'Waiting for connection'.");
index 0e63e18952d10c5a7f6baaf4ec42fdb6d0fcd2ca..74eb8406399666e7843750362a991944c40df396 100644 (file)
@@ -359,7 +359,7 @@ void QQmlProfilerClient::messageReceived(const QByteArray &message)
 void tst_QQmlProfilerService::connect(bool block, const QString &testFile, bool restrictServices)
 {
     // ### Still using qmlscene due to QTBUG-33377
-    const QString executable = QLibraryInfo::location(QLibraryInfo::BinariesPath) + "/qmlscene";
+    const QString executable = TESTBINDIR "/qmlscene";
     QStringList arguments;
     arguments << QString::fromLatin1("-qmljsdebugger=port:%1,%2%3%4")
                  .arg(STR_PORT_FROM).arg(STR_PORT_TO)
index a6dadd7178ffc0dc43d3054d8919fdb6e0fc2f39..767ab77fb51564de2a3073ff487a589a84829cb2 100644 (file)
@@ -49,7 +49,7 @@ private:
 
 void TestQmllint::initTestCase()
 {
-    m_qmllintPath = QLibraryInfo::location(QLibraryInfo::BinariesPath) + QLatin1String("/qmllint");
+    m_qmllintPath = QLatin1String(TESTBINDIR "/qmllint");
 #ifdef Q_OS_WIN
     m_qmllintPath += QLatin1String(".exe");
 #endif
index 6d2fba3f462df4705b3d283fb2de6215b5eb36a5..876e0aed1de82b42de7b664db433839ee1be03a2 100644 (file)
@@ -67,7 +67,7 @@ tst_qmlmin::tst_qmlmin()
 
 void tst_qmlmin::initTestCase()
 {
-    qmlminPath = QLibraryInfo::location(QLibraryInfo::BinariesPath) + QLatin1String("/qmlmin");
+    qmlminPath = QString(TESTBINDIR) + QLatin1String("/qmlmin");
 #ifdef Q_OS_WIN
     qmlminPath += QLatin1String(".exe");
 #endif
index 82506b4217ea5ed5be03729291464a85d1de50cd..1b8eaedf958c8051b2539c9d5587690a7efbe9ae 100644 (file)
@@ -59,7 +59,7 @@ tst_qmlplugindump::tst_qmlplugindump()
 
 void tst_qmlplugindump::initTestCase()
 {
-    qmlplugindumpPath = QLibraryInfo::location(QLibraryInfo::BinariesPath);
+    qmlplugindumpPath = QLatin1String(TESTBINDIR);
 
 #if defined(Q_OS_WIN)
     qmlplugindumpPath += QLatin1String("/qmlplugindump.exe");
index 20031c24d9b386698f903863820ec7db1233758c..b1acfad2ee054b911a9d032323855896a54b0f2b 100644 (file)
@@ -174,8 +174,8 @@ void tst_examples::namingConvention(const QDir &d)
 void tst_examples::namingConvention()
 {
     QStringList examplesLocations;
-    examplesLocations << QLibraryInfo::location(QLibraryInfo::ExamplesPath) + QLatin1String("/qml");
-    examplesLocations << QLibraryInfo::location(QLibraryInfo::ExamplesPath) + QLatin1String("/quick");
+    examplesLocations << QLatin1String(TESTEXAMPLEDIR "/qml");
+    examplesLocations << QLatin1String(TESTEXAMPLEDIR "/quick");
 
     foreach(const QString &examples, examplesLocations) {
         QDir d(examples);