1
0
mirror of https://github.com/KDE/latte-dock.git synced 2025-02-13 21:57:40 +03:00

respect kde frameworks less than 71

This commit is contained in:
Michail Vourlakos 2021-05-02 20:35:47 +03:00
parent 422c2f9d83
commit e9120d5507

View File

@ -21,6 +21,7 @@
#include "viewscontroller.h"
// local
#include <config-latte.h>
#include "ui_viewsdialog.h"
#include "viewsdialog.h"
#include "viewshandler.h"
@ -44,7 +45,12 @@
// KDE
#include <KMessageWidget>
#include <KIO/OpenUrlJob>
#if KF5_VERSION_MINOR >= 71
#include <KIO/OpenUrlJob>
#else
#include <KRun>
#endif
namespace Latte {
namespace Settings {
@ -598,8 +604,12 @@ void Views::showDefaultPersistentErrorWarningInlineMessage(const QString &messag
QString file = openlayoutaction->data().toString();
if (!file.isEmpty()) {
#if KF5_VERSION_MINOR >= 71
auto job = new KIO::OpenUrlJob(QUrl::fromLocalFile(file), QStringLiteral("text/plain"), this);
job->start();
#else
KRun::runUrl(QUrl::fromLocalFile(file), QStringLiteral("text/plain"), m_view);
#endif
}
});
}