Commit 8ba04f89 authored by Martin Flöser's avatar Martin Flöser
Browse files

Use platform detection from KWorkspace in Powerdevil

Summary: On a wayland session powerdevil needs to use Wayland platform.

Test Plan:
Only compile tested, changes are identical to the tested
systemsettings patch.

Reviewers: #plasma

Subscribers: plasma-devel

Tags: #plasma

Differential Revision: https://phabricator.kde.org/D11446
parent ab814866
......@@ -50,6 +50,8 @@ add_feature_info(
"Support turning off signal-transmitting devices to save energy"
)
find_package(LibKWorkspace ${PROJECT_VERSION} REQUIRED)
find_package(UDev REQUIRED)
find_package(XCB REQUIRED COMPONENTS XCB RANDR DPMS)
......
......@@ -124,6 +124,7 @@ target_link_libraries(powerdevil
KF5::CoreAddons
KF5::I18n
KF5::DBusAddons
PW::KWorkspace
powerdevilcore
)
if (XCB_FOUND)
......
......@@ -42,6 +42,8 @@
#include <KConfigGroup>
#include <KGlobalAccel>
#include <kworkspace.h>
PowerDevilApp::PowerDevilApp(int &argc, char **argv)
: QGuiApplication(argc, argv)
, m_core(nullptr)
......@@ -195,6 +197,7 @@ void PowerDevilApp::migratePre512KeyboardShortcuts()
int main(int argc, char **argv)
{
QGuiApplication::setDesktopSettingsAware(false);
KWorkSpace::detectPlatform(argc, argv);
PowerDevilApp app(argc, argv);
KDBusService service(KDBusService::Unique);
......
Supports Markdown
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