[ktp-common-internals] /: Adapt to changes in KPeople
Aleix Pol
aleixpol at kde.org
Mon Apr 20 17:50:53 UTC 2015
Git commit f53016ddaf07b0aa1b11912e816edd1df511c3c5 by Aleix Pol.
Committed on 20/04/2015 at 17:50.
Pushed by apol into branch 'master'.
Adapt to changes in KPeople
Raises the KF5 dependency to 5.10, as agreed by Martin Klapetek as
maintainer.
Reviewed by David Edmundson
CCMAIL: kde-telepathy at kde.org
M +1 -1 CMakeLists.txt
M +1 -12 kpeople/actionsplugin/CMakeLists.txt
M +1 -1 kpeople/actionsplugin/kpeople-actions-plugin.cpp
D +0 -11 kpeople/actionsplugin/ktp_kpeople_plugin.desktop
A +18 -0 kpeople/actionsplugin/ktp_kpeople_plugin.json
M +1 -11 kpeople/datasourceplugin/CMakeLists.txt
M +1 -1 kpeople/datasourceplugin/im-persons-data-source.cpp
D +0 -11 kpeople/datasourceplugin/im_persons_data_source_plugin.desktop
A +18 -0 kpeople/datasourceplugin/im_persons_data_source_plugin.json
M +1 -6 kpeople/uiplugins/CMakeLists.txt
M +1 -4 kpeople/uiplugins/chatplugin/CMakeLists.txt
M +1 -1 kpeople/uiplugins/chatplugin/kpeople_chat_plugin.cpp
D +0 -11 kpeople/uiplugins/chatplugin/kpeople_chat_plugin.desktop
A +18 -0 kpeople/uiplugins/chatplugin/kpeople_chat_plugin.json
M +1 -1 kpeople/uiplugins/imdetailswidget.cpp
D +0 -11 kpeople/uiplugins/imdetailswidgetplugin.desktop
A +17 -0 kpeople/uiplugins/imdetailswidgetplugin.json
http://commits.kde.org/telepathy-common-internals/f53016ddaf07b0aa1b11912e816edd1df511c3c5
diff --git a/CMakeLists.txt b/CMakeLists.txt
index 9f2f494..949f4cd 100644
--- a/CMakeLists.txt
+++ b/CMakeLists.txt
@@ -13,7 +13,7 @@ find_package (Qt5 REQUIRED CONFIG COMPONENTS
Qml
Test)
-find_package (KF5 REQUIRED COMPONENTS
+find_package (KF5 5.10 REQUIRED COMPONENTS
CoreAddons
Notifications
KIO
diff --git a/kpeople/actionsplugin/CMakeLists.txt b/kpeople/actionsplugin/CMakeLists.txt
index c4ac2d7..51bd86a 100644
--- a/kpeople/actionsplugin/CMakeLists.txt
+++ b/kpeople/actionsplugin/CMakeLists.txt
@@ -1,6 +1,4 @@
-add_library (ktp_kpeople_plugin MODULE
- kpeople-actions-plugin.cpp
-)
+kcoreaddons_add_plugin (ktp_kpeople_plugin SOURCES kpeople-actions-plugin.cpp JSON "ktp_kpeople_plugin.json" INSTALL_NAMESPACE "kpeople/actions")
target_link_libraries (ktp_kpeople_plugin
KF5::People
@@ -10,12 +8,3 @@ target_link_libraries (ktp_kpeople_plugin
KF5::Service
KTp::CommonInternals
)
-
-# Install:
-install (TARGETS ktp_kpeople_plugin
- DESTINATION ${PLUGIN_INSTALL_DIR}
-)
-
-install (FILES ktp_kpeople_plugin.desktop
- DESTINATION ${SERVICES_INSTALL_DIR}
-)
diff --git a/kpeople/actionsplugin/kpeople-actions-plugin.cpp b/kpeople/actionsplugin/kpeople-actions-plugin.cpp
index 000dd35..bb60f89 100644
--- a/kpeople/actionsplugin/kpeople-actions-plugin.cpp
+++ b/kpeople/actionsplugin/kpeople-actions-plugin.cpp
@@ -330,7 +330,7 @@ void KPeopleActionsPlugin::onAccountConnectionStatusChanged(Tp::ConnectionStatus
disconnect(account.data(), &Tp::Account::connectionStatusChanged, this, &KPeopleActionsPlugin::onAccountConnectionStatusChanged);
}
-K_PLUGIN_FACTORY( KPeopleActionsPluginFactory, registerPlugin<KPeopleActionsPlugin>(); )
+K_PLUGIN_FACTORY_WITH_JSON( KPeopleActionsPluginFactory, "ktp_kpeople_plugin.json", registerPlugin<KPeopleActionsPlugin>(); )
K_EXPORT_PLUGIN( KPeopleActionsPluginFactory("ktp_kpeople_plugin", "ktp-common-internals") )
#include "kpeople-actions-plugin.moc"
diff --git a/kpeople/actionsplugin/ktp_kpeople_plugin.desktop b/kpeople/actionsplugin/ktp_kpeople_plugin.desktop
deleted file mode 100644
index e5513a9..0000000
--- a/kpeople/actionsplugin/ktp_kpeople_plugin.desktop
+++ /dev/null
@@ -1,11 +0,0 @@
-[Desktop Entry]
-Encoding=UTF-8
-Type=Service
-ServiceTypes=KPeople/Plugin
-X-KDE-Library=ktp_kpeople_plugin
-X-KDE-PluginInfo-Author=David Edmundson
-X-KDE-PluginInfo-Email=daivdedmundson at kde.org
-X-KDE-PluginInfo-Name=ktp
-X-KDE-PluginInfo-Version=0.1
-X-KDE-PluginInfo-License=LGPL
-X-KDE-PluginInfo-EnabledByDefault=true
diff --git a/kpeople/actionsplugin/ktp_kpeople_plugin.json b/kpeople/actionsplugin/ktp_kpeople_plugin.json
new file mode 100644
index 0000000..700598b
--- /dev/null
+++ b/kpeople/actionsplugin/ktp_kpeople_plugin.json
@@ -0,0 +1,18 @@
+{
+ "Encoding": "UTF-8",
+ "KPlugin": {
+ "Authors": [
+ {
+ "Email": "daivdedmundson at kde.org",
+ "Name": "David Edmundson"
+ }
+ ],
+ "EnabledByDefault": true,
+ "Id": "ktp",
+ "License": "LGPL",
+ "ServiceTypes": [
+ "KPeople/Plugin"
+ ],
+ "Version": "0.1"
+ }
+}
diff --git a/kpeople/datasourceplugin/CMakeLists.txt b/kpeople/datasourceplugin/CMakeLists.txt
index 665330f..cef87d2 100644
--- a/kpeople/datasourceplugin/CMakeLists.txt
+++ b/kpeople/datasourceplugin/CMakeLists.txt
@@ -1,6 +1,6 @@
find_package(Qt5Sql REQUIRED)
-add_library (im_persons_data_source_plugin MODULE im-persons-data-source.cpp debug.cpp)
+kcoreaddons_add_plugin (im_persons_data_source_plugin SOURCES im-persons-data-source.cpp debug.cpp JSON "im_persons_data_source_plugin.json" INSTALL_NAMESPACE "kpeople/datasource")
target_link_libraries (im_persons_data_source_plugin
Qt5::Sql
@@ -10,13 +10,3 @@ target_link_libraries (im_persons_data_source_plugin
KF5::PeopleBackend
KTp::CommonInternals
)
-
-# Install:
-install (TARGETS im_persons_data_source_plugin
- DESTINATION ${PLUGIN_INSTALL_DIR}
-)
-
-install (FILES im_persons_data_source_plugin.desktop
- DESTINATION ${SERVICES_INSTALL_DIR}
-)
-
diff --git a/kpeople/datasourceplugin/im-persons-data-source.cpp b/kpeople/datasourceplugin/im-persons-data-source.cpp
index be65f2e..7f1d08e 100644
--- a/kpeople/datasourceplugin/im-persons-data-source.cpp
+++ b/kpeople/datasourceplugin/im-persons-data-source.cpp
@@ -368,7 +368,7 @@ AllContactsMonitor* IMPersonsDataSource::createAllContactsMonitor()
return new KTpAllContacts();
}
-K_PLUGIN_FACTORY( IMPersonsDataSourceFactory, registerPlugin<IMPersonsDataSource>(); )
+K_PLUGIN_FACTORY_WITH_JSON( IMPersonsDataSourceFactory, "im_persons_data_source_plugin.json", registerPlugin<IMPersonsDataSource>(); )
K_EXPORT_PLUGIN( IMPersonsDataSourceFactory("im_persons_data_source_plugin") )
diff --git a/kpeople/datasourceplugin/im_persons_data_source_plugin.desktop b/kpeople/datasourceplugin/im_persons_data_source_plugin.desktop
deleted file mode 100644
index 34c6504..0000000
--- a/kpeople/datasourceplugin/im_persons_data_source_plugin.desktop
+++ /dev/null
@@ -1,11 +0,0 @@
-[Desktop Entry]
-Encoding=UTF-8
-Type=Service
-ServiceTypes=KPeople/DataSource
-X-KDE-Library=im_persons_data_source_plugin
-X-KDE-PluginInfo-Author=Martin Klapetek
-X-KDE-PluginInfo-Email=mklapetek at kde.org
-X-KDE-PluginInfo-Name=IMProvider
-X-KDE-PluginInfo-Version=0.1
-X-KDE-PluginInfo-License=LGPL
-X-KDE-PluginInfo-EnabledByDefault=true
diff --git a/kpeople/datasourceplugin/im_persons_data_source_plugin.json b/kpeople/datasourceplugin/im_persons_data_source_plugin.json
new file mode 100644
index 0000000..a0272d0
--- /dev/null
+++ b/kpeople/datasourceplugin/im_persons_data_source_plugin.json
@@ -0,0 +1,18 @@
+{
+ "Encoding": "UTF-8",
+ "KPlugin": {
+ "Authors": [
+ {
+ "Email": "mklapetek at kde.org",
+ "Name": "Martin Klapetek"
+ }
+ ],
+ "EnabledByDefault": true,
+ "Id": "IMProvider",
+ "License": "LGPL",
+ "ServiceTypes": [
+ "KPeople/DataSource"
+ ],
+ "Version": "0.1"
+ }
+}
diff --git a/kpeople/uiplugins/CMakeLists.txt b/kpeople/uiplugins/CMakeLists.txt
index 220cdf3..868a182 100644
--- a/kpeople/uiplugins/CMakeLists.txt
+++ b/kpeople/uiplugins/CMakeLists.txt
@@ -1,6 +1,4 @@
-include_directories(${KPEOPLE_INCLUDES})
-
-add_library(imdetailswidgetplugin MODULE imdetailswidget.cpp)
+kcoreaddons_add_plugin(imdetailswidgetplugin SOURCES imdetailswidget.cpp JSON "imdetailswidgetplugin.json" INSTALL_NAMESPACE "kpeople/widgets")
target_link_libraries(imdetailswidgetplugin Qt5::Core
Qt5::Gui
KF5::PeopleWidgets
@@ -9,7 +7,4 @@ target_link_libraries(imdetailswidgetplugin Qt5::Core
KTp::CommonInternals
)
-install(TARGETS imdetailswidgetplugin DESTINATION ${PLUGIN_INSTALL_DIR})
-install(FILES imdetailswidgetplugin.desktop DESTINATION ${SERVICES_INSTALL_DIR})
-
add_subdirectory(chatplugin)
diff --git a/kpeople/uiplugins/chatplugin/CMakeLists.txt b/kpeople/uiplugins/chatplugin/CMakeLists.txt
index dc9a7f7..35a81aa 100644
--- a/kpeople/uiplugins/chatplugin/CMakeLists.txt
+++ b/kpeople/uiplugins/chatplugin/CMakeLists.txt
@@ -1,4 +1,4 @@
-add_library(kpeople_chat_plugin MODULE chatlistviewdelegate.cpp kpeople_chat_plugin.cpp)
+kcoreaddons_add_plugin(kpeople_chat_plugin SOURCES chatlistviewdelegate.cpp kpeople_chat_plugin.cpp JSON "kpeople_chat_plugin.json" INSTALL_NAMESPACE "kpeople/widgets")
target_link_libraries(kpeople_chat_plugin ${QT_QTCORE_LIBRARY}
KF5::PeopleWidgets
KF5::CoreAddons
@@ -6,6 +6,3 @@ target_link_libraries(kpeople_chat_plugin ${QT_QTCORE_LIBRARY}
KTp::Logger
KTp::CommonInternals
)
-
-install(TARGETS kpeople_chat_plugin DESTINATION ${PLUGIN_INSTALL_DIR})
-install(FILES kpeople_chat_plugin.desktop DESTINATION ${SERVICES_INSTALL_DIR})
diff --git a/kpeople/uiplugins/chatplugin/kpeople_chat_plugin.cpp b/kpeople/uiplugins/chatplugin/kpeople_chat_plugin.cpp
index 93cd641..13e2add 100644
--- a/kpeople/uiplugins/chatplugin/kpeople_chat_plugin.cpp
+++ b/kpeople/uiplugins/chatplugin/kpeople_chat_plugin.cpp
@@ -41,7 +41,7 @@
#define TP_ACCOUNT_OBJECT_PATH_BASE "/org/freedesktop/Telepathy/Account/"
-K_PLUGIN_FACTORY(KpeopleChatFactory, registerPlugin<ChatWidgetFactory>();)
+K_PLUGIN_FACTORY_WITH_JSON(KpeopleChatFactory, "kpeople_chat_plugin.json", registerPlugin<ChatWidgetFactory>();)
K_EXPORT_PLUGIN(KpeopleChatFactory("kpeople_chat_plugin", "ktp-common-internals"))
ChatWidgetFactory::ChatWidgetFactory(QObject *parent, const QVariantList &args): AbstractFieldWidgetFactory(parent)
diff --git a/kpeople/uiplugins/chatplugin/kpeople_chat_plugin.desktop b/kpeople/uiplugins/chatplugin/kpeople_chat_plugin.desktop
deleted file mode 100644
index 87855c8..0000000
--- a/kpeople/uiplugins/chatplugin/kpeople_chat_plugin.desktop
+++ /dev/null
@@ -1,11 +0,0 @@
-[Desktop Entry]
-Encoding=UTF-8
-Type=Service
-ServiceTypes=KPeople/Plugin
-X-KDE-Library=kpeople_chat_plugin
-X-KDE-PluginInfo-Author=Nilesh Suthar
-X-KDE-PluginInfo-Email=nileshsuthar at live.in
-X-KDE-PluginInfo-Name=kpeople
-X-KDE-PluginInfo-Version=0.1
-X-KDE-PluginInfo-License=LGPL
-X-KDE-PluginInfo-EnabledByDefault=true
diff --git a/kpeople/uiplugins/chatplugin/kpeople_chat_plugin.json b/kpeople/uiplugins/chatplugin/kpeople_chat_plugin.json
new file mode 100644
index 0000000..60bd449
--- /dev/null
+++ b/kpeople/uiplugins/chatplugin/kpeople_chat_plugin.json
@@ -0,0 +1,18 @@
+{
+ "Encoding": "UTF-8",
+ "KPlugin": {
+ "Authors": [
+ {
+ "Email": "nileshsuthar at live.in",
+ "Name": "Nilesh Suthar"
+ }
+ ],
+ "EnabledByDefault": true,
+ "Id": "kpeople",
+ "License": "LGPL",
+ "ServiceTypes": [
+ "KPeople/Plugin"
+ ],
+ "Version": "0.1"
+ }
+}
diff --git a/kpeople/uiplugins/imdetailswidget.cpp b/kpeople/uiplugins/imdetailswidget.cpp
index bc8ee07..34630a9 100644
--- a/kpeople/uiplugins/imdetailswidget.cpp
+++ b/kpeople/uiplugins/imdetailswidget.cpp
@@ -31,7 +31,7 @@
#include <TelepathyQt/AccountManager>
#include <KTp/core.h>
-K_PLUGIN_FACTORY( ImDetailsWidgetFactory, registerPlugin<ImDetailsWidget>(); )
+K_PLUGIN_FACTORY_WITH_JSON( ImDetailsWidgetFactory, "imdetailswidgetplugin.json", registerPlugin<ImDetailsWidget>(); )
K_EXPORT_PLUGIN( ImDetailsWidgetFactory("imdetailswidgetplugin", "ktp-common-internals"))
using namespace KPeople;
diff --git a/kpeople/uiplugins/imdetailswidgetplugin.desktop b/kpeople/uiplugins/imdetailswidgetplugin.desktop
deleted file mode 100644
index 4ee25ec..0000000
--- a/kpeople/uiplugins/imdetailswidgetplugin.desktop
+++ /dev/null
@@ -1,11 +0,0 @@
-[Desktop Entry]
-Type=Service
-ServiceTypes=KPeopleWidgets/Plugin
-
-X-KDE-Library=imdetailswidgetplugin
-X-KDE-PluginInfo-Name=imdetailswidgetplugin
-X-KDE-PluginInfo-Author=David Edmundson
-X-KDE-PluginInfo-Email=davidedmundson at kde.org
-X-KDE-PluginInfo-Version=0.1
-X-KDE-PluginInfo-License=LGPL
-X-KPeople-Weight=2
diff --git a/kpeople/uiplugins/imdetailswidgetplugin.json b/kpeople/uiplugins/imdetailswidgetplugin.json
new file mode 100644
index 0000000..b9a8bcc
--- /dev/null
+++ b/kpeople/uiplugins/imdetailswidgetplugin.json
@@ -0,0 +1,17 @@
+{
+ "KPlugin": {
+ "Authors": [
+ {
+ "Email": "davidedmundson at kde.org",
+ "Name": "David Edmundson"
+ }
+ ],
+ "Id": "imdetailswidgetplugin",
+ "License": "LGPL",
+ "ServiceTypes": [
+ "KPeopleWidgets/Plugin"
+ ],
+ "Version": "0.1"
+ },
+ "X-KPeople-Weight": "2"
+}
More information about the KDE-Telepathy
mailing list