Verified Commit 59b075a8 authored by Alexander Lohnau's avatar Alexander Lohnau 💬
Browse files

Use KPluginMetaData to load KCMs in KCMultiDialog

Task: https://phabricator.kde.org/T14501
parent 507cc743
......@@ -155,25 +155,25 @@ kcoreaddons_desktop_to_json(kcm_knote_static "data/knote_config_misc.desktop" SE
# Create the individual KCMs
kcoreaddons_add_plugin(kcm_knote_action SOURCES kcm_knote_action.cpp INSTALL_NAMESPACE "kcms")
kcoreaddons_add_plugin(kcm_knote_action SOURCES kcm_knote_action.cpp INSTALL_NAMESPACE "pim/kcms/knotes")
target_link_libraries(kcm_knote_action kcm_knote_static)
kcoreaddons_add_plugin(kcm_knote_display SOURCES kcm_knote_display.cpp INSTALL_NAMESPACE "kcms")
kcoreaddons_add_plugin(kcm_knote_display SOURCES kcm_knote_display.cpp INSTALL_NAMESPACE "pim/kcms/knotes")
target_link_libraries(kcm_knote_display kcm_knote_static)
kcoreaddons_add_plugin(kcm_knote_editor SOURCES kcm_knote_editor.cpp INSTALL_NAMESPACE "kcms")
kcoreaddons_add_plugin(kcm_knote_editor SOURCES kcm_knote_editor.cpp INSTALL_NAMESPACE "pim/kcms/knotes")
target_link_libraries(kcm_knote_editor kcm_knote_static)
kcoreaddons_add_plugin(kcm_knote_network SOURCES kcm_knote_network.cpp INSTALL_NAMESPACE "kcms")
kcoreaddons_add_plugin(kcm_knote_network SOURCES kcm_knote_network.cpp INSTALL_NAMESPACE "pim/kcms/knotes")
target_link_libraries(kcm_knote_network kcm_knote_static)
kcoreaddons_add_plugin(kcm_knote_print SOURCES kcm_knote_print.cpp INSTALL_NAMESPACE "kcms")
kcoreaddons_add_plugin(kcm_knote_print SOURCES kcm_knote_print.cpp INSTALL_NAMESPACE "pim/kcms/knotes")
target_link_libraries(kcm_knote_print kcm_knote_static)
kcoreaddons_add_plugin(kcm_knote_collection SOURCES kcm_knote_collection.cpp INSTALL_NAMESPACE "kcms")
kcoreaddons_add_plugin(kcm_knote_collection SOURCES kcm_knote_collection.cpp INSTALL_NAMESPACE "pim/kcms/knotes")
target_link_libraries(kcm_knote_collection kcm_knote_static)
kcoreaddons_add_plugin(kcm_knote_misc SOURCES kcm_knote_misc.cpp INSTALL_NAMESPACE "kcms")
kcoreaddons_add_plugin(kcm_knote_misc SOURCES kcm_knote_misc.cpp INSTALL_NAMESPACE "pim/kcms/knotes")
target_link_libraries(kcm_knote_misc kcm_knote_static)
########### install files ###############
......
......@@ -18,6 +18,8 @@
#include <KAuthorized>
#include <KLocalizedString>
#include <KNS3/DownloadDialog>
#include <KPluginLoader>
#include <KPluginMetaData>
#include <QCheckBox>
#include <QLabel>
......@@ -35,16 +37,12 @@ KNoteConfigDialog::KNoteConfigDialog(const QString &title, QWidget *parent)
button(QDialogButtonBox::Ok)->setDefault(true);
setWindowTitle(title);
addModule(QStringLiteral("knote_config_display"));
addModule(QStringLiteral("knote_config_editor"));
addModule(QStringLiteral("knote_config_action"));
addModule(QStringLiteral("knote_config_network"));
addModule(QStringLiteral("knote_config_print"));
addModule(QStringLiteral("knote_config_collection"));
addModule(QStringLiteral("knote_config_misc"));
const QVector<KPluginMetaData> availablePlugins = KPluginLoader::findPlugins(QStringLiteral("pim/kcms/knotes"));
for (const KPluginMetaData &metaData : availablePlugins) {
addModule(metaData);
}
connect(button(QDialogButtonBox::Ok), &QPushButton::clicked, this, &KNoteConfigDialog::slotOk);
connect(button(QDialogButtonBox::RestoreDefaults), &QPushButton::clicked, this, &KNoteConfigDialog::slotDefaultClicked);
}
......
......@@ -4,12 +4,12 @@ Type=Service
X-KDE-ServiceTypes=KCModule
X-KDE-ModuleType=Library
X-KDE-Library=kcms/kcm_knote_action
X-KDE-Library=pim/kcms/knotes/kcm_knote_action
X-KDE-HasReadOnlyMode=false
X-KDE-ParentApp=knotes
X-KDE-ParentComponents=knotes,kontact_knotesplugin
X-KDE-CfgDlgHierarchy=KNotes
X-KDE-Weight=200
X-KDE-Weight=100
Name=Actions
Name[ar]=الإجراءات
......
......@@ -4,12 +4,12 @@ Type=Service
X-KDE-ServiceTypes=KCModule
X-KDE-ModuleType=Library
X-KDE-Library=kcms/kcm_knote_collection
X-KDE-Library=pim/kcms/knotes/kcm_knote_collection
X-KDE-HasReadOnlyMode=false
X-KDE-ParentApp=knotes
X-KDE-ParentComponents=knotes,kontact_knotesplugin
X-KDE-CfgDlgHierarchy=KNotes
X-KDE-Weight=200
X-KDE-Weight=175
Name=Collections
Name[ar]=التّجميعات
......
......@@ -4,12 +4,12 @@ Type=Service
X-KDE-ServiceTypes=KCModule
X-KDE-ModuleType=Library
X-KDE-Library=kcms/kcm_knote_display
X-KDE-Library=pim/kcms/knotes/kcm_knote_display
X-KDE-HasReadOnlyMode=false
X-KDE-ParentApp=knotes
X-KDE-ParentComponents=knotes,kontact_knotesplugin
X-KDE-CfgDlgHierarchy=KNotes
X-KDE-Weight=200
X-KDE-Weight=50
Name=Display
Name[ar]=العرض
......
......@@ -4,12 +4,12 @@ Type=Service
X-KDE-ServiceTypes=KCModule
X-KDE-ModuleType=Library
X-KDE-Library=kcms/kcm_knote_editor
X-KDE-Library=pim/kcms/knotes/kcm_knote_editor
X-KDE-HasReadOnlyMode=false
X-KDE-ParentApp=knotes
X-KDE-ParentComponents=knotes,kontact_knotesplugin
X-KDE-CfgDlgHierarchy=KNotes
X-KDE-Weight=200
X-KDE-Weight=75
Name=Editor
Name[ar]=المحرّر
......
......@@ -4,7 +4,7 @@ Type=Service
X-KDE-ServiceTypes=KCModule
X-KDE-ModuleType=Library
X-KDE-Library=kcms/kcm_knote_misc
X-KDE-Library=pim/kcms/knotes/kcm_knote_misc
X-KDE-HasReadOnlyMode=false
X-KDE-ParentApp=knotes
X-KDE-ParentComponents=knotes,kontact_knotesplugin
......
......@@ -4,12 +4,12 @@ Type=Service
X-KDE-ServiceTypes=KCModule
X-KDE-ModuleType=Library
X-KDE-Library=kcms/kcm_knote_network
X-KDE-Library=pim/kcms/knotes/kcm_knote_network
X-KDE-HasReadOnlyMode=false
X-KDE-ParentApp=knotes
X-KDE-ParentComponents=knotes,kontact_knotesplugin
X-KDE-CfgDlgHierarchy=KNotes
X-KDE-Weight=200
X-KDE-Weight=125
Name=Network
Name[ar]=الشّبكة
......
......@@ -4,12 +4,12 @@ Type=Service
X-KDE-ServiceTypes=KCModule
X-KDE-ModuleType=Library
X-KDE-Library=kcms/kcm_knote_print
X-KDE-Library=pim/kcms/knotes/kcm_knote_print
X-KDE-HasReadOnlyMode=false
X-KDE-ParentApp=knotes
X-KDE-ParentComponents=knotes,kontact_knotesplugin
X-KDE-CfgDlgHierarchy=KNotes
X-KDE-Weight=200
X-KDE-Weight=150
Name=Print
Name[ar]=الطّباعة
......
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