Commit 64c8456c authored by Oleg Solovyov's avatar Oleg Solovyov 🐴
Browse files

Fix passing arguments to QProcess::startDetached()

parent 8be97192
...@@ -461,7 +461,9 @@ void KDFWidget::contextMenuRequested( const QPoint &p ) ...@@ -461,7 +461,9 @@ void KDFWidget::contextMenuRequested( const QPoint &p )
{ {
cmd += QLatin1Char( ' ' ) + KShell::quoteArg(disk->mountPoint()); cmd += QLatin1Char( ' ' ) + KShell::quoteArg(disk->mountPoint());
} }
QProcess::startDetached(cmd, QStringList()); QStringList argList = cmd.split(QLatin1Char( ' ' ), Qt::SkipEmptyParts);
cmd = argList.takeFirst();
QProcess::startDetached(cmd, argList);
} }
} }
......
...@@ -253,7 +253,9 @@ void KwikDisk::toggleMount(QAction * action) ...@@ -253,7 +253,9 @@ void KwikDisk::toggleMount(QAction * action)
{ {
cmd += QLatin1Char( ' ' ) + KShell::quoteArg(disk->mountPoint()); cmd += QLatin1Char( ' ' ) + KShell::quoteArg(disk->mountPoint());
} }
QProcess::startDetached(cmd, QStringList()); QStringList argList = cmd.split(QLatin1Char( ' ' ), Qt::SkipEmptyParts);
cmd = argList.takeFirst();
QProcess::startDetached(cmd, argList);
} }
} }
m_dirty = true; m_dirty = true;
......
Supports Markdown
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment