diff options
| author | Emmanuel Pescosta <[email protected]> | 2015-10-21 13:45:01 +0200 |
|---|---|---|
| committer | Emmanuel Pescosta <[email protected]> | 2015-10-21 13:45:01 +0200 |
| commit | 4d6cd761d8987adee511546f644ecf5f357148ad (patch) | |
| tree | 368c5f6379f3042a09e3c6157c8b0558b089112b /src/dolphintabwidget.cpp | |
| parent | cec625daf141276eedb2696edf842e70e7783aab (diff) | |
Fix detach tab not working when path contains spaces.
BUG: 352420
FIXED-IN: 15.08.3
REVIEW: 125587
Diffstat (limited to 'src/dolphintabwidget.cpp')
| -rw-r--r-- | src/dolphintabwidget.cpp | 11 |
1 files changed, 6 insertions, 5 deletions
diff --git a/src/dolphintabwidget.cpp b/src/dolphintabwidget.cpp index ca626d47a..0b1f07e0e 100644 --- a/src/dolphintabwidget.cpp +++ b/src/dolphintabwidget.cpp @@ -25,6 +25,7 @@ #include <QApplication> #include <KConfigGroup> +#include <KShell> #include <kio/global.h> #include <KRun> @@ -255,16 +256,16 @@ void DolphinTabWidget::detachTab(int index) { Q_ASSERT(index >= 0); - const QString separator(QLatin1Char(' ')); - QString command = QLatin1String("dolphin"); + QStringList args; const DolphinTabPage* tabPage = tabPageAt(index); - command += separator + tabPage->primaryViewContainer()->url().url(); + args << tabPage->primaryViewContainer()->url().url(); if (tabPage->splitViewEnabled()) { - command += separator + tabPage->secondaryViewContainer()->url().url(); - command += separator + QLatin1String("-split"); + args << tabPage->secondaryViewContainer()->url().url(); + args << QStringLiteral("--split"); } + const QString command = QStringLiteral("dolphin %1").arg(KShell::joinArgs(args)); KRun::runCommand(command, this); closeTab(index); |
