diff --git a/gui/resultstree.cpp b/gui/resultstree.cpp index 15af157faf1..cc3cce68bb7 100644 --- a/gui/resultstree.cpp +++ b/gui/resultstree.cpp @@ -1028,14 +1028,22 @@ void ResultsTree::startApplication(const QStandardItem *target, int application) } #endif // Q_OS_WIN +#if (QT_VERSION < QT_VERSION_CHECK(6, 0, 0)) const QString cmdLine = QString("%1 %2").arg(program).arg(params); +#endif // this is reported as deprecated in Qt 5.15.2 but no longer in Qt 6 #if (QT_VERSION < QT_VERSION_CHECK(6, 0, 0)) SUPPRESS_WARNING_CLANG_PUSH("-Wdeprecated") SUPPRESS_WARNING_GCC_PUSH("-Wdeprecated-declarations") #endif + +#if (QT_VERSION < QT_VERSION_CHECK(6, 0, 0)) const bool success = QProcess::startDetached(cmdLine); +#else + const bool success = QProcess::startDetached(program, QProcess::splitCommand(params)); +#endif + #if (QT_VERSION < QT_VERSION_CHECK(6, 0, 0)) SUPPRESS_WARNING_GCC_POP SUPPRESS_WARNING_CLANG_POP