diff options
| author | Semih Yavuz <semih.yavuz@qt.io> | 2025-07-16 16:57:00 +0200 |
|---|---|---|
| committer | Semih Yavuz <semih.yavuz@qt.io> | 2025-07-31 09:13:41 +0000 |
| commit | 527631109d3abbebd1a4c4e389d202abf023332c (patch) | |
| tree | 2865d2db6c4cacf23b553d8bac49fcc31b890dbe /tests/auto/qml/debugger/shared/debugutil.cpp | |
| parent | 0e67794e730abdf6a9513631510e1f2e4c930bb9 (diff) | |
tst_qqmlpreview: remove dead code
This code was meant to add environment variable to a process before
starting it. However, the "executable" argument refers to the path of the qml tool binary itself, not the path to a qml file. Therefore, comparing it against the QML file path is incorrect and redundant. Instead, extend the function signature of the method where process is started.
Amends 64cd070c8c4bee26c04bf48dcd99a29262a2fd6f.
Change-Id: I6d5e40750fa9f483a6e21ede27980a0abd872d37
Reviewed-by: Sami Shalayel <sami.shalayel@qt.io>
Diffstat (limited to 'tests/auto/qml/debugger/shared/debugutil.cpp')
| -rw-r--r-- | tests/auto/qml/debugger/shared/debugutil.cpp | 5 |
1 files changed, 4 insertions, 1 deletions
diff --git a/tests/auto/qml/debugger/shared/debugutil.cpp b/tests/auto/qml/debugger/shared/debugutil.cpp index 28d40d768d..33a1fd5d19 100644 --- a/tests/auto/qml/debugger/shared/debugutil.cpp +++ b/tests/auto/qml/debugger/shared/debugutil.cpp @@ -102,7 +102,7 @@ void QQmlDebugTestClient::messageReceived(const QByteArray &ba) QQmlDebugTest::ConnectResult QQmlDebugTest::connectTo( const QString &executable, const QString &services, const QString &extraArgs, - bool block) + bool block, QStringList environmentVariables) { QStringList arguments; arguments << QString::fromLatin1("-qmljsdebugger=port:13773,13783%3%4") @@ -114,6 +114,9 @@ QQmlDebugTest::ConnectResult QQmlDebugTest::connectTo( if (!m_process) return ProcessFailed; + for (const QString &env : environmentVariables) + m_process->addEnvironment(env); + m_process->start(QStringList() << arguments); if (!m_process->waitForSessionStart()) return SessionFailed; |
