diff options
Diffstat (limited to 'src/dolphinmainwindow.cpp')
| -rw-r--r-- | src/dolphinmainwindow.cpp | 9 |
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, |
