Commit 5af3e012 authored by Dominik Haumann's avatar Dominik Haumann
Browse files

Tabs > "Open Containing Folder" now highlights the file in Dolphin

KDE Frameworks v5.24 is required [optional].
REVIEW: 128729
parent 3586fa5a
......@@ -32,6 +32,11 @@
#include <KAcceleratorManager>
#include <KConfigGroup>
#include <KLocalizedString>
// remove #ifdef, once Kate depends on KF 5.24
#include <kio_version.h>
#if KIO_VERSION >= QT_VERSION_CHECK(5, 24, 0)
#include <KIO/OpenFileManagerWindowJob>
#endif
#include <QApplication>
#include <QClipboard>
......@@ -596,7 +601,11 @@ void KateViewSpace::showContextMenu(int id, const QPoint & globalPos)
} else if (choice == aCopyPath) {
QApplication::clipboard()->setText(doc->url().toDisplayString(QUrl::PreferLocalFile));
} else if (choice == aOpenFolder) {
#if KIO_VERSION >= QT_VERSION_CHECK(5, 24, 0)
KIO::highlightInFileManager({doc->url()});
#else
QDesktopServices::openUrl(doc->url().adjusted(QUrl::RemoveFilename));
#endif
}
}
......
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