Commit 9bdcc8d6 authored by Laurent Montel's avatar Laurent Montel
Browse files

Not necessary check now

parent a064fea3
Pipeline #243810 passed with stage
in 3 minutes and 5 seconds
......@@ -17,7 +17,7 @@ cmake_minimum_required (VERSION 3.16 FATAL_ERROR)
project(Filelight VERSION ${FILELIGHT_VERSION})
set(PROJECT_VERSION ${RELEASE_SERVICE_VERSION})
set(KF5_MIN_VERSION "5.94.0")
set(KF5_MIN_VERSION "5.98.0")
set(QT_REQUIRED_VERSION "5.15.2")
find_package(ECM ${KF5_MIN_VERSION} REQUIRED NO_MODULE)
......
......@@ -30,17 +30,15 @@
#include <KIO/DeleteJob>
#include <KIO/Job> //::mousePressEvent()
#include <kio_version.h>
#if KIO_VERSION >= QT_VERSION_CHECK(5, 98, 0)
#include <KIO/JobUiDelegateFactory>
#endif
#include <KIO/JobUiDelegate>
#include <KIO/JobUiDelegateFactory>
#include <KIO/OpenUrlJob>
#include <KJob>
#include <KLocalizedString>
#include <KMessageBox> //::mousePressEvent()
#include <KTerminalLauncherJob>
#include <KUrlMimeData>
#include <kio_version.h>
#include "fileTree.h"
#include "filelight_debug.h"
......@@ -172,11 +170,7 @@ void RadialMap::Item::mousePressEvent(QMouseEvent *e)
// Open file
if (e->button() == Qt::MiddleButton || (e->button() == Qt::LeftButton && !isDir)) {
auto *job = new KIO::OpenUrlJob(QUrl(url));
#if KIO_VERSION >= QT_VERSION_CHECK(5, 98, 0)
job->setUiDelegate(KIO::createDefaultJobUiDelegate(KJobUiDelegate::AutoHandlingEnabled, nullptr));
#else
job->setUiDelegate(new KIO::JobUiDelegate(KJobUiDelegate::AutoHandlingEnabled, nullptr));
#endif
job->start();
return;
}
......@@ -241,11 +235,7 @@ void RadialMap::Item::mousePressEvent(QMouseEvent *e)
if (openFileManager && clicked == openFileManager) {
auto *job = new KIO::OpenUrlJob(url, QStringLiteral("inode/directory"), nullptr);
#if KIO_VERSION >= QT_VERSION_CHECK(5, 98, 0)
job->setUiDelegate(KIO::createDefaultJobUiDelegate(KJobUiDelegate::AutoHandlingEnabled, nullptr));
#else
job->setUiDelegate(new KIO::JobUiDelegate(KJobUiDelegate::AutoHandlingEnabled, nullptr));
#endif
job->start();
} else if (rescanAction && clicked == rescanAction) {
Q_EMIT rescanRequested(url);
......@@ -264,11 +254,7 @@ void RadialMap::Item::mousePressEvent(QMouseEvent *e)
}
} else if (openFile && clicked == openFile) {
auto *job = new KIO::OpenUrlJob(url);
#if KIO_VERSION >= QT_VERSION_CHECK(5, 98, 0)
job->setUiDelegate(KIO::createDefaultJobUiDelegate(KJobUiDelegate::AutoHandlingEnabled, nullptr));
#else
job->setUiDelegate(new KIO::JobUiDelegate(KJobUiDelegate::AutoHandlingEnabled, nullptr));
#endif
job->start();
} else if (clicked == copyClipboard) {
auto *mimedata = new QMimeData();
......
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