Commit 4f13a582 authored by David Faure's avatar David Faure

Port to ApplicationLauncherJob

parent 9cbb5374
......@@ -3,7 +3,7 @@ project(plasma-phone-components)
# minimal requirements
cmake_minimum_required (VERSION 2.8.12 FATAL_ERROR)
set (QT_MIN_VERSION "5.12.0")
set(KF5_MIN_VERSION "5.66.0")
set(KF5_MIN_VERSION "5.70.0")
set(CMAKE_AUTOMOC ON)
set(CMAKE_INCLUDE_CURRENT_DIR ON)
......@@ -33,6 +33,7 @@ find_package(KF5 ${KF5_MIN_VERSION} REQUIRED COMPONENTS
Plasma
PlasmaQuick
Service
Notifications
)
find_package(KF5Wayland CONFIG)
set_package_properties(KF5Wayland PROPERTIES
......
......@@ -15,7 +15,8 @@ target_link_libraries(plasma_containment_phone_homescreen
Qt5::Quick
KF5::I18n
KF5::Service
KF5::KIOWidgets
KF5::KIOGui
KF5::Notifications
)
......
......@@ -24,15 +24,16 @@
#include <QByteArray>
#include <QModelIndex>
#include <QProcess>
#include <QDebug>
// KDE
#include <KIO/ApplicationLauncherJob>
#include <KNotificationJobUiDelegate>
#include <KService>
#include <KServiceGroup>
#include <KSharedConfig>
#include <KSycoca>
#include <KSycocaEntry>
#include <KIOWidgets/KRun>
#include <QDebug>
constexpr int MAX_FAVOURITES = 5;
......@@ -325,8 +326,9 @@ void ApplicationListModel::runApplication(const QString &storageId)
}
KService::Ptr service = KService::serviceByStorageId(storageId);
KRun::runService(*service, QList<QUrl>(), nullptr);
KIO::ApplicationLauncherJob *job = new KIO::ApplicationLauncherJob(service);
job->setUiDelegate(new KNotificationJobUiDelegate(KJobUiDelegate::AutoHandlingEnabled));
job->start();
}
int ApplicationListModel::maxFavoriteCount() const
......
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