Commit 17154702 authored by Alexander Lohnau's avatar Alexander Lohnau 💬
Browse files

kcms/runners: Move plasmasearch/krunner/plugininstaller to their own subdirs

This also fixes the plasmasearch KCM pretending to be changed when only the
KRunner specific options have been changed.
parent 82bd5f37
# KI18N Translation Domain for this library
add_definitions(-DTRANSLATION_DOMAIN=\"kcm_search\")
# Search Config Module
set(kcm_search_SRCS
kcm.cpp
krunnerdata.cpp
)
add_subdirectory(krunner)
add_subdirectory(plasmasearch)
add_subdirectory(plugininstaller)
kconfig_add_kcfg_files(kcm_search_SRCS krunnersettingsbase.kcfgc)
add_library(kcm_plasmasearch MODULE ${kcm_search_SRCS})
add_executable(plugininstaller
plugininstaller/main.cpp
plugininstaller/AbstractJob.cpp
plugininstaller/ScriptJob.cpp
plugininstaller/ZypperRPMJob.cpp)
if(HAVE_PACKAGEKIT)
target_sources(plugininstaller PUBLIC plugininstaller/PackageKitJob.cpp)
endif()
set_target_properties(plugininstaller PROPERTIES
OUTPUT_NAME "krunner-plugininstaller"
)
target_link_libraries(kcm_plasmasearch
KF5::CoreAddons
KF5::KCMUtils
KF5::Runner
KF5::I18n
KF5::NewStuffWidgets
Qt::DBus
Qt::Widgets
)
target_link_libraries(plugininstaller
KF5::CoreAddons
KF5::I18n
Qt::Widgets
KF5::Service
KF5::KIOCore
KF5::KIOWidgets
)
if(HAVE_PACKAGEKIT)
target_link_libraries(plugininstaller PK::packagekitqt5)
endif()
install(FILES kcm_krunnersettings.desktop kcm_plasmasearch.desktop DESTINATION ${KDE_INSTALL_APPDIR})
install(TARGETS kcm_plasmasearch DESTINATION ${KDE_INSTALL_PLUGINDIR}/plasma/kcms/systemsettings_qwidgets)
install(FILES krunner.knsrc DESTINATION ${KDE_INSTALL_KNSRCDIR})
install(TARGETS plugininstaller DESTINATION ${KDE_INSTALL_TARGETS_DEFAULT_ARGS})
# KRunner Settings Module
set(kcm_krunnersettings_SRCS
krunnersettings.cpp
krunnersettingsdata.cpp
)
kcmutils_generate_module_data(
kcm_krunnersettings_SRCS
MODULE_DATA_HEADER krunnersettingsdata.h
MODULE_DATA_CLASS_NAME KRunnerSettingsData
SETTINGS_HEADERS krunnersettingsbase.h
SETTINGS_CLASSES KRunnerSettingsBase
)
kconfig_add_kcfg_files(kcm_krunnersettings_SRCS krunnersettingsbase.kcfgc GENERATE_MOC)
kcoreaddons_add_plugin(kcm_krunnersettings SOURCES ${kcm_krunnersettings_SRCS} INSTALL_NAMESPACE "plasma/kcms/desktop")
target_link_libraries(kcm_krunnersettings
KF5::Activities
KF5::ConfigCore
KF5::I18n
KF5::KCMUtils
KF5::QuickAddons
Qt::DBus
)
install(FILES krunnersettingsbase.kcfg DESTINATION ${KDE_INSTALL_KCFGDIR})
kpackage_install_package(package kcm_krunnersettings kcms)
# KRunner Settings Module
set(kcm_krunnersettings_SRCS
krunnersettings.cpp
krunnersettingsdata.cpp
)
kcmutils_generate_module_data(
kcm_krunnersettings_SRCS
MODULE_DATA_HEADER krunnersettingsdata.h
MODULE_DATA_CLASS_NAME KRunnerSettingsData
SETTINGS_HEADERS krunnersettingsbase.h
SETTINGS_CLASSES KRunnerSettingsBase
)
kconfig_add_kcfg_files(kcm_krunnersettings_SRCS krunnersettingsbase.kcfgc GENERATE_MOC)
kcoreaddons_add_plugin(kcm_krunnersettings SOURCES ${kcm_krunnersettings_SRCS} INSTALL_NAMESPACE "plasma/kcms/desktop")
target_link_libraries(kcm_krunnersettings
KF5::Activities
KF5::ConfigCore
KF5::I18n
KF5::KCMUtils
KF5::QuickAddons
Qt::DBus
)
install(FILES krunnersettingsbase.kcfg DESTINATION ${KDE_INSTALL_KCFGDIR})
kpackage_install_package(package kcm_krunnersettings kcms)
install(FILES kcm_krunnersettings.desktop DESTINATION ${KDE_INSTALL_APPDIR})
add_library(kcm_plasmasearch MODULE kcm.cpp krunnerdata.cpp)
target_link_libraries(kcm_plasmasearch
KF5::CoreAddons
KF5::KCMUtils
KF5::Runner
KF5::I18n
KF5::NewStuffWidgets
Qt::DBus
Qt::Widgets
)
install(TARGETS kcm_plasmasearch DESTINATION ${KDE_INSTALL_PLUGINDIR}/plasma/kcms/systemsettings_qwidgets)
install(FILES kcm_plasmasearch.desktop DESTINATION ${KDE_INSTALL_APPDIR})
......@@ -13,14 +13,10 @@
#include <KPluginInfo>
#include <KRunner/RunnerManager>
#include "krunnersettingsbase.h"
KRunnerData::KRunnerData(QObject *parent, const QVariantList &args)
: KCModuleData(parent, args)
, m_krunnerConfig(KSharedConfig::openConfig("krunnerrc"))
, m_settings(new KRunnerSettingsBase(this))
{
m_settings->load();
}
bool KRunnerData::isDefaults() const
......@@ -34,5 +30,5 @@ bool KRunnerData::isDefaults() const
return false;
}
return m_settings->isDefaults();
return true;
}
......@@ -12,8 +12,6 @@
#include <KCModuleData>
#include <KSharedConfig>
class KRunnerSettingsBase;
class KRunnerData : public KCModuleData
{
Q_OBJECT
......@@ -24,7 +22,6 @@ public:
private:
KSharedConfigPtr m_krunnerConfig;
KRunnerSettingsBase *m_settings;
};
#endif // KRUNNERDATA_H
add_executable(krunner-plugininstaller
main.cpp
AbstractJob.cpp
ScriptJob.cpp
ZypperRPMJob.cpp)
if(HAVE_PACKAGEKIT)
target_sources(krunner-plugininstaller PUBLIC PackageKitJob.cpp)
endif()
target_link_libraries(krunner-plugininstaller
KF5::CoreAddons
KF5::I18n
Qt::Widgets
KF5::Service
KF5::KIOCore
KF5::KIOWidgets
)
if(HAVE_PACKAGEKIT)
target_link_libraries(krunner-plugininstaller PK::packagekitqt5)
endif()
install(TARGETS krunner-plugininstaller DESTINATION ${KDE_INSTALL_TARGETS_DEFAULT_ARGS})
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