DeviceShell: Fix compile issues

- fix warning deviceshell.cpp:222:59: warning: suggest braces around
  initialization of subobject
- add missing dependency to app_version to tests

Change-Id: I6d61f26cbc6f51b28175257ab7d0f4d2b491fecb
Reviewed-by: Marcus Tillmanns <marcus.tillmanns@qt.io>
Reviewed-by: Jarek Kobus <jaroslaw.kobus@qt.io>
Reviewed-by: <github-actions-qt-creator@cristianadam.eu>
This commit is contained in:
Eike Ziller
2022-06-07 14:08:37 +02:00
parent ec63e694d8
commit 4ded73583d
3 changed files with 3 additions and 3 deletions

View File

@@ -219,7 +219,7 @@ DeviceShell::RunResult DeviceShell::run(const CommandLine &cmd, const QByteArray
QWaitCondition waiter;
const int id = ++m_currentId;
const auto it = m_commandOutput.insert(id, CommandRun{-1, {}, {}, &waiter});
const auto it = m_commandOutput.insert(id, CommandRun{{-1, {}, {}}, &waiter});
QMetaObject::invokeMethod(m_shellProcess, [this, id, &cmd, &stdInData]() {
const QString command = QString("%1 \"%2\" %3\n")

View File

@@ -3,6 +3,6 @@ file(RELATIVE_PATH TEST_RELATIVE_LIBEXEC_PATH "/${RELATIVE_TEST_PATH}" "/${IDE_L
add_qtc_test(tst_utils_deviceshell
DEFINES "TEST_RELATIVE_LIBEXEC_PATH=\"${TEST_RELATIVE_LIBEXEC_PATH}\""
DEPENDS Utils
DEPENDS Utils app_version
SOURCES tst_deviceshell.cpp
)

View File

@@ -4,7 +4,7 @@ file(RELATIVE_PATH TEST_RELATIVE_LIBEXEC_PATH "/${RELATIVE_TEST_PATH}" "/${IDE_L
add_qtc_test(tst_manual_deviceshell
MANUALTEST
DEFINES "TEST_RELATIVE_LIBEXEC_PATH=\"${TEST_RELATIVE_LIBEXEC_PATH}\""
DEPENDS Utils
DEPENDS Utils app_version
SOURCES
tst_deviceshell.cpp
)