[SCM] ktp-text-ui packaging branch, master, updated. debian/15.12.1-1-1918-gdf4b0ec
Maximiliano Curia
maxy at moszumanska.debian.org
Sat May 28 00:22:17 UTC 2016
Gitweb-URL: http://git.debian.org/?p=pkg-kde/applications/ktp-text-ui.git;a=commitdiff;h=6cd1b2d
The following commit has been merged in the master branch:
commit 6cd1b2d64b869ba772504461da38ddf7d0307d00
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.
---
config/messages-config.cpp | 8 +++++++-
lib/message-processor.cpp | 7 +++++--
lib/message-processor.h | 1 +
3 files changed, 13 insertions(+), 3 deletions(-)
diff --git a/config/messages-config.cpp b/config/messages-config.cpp
index e44a7ad..5398703 100644
--- a/config/messages-config.cpp
+++ b/config/messages-config.cpp
@@ -33,7 +33,13 @@ MessagesConfig::MessagesConfig(QWidget *parent, const QVariantList &args)
: PluginPage(KTpMessagesConfigFactory::componentData(), parent, args)
{
KPluginInfo::List plugins = MessageProcessor::pluginList();
- pluginSelector()->addPlugins(plugins);
+ pluginSelector()->addPlugins(
+ plugins,
+ KPluginSelector::ReadConfigFile,
+ QString(),
+ QString(),
+ KSharedConfig::openConfig(QLatin1String("ktelepathyrc"))
+ );
//Am surprised that PluginPage() doesn't do this for me
QLayout *layout = new QVBoxLayout();
diff --git a/lib/message-processor.cpp b/lib/message-processor.cpp
index 27fa6c2..e89ecf0 100644
--- a/lib/message-processor.cpp
+++ b/lib/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/lib/message-processor.h b/lib/message-processor.h
index 5ead255..c6d2b12 100644
--- a/lib/message-processor.h
+++ b/lib/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-text-ui packaging
More information about the pkg-kde-commits
mailing list