mirror of
https://invent.kde.org/system/dolphin
synced 2024-09-17 15:31:20 +00:00
Dolphin: port to CommandLauncherJob
Summary: git master already requires 5.69 anyway, due to KBookmarkMenu API change Test Plan: Builds, Tools / Compare Files works. Reviewers: broulik, elvisangelaccio, meven Reviewed By: elvisangelaccio, meven Subscribers: kfm-devel Tags: #dolphin Differential Revision: https://phabricator.kde.org/D28589
This commit is contained in:
parent
924499a279
commit
40035fe5bf
|
@ -53,6 +53,7 @@
|
||||||
#include <KDualAction>
|
#include <KDualAction>
|
||||||
#include <KFileItemListProperties>
|
#include <KFileItemListProperties>
|
||||||
#include <KHelpMenu>
|
#include <KHelpMenu>
|
||||||
|
#include <KIO/CommandLauncherJob>
|
||||||
#include <KIO/JobUiDelegate>
|
#include <KIO/JobUiDelegate>
|
||||||
#include <KIO/OpenFileManagerWindowJob>
|
#include <KIO/OpenFileManagerWindowJob>
|
||||||
#include <KJobWidgets>
|
#include <KJobWidgets>
|
||||||
|
@ -926,7 +927,10 @@ void DolphinMainWindow::compareFiles()
|
||||||
command.append("\" \"");
|
command.append("\" \"");
|
||||||
command.append(urlB.toDisplayString(QUrl::PreferLocalFile));
|
command.append(urlB.toDisplayString(QUrl::PreferLocalFile));
|
||||||
command.append('\"');
|
command.append('\"');
|
||||||
KRun::runCommand(command, QStringLiteral("Kompare"), QStringLiteral("kompare"), this);
|
|
||||||
|
KIO::CommandLauncherJob *job = new KIO::CommandLauncherJob(command, this);
|
||||||
|
job->setDesktopName(QStringLiteral("org.kde.kompare"));
|
||||||
|
job->start();
|
||||||
}
|
}
|
||||||
|
|
||||||
void DolphinMainWindow::toggleShowMenuBar()
|
void DolphinMainWindow::toggleShowMenuBar()
|
||||||
|
|
|
@ -25,9 +25,9 @@
|
||||||
#include "dolphinviewcontainer.h"
|
#include "dolphinviewcontainer.h"
|
||||||
|
|
||||||
#include <KConfigGroup>
|
#include <KConfigGroup>
|
||||||
#include <KRun>
|
|
||||||
#include <KShell>
|
#include <KShell>
|
||||||
#include <kio/global.h>
|
#include <kio/global.h>
|
||||||
|
#include <KIO/CommandLauncherJob>
|
||||||
#include <KAcceleratorManager>
|
#include <KAcceleratorManager>
|
||||||
|
|
||||||
#include <QApplication>
|
#include <QApplication>
|
||||||
|
@ -334,8 +334,9 @@ void DolphinTabWidget::detachTab(int index)
|
||||||
}
|
}
|
||||||
args << QStringLiteral("--new-window");
|
args << QStringLiteral("--new-window");
|
||||||
|
|
||||||
const QString command = QStringLiteral("dolphin %1").arg(KShell::joinArgs(args));
|
KIO::CommandLauncherJob *job = new KIO::CommandLauncherJob("dolphin", args, this);
|
||||||
KRun::runCommand(command, this);
|
job->setDesktopName(QStringLiteral("org.kde.dolphin"));
|
||||||
|
job->start();
|
||||||
|
|
||||||
closeTab(index);
|
closeTab(index);
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in a new issue