Commit 3b8a994d authored by Laurent Montel's avatar Laurent Montel 😁
Browse files

Now we depend against kf5.71

parent 291769b7
Pipeline #23594 canceled with stage
......@@ -34,12 +34,8 @@
#include <KLocalizedString>
#include <QMenu>
#include <KMessageBox>
#include <kio_version.h>
#if KIO_VERSION >= QT_VERSION_CHECK(5, 71, 0)
#include <KIO/JobUiDelegate>
#include <KIO/OpenUrlJob>
#endif
#include <KRun>
#include <KIO/ApplicationLauncherJob>
#include <KIO/JobUiDelegate>
#include <KShortcutsDialog>
......@@ -51,6 +47,7 @@
#include <KRecentFilesAction>
#include <KConfigGroup>
#include <KRun>
#include <QContextMenuEvent>
#include <QDir>
......@@ -257,16 +254,10 @@ void KTNEFMain::viewFile()
} else {
qCDebug(KTNEFAPPS_LOG) << "Mime type from attachment object: " << mimename;
}
#if KIO_VERSION < QT_VERSION_CHECK(5, 71, 0)
KRun::RunFlags flags;
flags |= KRun::DeleteTemporaryFiles;
KRun::runUrl(url, mimename, this, flags);
#else
KIO::OpenUrlJob *job = new KIO::OpenUrlJob(url, mimename);
job->setUiDelegate(new KIO::JobUiDelegate(KJobUiDelegate::AutoHandlingEnabled, this));
job->setDeleteTemporaryFile(true);
job->start();
#endif
} else {
KMessageBox::information(
this,
......@@ -517,17 +508,10 @@ void KTNEFMain::slotShowMessageText()
tmpFile->setPermissions(QFile::ReadUser);
tmpFile->write(rtf.toLocal8Bit());
tmpFile->close();
#if KIO_VERSION < QT_VERSION_CHECK(5, 71, 0)
KRun::RunFlags flags;
flags |= KRun::DeleteTemporaryFiles;
KRun::runUrl(QUrl::fromLocalFile(tmpFile->fileName()), QStringLiteral("text/rtf"), this, flags);
#else
KIO::OpenUrlJob *job = new KIO::OpenUrlJob(QUrl::fromLocalFile(tmpFile->fileName()), QStringLiteral("text/rtf"));
job->setUiDelegate(new KIO::JobUiDelegate(KJobUiDelegate::AutoHandlingEnabled, this));
job->setDeleteTemporaryFile(true);
job->start();
#endif
delete tmpFile;
} else {
KMessageBox::error(
......
Markdown is supported
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