diff --git a/CMakeLists.txt b/CMakeLists.txt index 29f5d2d..16dd89e 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -20,7 +20,7 @@ cmake_minimum_required(VERSION 3.1 FATAL_ERROR) # Dependencies set(QT_MIN_VERSION "5.10.0") -set(KF5_MIN_VERSION "5.56") +set(KF5_MIN_VERSION "5.71") set(KPMCORE_MIN_VERSION "4.1.0") set(CMAKE_USE_RELATIVE_PATHS OFF) diff --git a/src/gui/applyprogressdialog.cpp b/src/gui/applyprogressdialog.cpp index a3f7412..2650933 100644 --- a/src/gui/applyprogressdialog.cpp +++ b/src/gui/applyprogressdialog.cpp @@ -43,8 +43,8 @@ #include #include -#include #include +#include #include #include #include @@ -440,8 +440,6 @@ void ApplyProgressDialog::browserReport() { QTemporaryFile file; - // Make sure the temp file is created somewhere another user can read it: KRun::runUrl() will open - // the file as the logged in user, not as the user running our application. file.setFileTemplate(QStringLiteral("/tmp/") + QCoreApplication::applicationName() + QStringLiteral("-XXXXXX.html")); file.setAutoRemove(false); @@ -454,11 +452,10 @@ void ApplyProgressDialog::browserReport() << report().toHtml() << html.footer(); - // set the temp file's permission for everyone to read it. - file.setPermissions(QFile::ReadOwner | QFile::WriteOwner | QFile::ReadGroup | QFile::ReadOther); + file.setPermissions(QFile::ReadOwner | QFile::WriteOwner); - if (!KRun::runUrl(QUrl::fromLocalFile(file.fileName()), QStringLiteral("text/html"), this, KRun::RunFlags())) - KMessageBox::sorry(this, xi18nc("@info", "The configured external browser could not be run. Please check your settings."), xi18nc("@title:window", "Could Not Launch Browser.")); + auto *job = new KIO::OpenUrlJob(QUrl::fromLocalFile(file.fileName()), QStringLiteral("text/html"), this); + job->start(); } else KMessageBox::sorry(this, xi18nc("@info", "Could not create temporary file %1 for writing.", file.fileName()), i18nc("@title:window", "Could Not Launch Browser.")); }