void-packages/srcpkgs/qt6-declarative/patches/bin-qml-location.patch

207 lines
11 KiB
Diff

--- qt6-declarative-6.4.2.orig/tests/auto/qml/debugger/qqmldebugtranslationclient/tst_qqmldebugtranslationclient.cpp
+++ qt6-declarative-6.4.2/tests/auto/qml/debugger/qqmldebugtranslationclient/tst_qqmldebugtranslationclient.cpp
@@ -71,6 +71,9 @@ private:
m_currentOutputLine = 0;
auto executable = QLibraryInfo::path(QLibraryInfo::BinariesPath) + "/qml";
+ char *build_bin_path = getenv("QT_BUILD_BIN_PATH");
+ if (build_bin_path && *build_bin_path)
+ executable = QString(build_bin_path) + "/qml";
auto services = QQmlDebugTranslationServiceImpl::s_key;
auto extraArgs = testFile(QMLFILE);
auto block = true;
--- qt6-declarative-6.4.2.orig/tests/auto/qml/debugger/qqmlinspector/tst_qqmlinspector.cpp
+++ qt6-declarative-6.4.2/tests/auto/qml/debugger/qqmlinspector/tst_qqmlinspector.cpp
@@ -47,7 +47,11 @@ tst_QQmlInspector::tst_QQmlInspector()
QQmlDebugTest::ConnectResult tst_QQmlInspector::startQmlProcess(const QString &qmlFile,
bool restrictServices)
{
- return QQmlDebugTest::connectTo(QLibraryInfo::path(QLibraryInfo::BinariesPath) + "/qml",
+ auto executable = QLibraryInfo::path(QLibraryInfo::BinariesPath) + "/qml";
+ char *build_bin_path = getenv("QT_BUILD_BIN_PATH");
+ if (build_bin_path && *build_bin_path)
+ executable = QString(build_bin_path) + "/qml";
+ return QQmlDebugTest::connectTo(executable,
restrictServices ? QStringLiteral("QmlInspector") : QString(),
testFile(qmlFile), true);
}
--- qt6-declarative-6.4.2.orig/tests/auto/qml/debugger/qqmlprofilerservice/tst_qqmlprofilerservice.cpp
+++ qt6-declarative-6.4.2/tests/auto/qml/debugger/qqmlprofilerservice/tst_qqmlprofilerservice.cpp
@@ -179,10 +179,18 @@ private:
CheckType = CheckMessageType | CheckDetailType | CheckLine | CheckColumn | CheckFileEndsWith
};
+ static QString QmlScenePath()
+ {
+ char *build_bin_path = getenv("QT_BUILD_BIN_PATH");
+ if (build_bin_path && *build_bin_path)
+ return QString(build_bin_path) + "/qmlscene";
+ return QLibraryInfo::path(QLibraryInfo::BinariesPath) + "/qmlscene";
+ }
+
ConnectResult connectTo(bool block, const QString &file, bool recordFromStart = true,
uint flushInterval = 0, bool restrictServices = true,
const QString &executable
- = QLibraryInfo::path(QLibraryInfo::BinariesPath) + "/qmlscene");
+ = QmlScenePath());
void checkProcessTerminated();
void checkTraceReceived();
void checkJsHeap();
--- qt6-declarative-6.4.2.orig/tests/auto/qml/debugger/qqmldebuggingenabler/qqmldebuggingenabler/tst_qqmldebuggingenabler.cpp
+++ qt6-declarative-6.4.2/tests/auto/qml/debugger/qqmldebuggingenabler/qqmldebuggingenabler/tst_qqmldebuggingenabler.cpp
@@ -85,8 +85,12 @@ void tst_QQmlDebuggingEnabler::qmlscene(
QFETCH(bool, blockMode);
QFETCH(QStringList, services);
- m_process = new QQmlDebugProcess(
- QLibraryInfo::path(QLibraryInfo::BinariesPath) + "/qmlscene", this);
+ auto executable = QLibraryInfo::path(QLibraryInfo::BinariesPath) + "/qmlscene";
+ char *build_bin_path = getenv("QT_BUILD_BIN_PATH");
+ if (build_bin_path && *build_bin_path)
+ executable = QString(build_bin_path) + "/qmlscene";
+
+ m_process = new QQmlDebugProcess(executable, this);
m_process->setMaximumBindErrors(1);
m_process->start(QStringList()
<< QString::fromLatin1("-qmljsdebugger=connector:%1%2%3%4")
--- qt6-declarative-6.4.2.orig/tests/auto/qml/debugger/qqmlenginecontrol/tst_qqmlenginecontrol.cpp
+++ qt6-declarative-6.4.2/tests/auto/qml/debugger/qqmlenginecontrol/tst_qqmlenginecontrol.cpp
@@ -66,7 +66,11 @@ tst_QQmlEngineControl::tst_QQmlEngineCon
QQmlDebugTest::ConnectResult tst_QQmlEngineControl::connectTo(const QString &file,
bool restrictServices)
{
- return QQmlDebugTest::connectTo(QLibraryInfo::path(QLibraryInfo::BinariesPath) + "/qmlscene",
+ auto executable = QLibraryInfo::path(QLibraryInfo::BinariesPath) + "/qmlscene";
+ char *build_bin_path = getenv("QT_BUILD_BIN_PATH");
+ if (build_bin_path && *build_bin_path)
+ executable = QString(build_bin_path) + "/qmlscene";
+ return QQmlDebugTest::connectTo(executable,
restrictServices ? QStringLiteral("EngineControl") : QString(),
testFile(file), true);
}
--- qt6-declarative-6.4.2.orig/tests/auto/qml/debugger/qqmlenginedebuginspectorintegrationtest/tst_qqmlenginedebuginspectorintegration.cpp
+++ qt6-declarative-6.4.2/tests/auto/qml/debugger/qqmlenginedebuginspectorintegrationtest/tst_qqmlenginedebuginspectorintegration.cpp
@@ -70,8 +70,11 @@ tst_QQmlEngineDebugInspectorIntegration:
QQmlDebugTest::ConnectResult tst_QQmlEngineDebugInspectorIntegration::init(bool restrictServices)
{
- return QQmlDebugTest::connectTo(
- QLibraryInfo::path(QLibraryInfo::BinariesPath) + "/qml",
+ auto executable = QLibraryInfo::path(QLibraryInfo::BinariesPath) + "/qml";
+ char *build_bin_path = getenv("QT_BUILD_BIN_PATH");
+ if (build_bin_path && *build_bin_path)
+ executable = QString(build_bin_path) + "/qml";
+ return QQmlDebugTest::connectTo(executable,
restrictServices ? QStringLiteral("QmlDebugger,QmlInspector") : QString(),
testFile("qtquick2.qml"), true);
}
--- qt6-declarative-6.4.2.orig/tests/auto/qml/debugger/qqmlpreview/tst_qqmlpreview.cpp
+++ qt6-declarative-6.4.2/tests/auto/qml/debugger/qqmlpreview/tst_qqmlpreview.cpp
@@ -56,7 +56,11 @@ tst_QQmlPreview::tst_QQmlPreview()
QQmlDebugTest::ConnectResult tst_QQmlPreview::startQmlProcess(const QString &qmlFile)
{
- return QQmlDebugTest::connectTo(QLibraryInfo::path(QLibraryInfo::BinariesPath) + "/qml",
+ auto executable = QLibraryInfo::path(QLibraryInfo::BinariesPath) + "/qml";
+ char *build_bin_path = getenv("QT_BUILD_BIN_PATH");
+ if (build_bin_path && *build_bin_path)
+ executable = QString(build_bin_path) + "/qml";
+ return QQmlDebugTest::connectTo(executable,
QStringLiteral("QmlPreview"), testFile(qmlFile), true);
}
--- qt6-declarative-6.4.2.orig/tests/auto/qml/qmlformat/tst_qmlformat.cpp
+++ qt6-declarative-6.4.2/tests/auto/qml/qmlformat/tst_qmlformat.cpp
@@ -65,6 +65,9 @@ void TestQmlformat::initTestCase()
{
QQmlDataTest::initTestCase();
m_qmlformatPath = QLibraryInfo::path(QLibraryInfo::BinariesPath) + QLatin1String("/qmlformat");
+ char *build_bin_path = getenv("QT_BUILD_BIN_PATH");
+ if (build_bin_path && *build_bin_path)
+ m_qmlformatPath = QLatin1String(build_bin_path) + "/qmlformat";
#ifdef Q_OS_WIN
m_qmlformatPath += QLatin1String(".exe");
#endif
--- qt6-declarative-6.4.2.orig/tests/auto/qml/qmlimportscanner/tst_qmlimportscanner.cpp
+++ qt6-declarative-6.4.2/tests/auto/qml/qmlimportscanner/tst_qmlimportscanner.cpp
@@ -42,6 +42,9 @@ void TestQmlimportscanner::initTestCase(
QQmlDataTest::initTestCase();
m_qmlimportscannerPath = QLibraryInfo::path(QLibraryInfo::LibraryExecutablesPath)
+ QLatin1String("/qmlimportscanner");
+ char *build_libexec = getenv("QT_BUILD_LIBEXEC_PATH");
+ if (build_libexec && *build_libexec)
+ m_qmlimportscannerPath = QLatin1String(build_libexec) + "/qmlimportscanner";
#ifdef Q_OS_WIN
m_qmlimportscannerPath += QLatin1String(".exe");
#endif
--- qt6-declarative-6.4.2.orig/tests/auto/qml/qmllint/tst_qmllint.cpp
+++ qt6-declarative-6.4.2/tests/auto/qml/qmllint/tst_qmllint.cpp
@@ -159,10 +159,18 @@ void TestQmllint::initTestCase()
{
QQmlDataTest::initTestCase();
m_qmllintPath = QLibraryInfo::path(QLibraryInfo::BinariesPath) + QLatin1String("/qmllint");
+ char *build_bin = getenv("QT_BUILD_BIN_PATH");
+ if (build_bin && *build_bin)
+ m_qmllintPath = QLatin1String(build_bin) + "/qmllint";
m_qmljsrootgenPath = QLibraryInfo::path(QLibraryInfo::LibraryExecutablesPath)
+ QLatin1String("/qmljsrootgen");
m_qmltyperegistrarPath = QLibraryInfo::path(QLibraryInfo::LibraryExecutablesPath)
+ QLatin1String("/qmltyperegistrar");
+ char *build_libexec = getenv("QT_BUILD_LIBEXEC_PATH");
+ if (build_libexec && *build_libexec) {
+ m_qmljsrootgenPath = QLatin1String(build_libexec) + "/qmljsrootgen";
+ m_qmltyperegistrarPath = QLatin1String(build_libexec) + "/qmltypesregistrar";
+ }
#ifdef Q_OS_WIN
m_qmllintPath += QLatin1String(".exe");
m_qmljsrootgenPath += QLatin1String(".exe");
--- qt6-declarative-6.4.2.orig/tests/auto/qml/debugger/qdebugmessageservice/tst_qdebugmessageservice.cpp
+++ qt6-declarative-6.4.2/tests/auto/qml/debugger/qdebugmessageservice/tst_qdebugmessageservice.cpp
@@ -118,7 +118,11 @@ tst_QDebugMessageService::tst_QDebugMess
void tst_QDebugMessageService::retrieveDebugOutput()
{
- QCOMPARE(QQmlDebugTest::connectTo(QLibraryInfo::path(QLibraryInfo::BinariesPath) + "/qml",
+ auto executable = QLibraryInfo::path(QLibraryInfo::BinariesPath) + "/qml";
+ char *build_bin_path = getenv("QT_BUILD_BIN_PATH");
+ if (build_bin_path && *build_bin_path)
+ executable = QString(build_bin_path) + "/qml";
+ QCOMPARE(QQmlDebugTest::connectTo(executable,
QString(), testFile(QMLFILE), true), ConnectSuccess);
QTRY_VERIFY(m_client->logBuffer.size() >= 2);
--- qt6-declarative-6.4.2.orig/tests/auto/qml/qmlplugindump/tst_qmlplugindump.cpp
+++ qt6-declarative-6.4.2/tests/auto/qml/qmlplugindump/tst_qmlplugindump.cpp
@@ -38,6 +38,9 @@ void tst_qmlplugindump::initTestCase()
{
QQmlDataTest::initTestCase();
qmlplugindumpPath = QLibraryInfo::path(QLibraryInfo::BinariesPath);
+ char *build_bin_path = getenv("QT_BUILD_BIN_PATH");
+ if (build_bin_path && *build_bin_path)
+ qmlplugindumpPath = build_bin_path;
#if defined(Q_OS_WIN)
qmlplugindumpPath += QLatin1String("/qmlplugindump.exe");
--- qt6-declarative-6.4.2.orig/tests/auto/qml/debugger/qqmldebugjs/tst_qqmldebugjs.cpp
+++ qt6-declarative-6.4.2/tests/auto/qml/debugger/qqmldebugjs/tst_qqmldebugjs.cpp
@@ -163,11 +163,18 @@ void tst_QQmlDebugJS::initTestCase()
QQmlDebugTest::initTestCase();
}
#include <iostream>
+static QString qmlScenePath()
+{
+ char *build_bin_path = getenv("QT_BUILD_BIN_PATH");
+ if (build_bin_path && *build_bin_path)
+ return QString(build_bin_path) + "/qmlscene";
+ return QLibraryInfo::path(QLibraryInfo::BinariesPath) + "/qmlscene";
+}
QQmlDebugTest::ConnectResult tst_QQmlDebugJS::init(bool qmlscene, const QString &qmlFile,
bool blockMode, bool restrictServices)
{
const QString executable = qmlscene
- ? QLibraryInfo::path(QLibraryInfo::BinariesPath) + "/qmlscene"
+ ? qmlScenePath()
: debugJsServerPath("qqmldebugjs");
return QQmlDebugTest::connectTo(
executable, restrictServices ? QStringLiteral("V8Debugger") : QString(),