Commit db57bc8d authored by Laurent Montel's avatar Laurent Montel 😁
Browse files

Make it compile without deprecated methods

parent e2483057
Pipeline #47507 passed with stage
in 11 minutes and 53 seconds
......@@ -58,7 +58,7 @@ ecm_setup_version(PROJECT VARIABLE_PREFIX CALENDARSUPPORT
add_definitions(-DQT_DISABLE_DEPRECATED_BEFORE=0x050f00)
add_definitions(-DKF_DISABLE_DEPRECATED_BEFORE_AND_AT=0x054600)
add_definitions(-DKF_DISABLE_DEPRECATED_BEFORE_AND_AT=0x054F00)
set(CMAKE_CXX_STANDARD 14)
set(CMAKE_CXX_STANDARD_REQUIRED ON)
option(USE_UNITY_CMAKE_SUPPORT "Use UNITY cmake support (speedup compile time)" FALSE)
......
......@@ -25,11 +25,12 @@
#include <KLocalizedString>
#include <KMessageBox>
#include <KRun>
#include <KIO/FileCopyJob>
#include <KIO/StatJob>
#include <KJobWidgets>
#include <KJob>
#include <KIO/JobUiDelegate>
#include <KIO/OpenUrlJob>
#include <QFileDialog>
#include <QTemporaryFile>
......@@ -175,10 +176,10 @@ bool AttachmentHandler::view(const Attachment &attachment)
// put the attachment in a temporary file and launch it
QUrl tempUrl = tempFileForAttachment(attachment);
if (tempUrl.isValid()) {
KRun::RunFlags flags;
flags |= KRun::DeleteTemporaryFiles;
flags |= KRun::RunExecutables;
stat = KRun::runUrl(tempUrl, attachment.mimeType(), nullptr, flags);
KIO::OpenUrlJob *job = new KIO::OpenUrlJob(tempUrl, attachment.mimeType());
job->setDeleteTemporaryFile(true);
job->setRunExecutables(true);
job->start();
} else {
stat = false;
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