mirror of
https://invent.kde.org/system/dolphin
synced 2024-10-28 03:21:56 +00:00
Fix detach tab not working when path contains spaces.
BUG: 352420 FIXED-IN: 15.08.3 REVIEW: 125587
This commit is contained in:
parent
cec625daf1
commit
4d6cd761d8
|
@ -25,6 +25,7 @@
|
||||||
|
|
||||||
#include <QApplication>
|
#include <QApplication>
|
||||||
#include <KConfigGroup>
|
#include <KConfigGroup>
|
||||||
|
#include <KShell>
|
||||||
#include <kio/global.h>
|
#include <kio/global.h>
|
||||||
#include <KRun>
|
#include <KRun>
|
||||||
|
|
||||||
|
@ -255,16 +256,16 @@ void DolphinTabWidget::detachTab(int index)
|
||||||
{
|
{
|
||||||
Q_ASSERT(index >= 0);
|
Q_ASSERT(index >= 0);
|
||||||
|
|
||||||
const QString separator(QLatin1Char(' '));
|
QStringList args;
|
||||||
QString command = QLatin1String("dolphin");
|
|
||||||
|
|
||||||
const DolphinTabPage* tabPage = tabPageAt(index);
|
const DolphinTabPage* tabPage = tabPageAt(index);
|
||||||
command += separator + tabPage->primaryViewContainer()->url().url();
|
args << tabPage->primaryViewContainer()->url().url();
|
||||||
if (tabPage->splitViewEnabled()) {
|
if (tabPage->splitViewEnabled()) {
|
||||||
command += separator + tabPage->secondaryViewContainer()->url().url();
|
args << tabPage->secondaryViewContainer()->url().url();
|
||||||
command += separator + QLatin1String("-split");
|
args << QStringLiteral("--split");
|
||||||
}
|
}
|
||||||
|
|
||||||
|
const QString command = QStringLiteral("dolphin %1").arg(KShell::joinArgs(args));
|
||||||
KRun::runCommand(command, this);
|
KRun::runCommand(command, this);
|
||||||
|
|
||||||
closeTab(index);
|
closeTab(index);
|
||||||
|
|
Loading…
Reference in a new issue