┌   ┐
54
└   ┘

summaryrefslogtreecommitdiff
path: root/src/dolphinmainwindow.cpp
diff options
context:
space:
mode:
authorLaurent Montel <[email protected]>2022-10-11 08:46:12 +0200
committerLaurent Montel <[email protected]>2022-10-11 08:46:12 +0200
commit40cc5f665d420071ba6e212c6191c2151f89a065 (patch)
tree34fe48f836ea3e5d4c99f8f752de3708da6a05e8 /src/dolphinmainwindow.cpp
parentd3617c06d47df25f70675e0f051fd7c7f38402bc (diff)
port to KIO::createDefaultJobUiDelegate
Diffstat (limited to 'src/dolphinmainwindow.cpp')
-rw-r--r--src/dolphinmainwindow.cpp9
1 files changed, 9 insertions, 0 deletions
diff --git a/src/dolphinmainwindow.cpp b/src/dolphinmainwindow.cpp
index 496dad6c0..1eed9a016 100644
--- a/src/dolphinmainwindow.cpp
+++ b/src/dolphinmainwindow.cpp
@@ -42,7 +42,12 @@
#include <KDualAction>
#include <KFileItemListProperties>
#include <KIO/CommandLauncherJob>
+#include <kio_version.h>
+#if KIO_VERSION >= QT_VERSION_CHECK(5, 98, 0)
+#include <KIO/JobUiDelegateFactory>
+#else
#include <KIO/JobUiDelegate>
+#endif
#include <KIO/OpenFileManagerWindowJob>
#include <KIO/OpenUrlJob>
#include <KJobWidgets>
@@ -1241,7 +1246,11 @@ void DolphinMainWindow::handleUrl(const QUrl& url)
activeViewContainer()->setUrl(url);
} else {
m_lastHandleUrlOpenJob = new KIO::OpenUrlJob(url);
+#if KIO_VERSION >= QT_VERSION_CHECK(5, 98, 0)
+ m_lastHandleUrlOpenJob->setUiDelegate(KIO::createDefaultJobUiDelegate(KJobUiDelegate::AutoHandlingEnabled, this));
+#else
m_lastHandleUrlOpenJob->setUiDelegate(new KIO::JobUiDelegate(KJobUiDelegate::AutoHandlingEnabled, this));
+#endif
m_lastHandleUrlOpenJob->setShowOpenOrExecuteDialog(true);
connect(m_lastHandleUrlOpenJob, &KIO::OpenUrlJob::mimeTypeFound, this,