fix_test_remove_qlibraryinfo
authorDebian Qt/KDE Maintainers <debian-qt-kde@lists.debian.org>
Sat, 25 Aug 2018 12:08:52 +0000 (13:08 +0100)
committerDmitry Shachnev <mitya57@debian.org>
Sat, 25 Aug 2018 12:08:52 +0000 (13:08 +0100)
Gbp-Pq: Name fix_test_remove_qlibraryinfo.patch

16 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/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/ecmascripttests/tst_ecmascripttests.cpp
tests/auto/qml/qmlcachegen/tst_qmlcachegen.cpp
tests/auto/qml/qmllint/main.cpp
tests/auto/qml/qmlmin/tst_qmlmin.cpp
tests/auto/qml/qmlplugindump/tst_qmlplugindump.cpp
tests/auto/qml/qv4assembler/tst_qv4assembler.cpp
tests/auto/quick/examples/tst_examples.cpp

index db74e7164bb46bfef7836ad2507865163c1d5071..b81394724b2d00fe89fc738d07912efd30a4445a 100644 (file)
@@ -1,4 +1,7 @@
 load(qt_build_config)
 CONFIG += warning_clean
 
+QMAKE_CXXFLAGS += -DTESTBINDIR=\\\"$$PWD/bin\\\"
+QMAKE_CXXFLAGS += -DTESTEXAMPLEDIR=\\\"$$PWD/examples\\\"
+
 MODULE_VERSION = 5.11.1
index f851688b5ecd7d4a8ffa4234ac59df5251d59923..bf5f53563009d6b25027c288daaf88bba7942521 100644 (file)
@@ -145,7 +145,7 @@ QList<QQmlDebugClient *> tst_QDebugMessageService::createClients()
 
 void tst_QDebugMessageService::retrieveDebugOutput()
 {
-    QCOMPARE(QQmlDebugTest::connect(QLibraryInfo::location(QLibraryInfo::BinariesPath) + "/qml",
+    QCOMPARE(QQmlDebugTest::connect(TESTBINDIR "/qml",
                                     QString(), testFile(QMLFILE), true), ConnectSuccess);
 
     QTRY_VERIFY(m_client->logBuffer.size() >= 2);
index 52e7f85e52804e4b93b8a821095ce77ec64f9de4..a849c3581090abd379d7467349c690c5eb71ede8 100644 (file)
@@ -102,8 +102,7 @@ void tst_QQmlDebuggingEnabler::qmlscene()
     QFETCH(bool, blockMode);
     QFETCH(QStringList, services);
 
-    m_process = new QQmlDebugProcess(
-                QLibraryInfo::location(QLibraryInfo::BinariesPath) + "/qmlscene", this);
+    m_process = new QQmlDebugProcess(TESTBINDIR "/qmlscene", this);
     m_process->setMaximumBindErrors(1);
     m_process->start(QStringList()
                      << QString::fromLatin1("-qmljsdebugger=connector:%1%2%3%4")
index 660afce216355896d2ac2eac843e9739f2a1d577..e0fb15cdfde8c759a1919c840a7d04940b8c9e13 100644 (file)
@@ -767,7 +767,7 @@ QQmlDebugTest::ConnectResult tst_QQmlDebugJS::init(bool qmlscene, const QString
                                                    bool blockMode, bool restrictServices)
 {
     const QString executable = qmlscene
-            ? QLibraryInfo::location(QLibraryInfo::BinariesPath) + "/qmlscene"
+            ? TESTBINDIR "/qmlscene"
             : QCoreApplication::applicationDirPath() + QLatin1String("/qqmldebugjsserver");
     return QQmlDebugTest::connect(
                 executable, restrictServices ? QStringLiteral("V8Debugger") : QString(),
@@ -1388,8 +1388,7 @@ void tst_QQmlDebugJS::evaluateInLocalScope()
 void tst_QQmlDebugJS::evaluateInContext()
 {
     m_connection = new QQmlDebugConnection();
-    m_process = new QQmlDebugProcess(QLibraryInfo::location(QLibraryInfo::BinariesPath)
-                                   + "/qmlscene", this);
+    m_process = new QQmlDebugProcess(TESTBINDIR "/qmlscene", this);
     m_client = new QJSDebugClient(m_connection);
     QScopedPointer<QQmlEngineDebugClient> engineClient(new QQmlEngineDebugClient(m_connection));
     m_process->start(QStringList() << QLatin1String(BLOCKMODE) << testFile(ONCOMPLETED_QMLFILE));
index 1daf6b581e3cd1460571487d0899a25f2af81372..8c74e509f114d33f87102d29a45b07080fec5411 100644 (file)
@@ -108,8 +108,7 @@ void tst_QQmlDebugService::checkPortRange()
 {
     QScopedPointer<QQmlDebugConnection> connection1(new QQmlDebugConnection());
     QScopedPointer<QQmlDebugProcess> process1(
-                new QQmlDebugProcess(QLibraryInfo::location(QLibraryInfo::BinariesPath)
-                                     + "/qmlscene", this));
+                new QQmlDebugProcess(TESTBINDIR "/qmlscene", this));
 
     process1->start(QStringList() << QLatin1String("-qmljsdebugger=port:3782,3792")
                                   << testFile("test.qml"));
@@ -125,8 +124,7 @@ void tst_QQmlDebugService::checkPortRange()
     // Second instance
     QScopedPointer<QQmlDebugConnection> connection2(new QQmlDebugConnection());
     QScopedPointer<QQmlDebugProcess> process2(
-                new QQmlDebugProcess(QLibraryInfo::location(QLibraryInfo::BinariesPath)
-                                     + "/qmlscene", this));
+                new QQmlDebugProcess(TESTBINDIR "/qmlscene", this));
 
     process2->start(QStringList() << QLatin1String("-qmljsdebugger=port:3782,3792")
                                   << testFile("test.qml"));
index a8c43b1c75bc353ee19c4d6053145bfec348546e..68fa18ecdd64f73422f508ff06891962e51a8855 100644 (file)
@@ -82,7 +82,7 @@ private slots:
 QQmlDebugTest::ConnectResult tst_QQmlEngineControl::connect(const QString &file,
                                                             bool restrictServices)
 {
-    return QQmlDebugTest::connect(QLibraryInfo::location(QLibraryInfo::BinariesPath) + "/qmlscene",
+    return QQmlDebugTest::connect(TESTBINDIR "/qmlscene",
                                   restrictServices ? QStringLiteral("EngineControl") : QString(),
                                   testFile(file), true);
 }
index 249416a3b94bb92d0dbf8d3d99a74fa6d8b05293..0b759c870ced58f3534425462cd16b8d1194caba 100644 (file)
@@ -88,7 +88,7 @@ QmlDebugObjectReference tst_QQmlEngineDebugInspectorIntegration::findRootObject(
 QQmlDebugTest::ConnectResult tst_QQmlEngineDebugInspectorIntegration::init(bool restrictServices)
 {
     return QQmlDebugTest::connect(
-                QLibraryInfo::location(QLibraryInfo::BinariesPath) + "/qml",
+                TESTBINDIR "/qml",
                 restrictServices ? QStringLiteral("QmlDebugger,QmlInspector") : QString(),
                 testFile("qtquick2.qml"), true);
 }
index 5c9506eb21ed23073ac8c69733356b854651f6a6..90cc4dfc1ca802b756a9257fffa810de958f3776 100644 (file)
@@ -64,7 +64,7 @@ private slots:
 QQmlDebugTest::ConnectResult tst_QQmlInspector::startQmlProcess(const QString &qmlFile,
                                                                 bool restrictServices)
 {
-    return QQmlDebugTest::connect(QLibraryInfo::location(QLibraryInfo::BinariesPath) + "/qml",
+    return QQmlDebugTest::connect(TESTBINDIR "/qml",
                                   restrictServices ? QStringLiteral("QmlInspector") : QString(),
                                   testFile(qmlFile), true);
 }
index 3cb315b3558d83b30449e598e5c05e65fb4e4b82..0c839264bd061b0e5b5f2208c9f2428069c39f11 100644 (file)
@@ -245,7 +245,7 @@ QQmlDebugTest::ConnectResult tst_QQmlProfilerService::connect(
 
     // ### Still using qmlscene due to QTBUG-33377
     return QQmlDebugTest::connect(
-                QLibraryInfo::location(QLibraryInfo::BinariesPath) + "/qmlscene",
+                TESTBINDIR "/qmlscene",
                 restrictServices ? "CanvasFrameRate,EngineControl,DebugMessages" : QString(),
                 testFile(file), block);
 }
index 0d58d045b97d6030e618802eadf7b632d16f1ad9..f689f099eff75e1b5d0aedf49f013c6e662ecb50 100644 (file)
@@ -56,7 +56,7 @@ void tst_EcmaScriptTests::runTests(bool interpret)
     process.setWorkingDirectory(QLatin1String(SRCDIR));
     process.setProgram("python");
     process.setProcessEnvironment(env);
-    process.setArguments(QStringList() << "test262.py" << "--command=" + QLibraryInfo::location(QLibraryInfo::BinariesPath) + "/qmljs" << "--parallel" << "--with-test-expectations");
+    process.setArguments(QStringList() << "test262.py" << "--command=" TESTBINDIR "/qmljs" << "--parallel" << "--with-test-expectations");
 
     qDebug() << "Going to run" << process.program() << process.arguments() << "in" << process.workingDirectory();
 
index 3b7d268f7b1e18851b6f02ea1e9dc3df3ff7a901..6de424c8193e2b97cf2a6370997e8e7d33c5f7f7 100644 (file)
@@ -87,7 +87,7 @@ static bool generateCache(const QString &qmlFileName, QByteArray *capturedStderr
     QProcess proc;
     if (capturedStderr == nullptr)
         proc.setProcessChannelMode(QProcess::ForwardedChannels);
-    proc.setProgram(QLibraryInfo::location(QLibraryInfo::BinariesPath) + QDir::separator() + QLatin1String("qmlcachegen"));
+    proc.setProgram(TESTBINDIR "/qmlcachegen");
     proc.setArguments(QStringList() << qmlFileName);
     proc.start();
     if (!proc.waitForFinished())
index eedbd7c2f2153f755a9cdea4c6204089d1349944..1e4b6e2fa7a47776d423f9d0d7af846738bea3a8 100644 (file)
@@ -44,7 +44,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 5941385c800191dc1eddfa6108820d873bbf1c00..e734331978f00c38324b77ec451287fc12fee485 100644 (file)
@@ -64,7 +64,7 @@ tst_qmlmin::tst_qmlmin()
 
 void tst_qmlmin::initTestCase()
 {
-    qmlminPath = QLibraryInfo::location(QLibraryInfo::BinariesPath) + QLatin1String("/qmlmin");
+    qmlminPath = QStringLiteral(TESTBINDIR "/qmlmin");
 #ifdef Q_OS_WIN
     qmlminPath += QLatin1String(".exe");
 #endif
index ffddc52f9c714a657cb3194ae3d72b2d7cce0e44..44ab7c5f2e3940cb6ba55a1b062b496e6da245f2 100644 (file)
@@ -57,7 +57,7 @@ tst_qmlplugindump::tst_qmlplugindump()
 void tst_qmlplugindump::initTestCase()
 {
     QQmlDataTest::initTestCase();
-    qmlplugindumpPath = QLibraryInfo::location(QLibraryInfo::BinariesPath);
+    qmlplugindumpPath = QLatin1String(TESTBINDIR);
 
 #if defined(Q_OS_WIN)
     qmlplugindumpPath += QLatin1String("/qmlplugindump.exe");
index 9bd1afa2568e21fad973cf77309d26f683951e78..0d324f2b5051cee2ae866c6d9c74af11184f9f1a 100644 (file)
@@ -43,7 +43,7 @@ void tst_QV4Assembler::perfMapFile()
 #if !defined(Q_OS_LINUX)
     QSKIP("perf map files are only generated on linux");
 #else
-    const QString qmljs = QLibraryInfo::location(QLibraryInfo::BinariesPath) + "/qmljs";
+    const QString qmljs = QStringLiteral(TESTBINDIR "/qmljs");
     QProcess process;
 
     QTemporaryFile infile;
index eee8dfcf26b2cb76b16b80093728b03c418d98b6..f408e45412b8ae06912269a275ab1470d8c515d2 100644 (file)
@@ -177,8 +177,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);