Skip to content

Commit

Permalink
fixed #13238 - GUI: Fix start application with Qt6 (#6931)
Browse files Browse the repository at this point in the history
  • Loading branch information
luis-pereira authored Oct 17, 2024
1 parent 9287d3f commit b8c110c
Showing 1 changed file with 8 additions and 0 deletions.
8 changes: 8 additions & 0 deletions gui/resultstree.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down

0 comments on commit b8c110c

Please sign in to comment.