Skip to content

Commit

Permalink
Use platform detection from KWorkspace in Powerdevil
Browse files Browse the repository at this point in the history
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
  • Loading branch information
mgraesslin committed Mar 18, 2018
1 parent ab81486 commit 8ba04f8
Show file tree
Hide file tree
Showing 3 changed files with 6 additions and 0 deletions.
2 changes: 2 additions & 0 deletions CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -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)
Expand Down
1 change: 1 addition & 0 deletions daemon/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -124,6 +124,7 @@ target_link_libraries(powerdevil
KF5::CoreAddons
KF5::I18n
KF5::DBusAddons
PW::KWorkspace
powerdevilcore
)
if (XCB_FOUND)
Expand Down
3 changes: 3 additions & 0 deletions daemon/powerdevilapp.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -42,6 +42,8 @@
#include <KConfigGroup>
#include <KGlobalAccel>

#include <kworkspace.h>

PowerDevilApp::PowerDevilApp(int &argc, char **argv)
: QGuiApplication(argc, argv)
, m_core(nullptr)
Expand Down Expand Up @@ -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);
Expand Down

0 comments on commit 8ba04f8

Please sign in to comment.