[SCM] ktp-common-internals packaging branch, master, updated. debian/15.12.1-2-1839-gf0635e9

Maximiliano Curia maxy at moszumanska.debian.org
Mon May 9 09:05:25 UTC 2016


Gitweb-URL: http://git.debian.org/?p=pkg-kde/applications/ktp-common-internals.git;a=commitdiff;h=3eed4a4

The following commit has been merged in the master branch:
commit 3eed4a475d0ba3ca72fee670e2b465a43dae9b30
Author: Lasath Fernando <kde at lasath.org>
Date:   Sat Jul 14 19:08:33 2012 +1000

    Make MessageProcessor and KCM use ktelepathyrc
    
    I didn't realize that the MessagesConfig was saving its settings in a
    different file than MessageProcessor was loading from.
    
    This promptly fixes that, but I don't like the idea of hardcoding
    the file in many places, nor kludging MessageProcessor, I think I'll
    make a separate class for manging plugin settings.
---
 KTp/message-processor.cpp | 7 +++++--
 KTp/message-processor.h   | 1 +
 2 files changed, 6 insertions(+), 2 deletions(-)

diff --git a/KTp/message-processor.cpp b/KTp/message-processor.cpp
index 27fa6c2..e89ecf0 100644
--- a/KTp/message-processor.cpp
+++ b/KTp/message-processor.cpp
@@ -82,9 +82,12 @@ Message MessageProcessor::processOutgoingMessage(const Tp::Message &sentMessage)
 void MessageProcessor::loadPlugins() {
     kDebug() << "Starting loading filters...";
 
-    Q_FOREACH (const KPluginInfo &plugin, pluginList()) {
+    KPluginInfo::List plugins = pluginList();
+    for (KPluginInfo::List::Iterator i = plugins.begin(); i != plugins.end(); i++) {
+        KPluginInfo &plugin = *i;
         kDebug() << "found filter :" << plugin.pluginName();
 
+        plugin.load();
         if (plugin.isPluginEnabled()) {
             kDebug() << "it is enabled";
             KService::Ptr service = plugin.service();
@@ -108,7 +111,7 @@ void MessageProcessor::loadPlugins() {
 KPluginInfo::List MessageProcessor::pluginList()
 {
     KService::List offers = KServiceTypeTrader::self()->query(serviceType);
-    KConfigGroup config = KConfig(QLatin1String("ktelepathyrc")).group("Filters");
+    KConfigGroup config = KSharedConfig::openConfig(QLatin1String("ktelepathyrc"))->group("Plugins");
 
     return KPluginInfo::fromServices(offers, config);
 }
diff --git a/KTp/message-processor.h b/KTp/message-processor.h
index 5ead255..c6d2b12 100644
--- a/KTp/message-processor.h
+++ b/KTp/message-processor.h
@@ -49,6 +49,7 @@ public:
     Message processOutgoingMessage(const Tp::Message &message);
 
     static KPluginInfo::List pluginList();
+    static KSharedConfig::Ptr defaultConfig();
 
 protected:
     explicit MessageProcessor();

-- 
ktp-common-internals packaging



More information about the pkg-kde-commits mailing list