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

List:       kde-commits
Subject:    KDE/kdebase/runtime/plasma/kpart
From:       Aaron J. Seigo <aseigo () kde ! org>
Date:       2011-01-16 19:12:25
Message-ID: 20110116191225.7C0503E1F1 () svn ! kde ! org
[Download RAW message or body]

SVN commit 1214878 by aseigo:

* don't install an event filter when there is no event filter implemented
* tidy


 M  +5 -9      plasmakpart.cpp  
 M  +5 -4      plasmakpart.h  


--- trunk/KDE/kdebase/runtime/plasma/kpart/plasmakpart.cpp #1214877:1214878
@@ -43,7 +43,7 @@
 PlasmaKPart::PlasmaKPart(QWidget *parentWidget, QObject *parent, const QVariantList& args)
         : KParts::ReadOnlyPart(parent),
         m_corona(0),
-        m_view(0),
+      m_view(new PlasmaKPartView(0, 1, parentWidget)),
         m_service(0)
 {
     setComponentData( plasmaKPartFactory::componentData() );
@@ -54,22 +54,19 @@
 
     setThemeDefaults();
 
-    m_view = new PlasmaKPartView(0, 1, parentWidget);
-    m_view->installEventFilter(this);
     setWidget(m_view);
 
     // initialize the plugin loader
-    if( args.length() > 0 )
-    {
+    if (args.length() > 0) {
         Plasma::PluginLoader* loader = qVariantValue<Plasma::PluginLoader*>( args.first() );
-        if( loader )
-        {
+        if (loader) {
             Plasma::PluginLoader::setPluginLoader( loader );
         }
     }
 
-    if ( args.length() > 1 )
+    if (args.length() > 1) {
         m_category = args.at(1).value<QString>();
+    }
 
     // this line initializes the corona.
     corona();
@@ -171,7 +168,6 @@
     }
 
     Plasma::PluginLoader::setPluginLoader( loader );
-
     return true;
 }
 
--- trunk/KDE/kdebase/runtime/plasma/kpart/plasmakpart.h #1214877:1214878
@@ -45,8 +45,9 @@
 {
 Q_OBJECT
 Q_PROPERTY( Plasma::Applet::List activeApplets READ listActiveApplets )
+
 public:
-    PlasmaKPart(QWidget* parentWidget, QObject* parent, const QVariantList&);
+    PlasmaKPart(QWidget *parentWidget, QObject *parent, const QVariantList &args);
     ~PlasmaKPart();
 
     void notifyStartup(bool completed);
@@ -94,6 +95,9 @@
      **/
     Plasma::Applet::List listActiveApplets( );
 
+Q_SIGNALS:
+    void viewCreated();
+
 private Q_SLOTS:
     void cleanup();
     void syncConfig();
@@ -107,9 +111,6 @@
     KService::Ptr m_service;
     QHash<QString,Plasma::Applet*>* m_appletList;
     QVBoxLayout* m_configLayout;
-
-Q_SIGNALS:
-    void viewCreated();
 };
 
 #endif // multiple inclusion guard
[prev in list] [next in list] [prev in thread] [next in thread] 

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