[prev in list] [next in list] [prev in thread] [next in thread] 

List:       kde-commits
Subject:    [ktp-text-ui/filters] /: Add property X-KTp-PluginInfo-Version to plugins
From:       Daniele E. Domenichelli <daniele.domenichelli () gmail ! com>
Date:       2012-11-01 0:00:06
Message-ID: 20121101000006.57419A60C4 () git ! kde ! org
[Download RAW message or body]

Git commit 7886d4374d4aa16240a6beb1adeebbdec3d62b11 by Daniele E. Domenichelli.
Committed on 31/10/2012 at 16:04.
Pushed by ddomenichelli into branch 'filters'.

Add property X-KTp-PluginInfo-Version to plugins

This property holds the ktp-text-ui plugin framework version for which
the plugin is written, and allow us to switch the branch easily,
without caring of removing uncompatible plugins.

Reviewed-by: David Edmundson <kde@davidedmundson.co.uk>
REVIEW: 107154

M  +2    -1    CMakeLists.txt
M  +1    -0    filters/emoticons/ktptextui_message_filter_emoticons.desktop
M  +1    -0    filters/formatting/ktptextui_message_filter_formatting.desktop
M  +1    -0    filters/images/ktptextui_message_filter_images.desktop
M  +1    -0    filters/searchexpansion/ktptextui_message_filter_searchexpansion.desktop
 M  +4    -0    lib/ktptxtui_message_filter.desktop
M  +3    -1    lib/plugin-config-manager.cpp
M  +1    -0    version.h.in

http://commits.kde.org/telepathy-text-ui/7886d4374d4aa16240a6beb1adeebbdec3d62b11

diff --git a/CMakeLists.txt b/CMakeLists.txt
index 5871db4..ab7c85c 100644
--- a/CMakeLists.txt
+++ b/CMakeLists.txt
@@ -1,6 +1,7 @@
 project(ktp-text-ui)
 
 set(KTP_TEXT_UI_VERSION "0.5.1")
+set(KTP_TEXT_UI_PLUGIN_FRAMEWORK_VERSION "1")
 set(IS_KTP_INTERNAL_MODULE TRUE)
 
 # Include our extra FindFoo.cmake files.
@@ -39,7 +40,7 @@ if(TELEPATHY_LOGGER_QT4_FOUND)
     )
 endif()
 
-configure_file(version.h.in ${CMAKE_CURRENT_BINARY_DIR}/version.h)
+configure_file(version.h.in ${CMAKE_CURRENT_BINARY_DIR}/version.h @ONLY)
 include_directories(${CMAKE_CURRENT_BINARY_DIR})
 
 add_subdirectory(lib)
diff --git a/filters/emoticons/ktptextui_message_filter_emoticons.desktop \
b/filters/emoticons/ktptextui_message_filter_emoticons.desktop index da7618e..dfb5024 \
                100644
--- a/filters/emoticons/ktptextui_message_filter_emoticons.desktop
+++ b/filters/emoticons/ktptextui_message_filter_emoticons.desktop
@@ -63,3 +63,4 @@ X-KDE-PluginInfo-Version=0.4
 X-KDE-PluginInfo-Website=http://community.kde.org/Real-Time_Communication_and_Collaboration
  X-KDE-PluginInfo-License=GPL
 X-KDE-PluginInfo-EnabledByDefault=true
+X-KTp-PluginInfo-Version=1
diff --git a/filters/formatting/ktptextui_message_filter_formatting.desktop \
b/filters/formatting/ktptextui_message_filter_formatting.desktop index \
                5030b3c..b322fd0 100644
--- a/filters/formatting/ktptextui_message_filter_formatting.desktop
+++ b/filters/formatting/ktptextui_message_filter_formatting.desktop
@@ -55,3 +55,4 @@ X-KDE-PluginInfo-Version=0.4
 X-KDE-PluginInfo-Website=http://community.kde.org/Real-Time_Communication_and_Collaboration
  X-KDE-PluginInfo-License=GPL
 X-KDE-PluginInfo-EnabledByDefault=false
+X-KTp-PluginInfo-Version=1
diff --git a/filters/images/ktptextui_message_filter_images.desktop \
b/filters/images/ktptextui_message_filter_images.desktop index cd27ac6..4fa1ab9 \
                100644
--- a/filters/images/ktptextui_message_filter_images.desktop
+++ b/filters/images/ktptextui_message_filter_images.desktop
@@ -60,3 +60,4 @@ X-KDE-PluginInfo-Version=0.4
 X-KDE-PluginInfo-Website=http://community.kde.org/Real-Time_Communication_and_Collaboration
  X-KDE-PluginInfo-License=GPL
 X-KDE-PluginInfo-EnabledByDefault=true
+X-KTp-PluginInfo-Version=1
diff --git a/filters/searchexpansion/ktptextui_message_filter_searchexpansion.desktop \
b/filters/searchexpansion/ktptextui_message_filter_searchexpansion.desktop index \
                755bb3d..1a1550d 100644
--- a/filters/searchexpansion/ktptextui_message_filter_searchexpansion.desktop
+++ b/filters/searchexpansion/ktptextui_message_filter_searchexpansion.desktop
@@ -39,3 +39,4 @@ X-KDE-PluginInfo-Version=0.4
 X-KDE-PluginInfo-Website=http://community.kde.org/Real-Time_Communication_and_Collaboration
  X-KDE-PluginInfo-License=GPL
 X-KDE-PluginInfo-EnabledByDefault=false
+X-KTp-PluginInfo-Version=1
diff --git a/lib/ktptxtui_message_filter.desktop \
b/lib/ktptxtui_message_filter.desktop index e0d0b31..ff8b967 100644
--- a/lib/ktptxtui_message_filter.desktop
+++ b/lib/ktptxtui_message_filter.desktop
@@ -24,3 +24,7 @@ Comment[sv]=Telepathy meddelandefilter för textbaserat \
användargränssnitt  Comment[uk]=Фільтр повідомлень \
текстового інтерфейсу Telepathy  Comment[x-test]=xxTelepathy \
Text-Ui Message Filterxx  Comment[zh_TW]=Telepathy 文字介面訊息過濾器
+
+# The ktp-text-ui plugin framework version for which the plugin is written
+[PropertyDef::X-KTp-PluginInfo-Version]
+Type=int
diff --git a/lib/plugin-config-manager.cpp b/lib/plugin-config-manager.cpp
index b1a4d5b..601d74b 100644
--- a/lib/plugin-config-manager.cpp
+++ b/lib/plugin-config-manager.cpp
@@ -17,6 +17,7 @@
 */
 
 #include "plugin-config-manager.h"
+#include "version.h"
 
 #include <QMutex>
 #include <QSet>
@@ -53,7 +54,8 @@ PluginConfigManager::PluginConfigManager() :
 }
 
 KService::List offers() {
-    return KServiceTypeTrader::self()->query(QLatin1String("KTpTextUi/MessageFilter"));
 +    return KServiceTypeTrader::self()->query(QLatin1String("KTpTextUi/MessageFilter"),
 +                                             \
QLatin1String("[X-KTp-PluginInfo-Version] == " \
KTP_TEXT_UI_PLUGIN_FRAMEWORK_VERSION));  }
 
 void PluginConfigManager::generateCache()
diff --git a/version.h.in b/version.h.in
index a4e11bf..914f26e 100644
--- a/version.h.in
+++ b/version.h.in
@@ -1 +1,2 @@
 #define KTP_TEXT_UI_VERSION "@KTP_TEXT_UI_VERSION@"
+#define KTP_TEXT_UI_PLUGIN_FRAMEWORK_VERSION \
"@KTP_TEXT_UI_PLUGIN_FRAMEWORK_VERSION@"


[prev in list] [next in list] [prev in thread] [next in thread] 

Configure | About | News | Add a list | Sponsored by KoreLogic