[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=bb4faf6

The following commit has been merged in the master branch:
commit bb4faf62f04d3e4ebec218d75928d6037fe95b84
Author: Lasath Fernando <kde at lasath.org>
Date:   Fri Jul 13 01:35:43 2012 +1000

    Replace MessagesConfig with PluginPage
    
    It turns out, pretty much all the internals of MessagesConfig has
    already been implemented in a class called KSettings::PluginPage.
    
    This deletes all the code and delegates everything to said class.
---
 config/messages-config.cpp | 34 ++++++----------------------------
 config/messages-config.h   |  8 ++------
 2 files changed, 8 insertions(+), 34 deletions(-)

diff --git a/config/messages-config.cpp b/config/messages-config.cpp
index f8f863c..e44a7ad 100644
--- a/config/messages-config.cpp
+++ b/config/messages-config.cpp
@@ -29,36 +29,14 @@
 K_PLUGIN_FACTORY(KTpMessagesConfigFactory, registerPlugin<MessagesConfig>();)
 K_EXPORT_PLUGIN(KTpMessagesConfigFactory("kcm_ktp_message_filters", "kcm_ktp_chat_messages"))
 
-class MessagesConfig::Private {
-public:
-    KPluginSelector *selector;
-};
-
 MessagesConfig::MessagesConfig(QWidget *parent, const QVariantList &args)
-    : KCModule(KTpMessagesConfigFactory::componentData(), parent, args),
-        d(new Private)
+    : PluginPage(KTpMessagesConfigFactory::componentData(), parent, args)
 {
-    d->selector = new KPluginSelector();
-
-    QLayout *layout = new QVBoxLayout(this);
-    layout->addWidget(d->selector);
-    setLayout(layout);
-
     KPluginInfo::List plugins = MessageProcessor::pluginList();
-    d->selector->addPlugins(plugins);
-
-    connect(d->selector, SIGNAL(changed(bool)), SIGNAL(changed(bool)));
-}
+    pluginSelector()->addPlugins(plugins);
 
-void MessagesConfig::save()
-{
-    kDebug();
-    d->selector->save();
-    KCModule::save();
-}
-
-void MessagesConfig::defaults()
-{
-    d->selector->defaults();
-    KCModule::defaults();
+    //Am surprised that PluginPage() doesn't do this for me
+    QLayout *layout = new QVBoxLayout();
+    layout->addWidget(pluginSelector());
+    setLayout(layout);
 }
\ No newline at end of file
diff --git a/config/messages-config.h b/config/messages-config.h
index 48148a8..f735443 100644
--- a/config/messages-config.h
+++ b/config/messages-config.h
@@ -19,19 +19,15 @@
 #ifndef KCM_MESSAGES_H
 #define KCM_MESSAGES_H
 
-#include <KCModule>
+#include <KSettings/PluginPage>
 
-
-class MessagesConfig : public KCModule
+class MessagesConfig : public KSettings::PluginPage
 {
 Q_OBJECT
 
 public:
     explicit MessagesConfig(QWidget *parent = 0, const QVariantList &args = QVariantList());
 
-    virtual void save();
-    virtual void defaults();
-
 private:
     class Private;
     Private* d;

-- 
ktp-text-ui packaging



More information about the pkg-kde-commits mailing list