kpowercontrol: build fix

Signed-off-by: Ivailo Monev <xakepa10@gmail.com>
This commit is contained in:
Ivailo Monev 2023-07-08 18:09:14 +03:00
parent a610fa5881
commit d1aa718616
2 changed files with 5 additions and 12 deletions

View file

@ -1,8 +1,8 @@
project(kpowercontrol)
if(${CMAKE_SOURCE_DIR} STREQUAL ${CMAKE_CURRENT_SOURCE_DIR})
find_package(KDE4 4.21.0 REQUIRED)
include(KDE4Defaults)
find_package(KDELibs4 4.21.0 REQUIRED)
include_directories(${KDE4_INCLUDES})
add_definitions(${QT_DEFINITIONS} ${KDE4_DEFINITIONS})
endif()
@ -17,9 +17,9 @@ set(kpowercontrol_SRCS
add_executable(kpowercontrol ${kpowercontrol_SRCS})
target_link_libraries(kpowercontrol
${KDE4_KDEUI_LIBS}
${KDE4_KPOWERMANAGER_LIBS}
${KDE4_SOLID_LIBS}
KDE4::kdeui
KDE4::kpowermanager
KDE4::solid
)
install(TARGETS kpowercontrol ${INSTALL_TARGETS_DEFAULT_ARGS})

View file

@ -88,13 +88,6 @@ KPowerControl::KPowerControl(QObject* parent)
i18n("Power management is not supported on this system"),
"dialog-error"
);
} else if (!KPowerManager::isEnabled()) {
setOverlayIconByName("dialog-error");
showMessage(
i18n("Power management"),
i18n("Power manager is disabled"),
"dialog-information"
);
} else {
connect(
&m_powermanager, SIGNAL(profileChanged(QString)),