fix_test_remove_qlibraryinfo
authorDebian Qt/KDE Maintainers <debian-qt-kde@lists.debian.org>
Mon, 21 Oct 2019 17:12:14 +0000 (18:12 +0100)
committerDmitry Shachnev <mitya57@debian.org>
Mon, 21 Oct 2019 17:12:14 +0000 (18:12 +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/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/qqmlpreview/tst_qqmlpreview.cpp
tests/auto/qml/debugger/qqmlprofilerservice/tst_qqmlprofilerservice.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 d42b39c2e72975cdadd361cb658dc04d4a5c8ae4..361ad964eda7c845ef53b42391db5543c9be5239 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.12.5
index d2cfd3897a9167c5f6b681c94a5d1ba81bfe47f6..b37a1d5f8efcec6bda23fb956945ee3f44a13aff 100644 (file)
@@ -136,7 +136,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 37118f4bd094d267e9d662b1511b3f29d96e9450..866cb9a3f9fcb91bd2ff29cf286489ea45b30365 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 1202cddc0573ee3ee7e51dfe44b597eb0c63c072..341a1028e10ed6acad95b7c9cf59357e701bbf97 100644 (file)
@@ -800,7 +800,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"
             : debugJsServerPath("qqmldebugjs");
     return QQmlDebugTest::connect(
                 executable, restrictServices ? QStringLiteral("V8Debugger") : QString(),
@@ -1472,8 +1472,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 35579403865b60305291179ca3ae434e69e37b63..66e70275acc9a3383622f23e9b223508d12d3f82 100644 (file)
@@ -106,8 +106,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"));
@@ -123,8 +122,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 f08f3c1da747d28a5ace78dfee7a451b0f5b44cc..586a0e565197994e578c8f88bb08fdc27aece125 100644 (file)
@@ -74,7 +74,7 @@ private slots:
 
 QQmlDebugTest::ConnectResult tst_QQmlPreview::startQmlProcess(const QString &qmlFile)
 {
-    return QQmlDebugTest::connect(QLibraryInfo::location(QLibraryInfo::BinariesPath) + "/qml",
+    return QQmlDebugTest::connect(QStringLiteral(TESTBINDIR "/qml"),
                                   QStringLiteral("QmlPreview"), testFile(qmlFile), true);
 }
 
index e0bd5413fe54a72c38fd60009341fba92dec3c75..4f1b3799315c59a694f20ba010690a54b6e5faa2 100644 (file)
@@ -203,8 +203,7 @@ private:
 
     ConnectResult connect(bool block, const QString &testFile, bool recordFromStart = true,
                           uint flushInterval = 0, bool restrictServices = true,
-                          const QString &executable
-            = QLibraryInfo::location(QLibraryInfo::BinariesPath) + "/qmlscene");
+                          const QString &executable = QStringLiteral(TESTBINDIR "/qmlscene"));
     void checkProcessTerminated();
     void checkTraceReceived();
     void checkJsHeap();
index e290f219863b2abf788695fbbe95741cbda3cacd..25e57d1d4c2412acc29913d7b5245b6a86bf296d 100644 (file)
@@ -99,7 +99,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 d1e74aecefbcec39a70315bbd7c395a326241815..125dc0de26b828ce0893bcfb0dc65e303ad93e70 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 72356a4d84b2dc1b3fd7b0042e0920f6c369d06a..7e6f089597e28cbcde6585d71de9b1bad4aaade8 100644 (file)
@@ -62,7 +62,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 afc00ec72ce6e512758db08b6101656290a5937e..110a496a08435611deb243ec7c782b08bcdf20d5 100644 (file)
@@ -45,7 +45,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 9b3fa8fd2c195f3f24712145fd3c9d60110b7ddf..213b2e118923650f6213c880529c01a674178178 100644 (file)
@@ -166,8 +166,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);