aboutsummaryrefslogtreecommitdiff
path: root/src/plugins/General/converter/converterdialog.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'src/plugins/General/converter/converterdialog.cpp')
-rw-r--r--src/plugins/General/converter/converterdialog.cpp12
1 files changed, 8 insertions, 4 deletions
diff --git a/src/plugins/General/converter/converterdialog.cpp b/src/plugins/General/converter/converterdialog.cpp
index bfd4a6211..19383772b 100644
--- a/src/plugins/General/converter/converterdialog.cpp
+++ b/src/plugins/General/converter/converterdialog.cpp
@@ -340,13 +340,17 @@ QString ConverterDialog::uniqueName(const QString &name)
bool ConverterDialog::checkPreset(const QVariantMap &preset)
{
- QStringList programAndArgs = preset["command"].toString().split(" ", QString::SkipEmptyParts);
- if(programAndArgs.isEmpty())
+#if (QT_VERSION >= QT_VERSION_CHECK(5, 15, 0))
+ QStringList tokens = QProcess::splitCommand(preset["command"].toString());
+#else
+ QStringList tokens = preset["command"].toString().split(" ", QString::SkipEmptyParts);
+#endif
+ if(tokens.isEmpty())
return false;
- QString program = programAndArgs.first();
+ QString program = tokens.takeFirst();
- int result = QProcess::execute(program);
+ int result = QProcess::execute(program, tokens);
if(result == -2)
{