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

List:       kde-commits
Subject:    KDE/kdebase/workspace/plasma/applets/systemtray/ui
From:       Aaron J. Seigo <aseigo () kde ! org>
Date:       2008-11-20 0:18:23
Message-ID: 1227140303.111783.30406.nullmailer () svn ! kde ! org
[Download RAW message or body]

SVN commit 886770 by aseigo:

using namespaces like this is a great way to make the code hard to read while making \
users of it type more


 M  +2 -2      applet.cpp  
 M  +10 -16    extendertask.cpp  
 M  +3 -8      extendertask.h  


--- trunk/KDE/kdebase/workspace/plasma/applets/systemtray/ui/applet.cpp \
#886769:886770 @@ -69,7 +69,7 @@
     QPointer<KActionSelector> configInterface;
 
     Plasma::FrameSvg *background;
-    SystemTray::Extender::Task *extenderTask;
+    SystemTray::ExtenderTask *extenderTask;
 };
 
 
@@ -336,7 +336,7 @@
         d->extenderTask = 0;
     } else {
         if (!d->extenderTask) {
-            d->extenderTask = new SystemTray::Extender::Task(this);
+            d->extenderTask = new SystemTray::ExtenderTask(this);
         }
 
         if (visibility) {
--- trunk/KDE/kdebase/workspace/plasma/applets/systemtray/ui/extendertask.cpp \
#886769:886770 @@ -27,12 +27,8 @@
 namespace SystemTray
 {
 
-namespace Extender
+class ExtenderTask::Private
 {
-
-
-class Task::Private
-{
 public:
     Private(Plasma::PopupApplet *systemTray, Task *q)
         : q(q),
@@ -50,49 +46,49 @@
 };
 
 
-Task::Task(Plasma::PopupApplet *systemTray)
+ExtenderTask::ExtenderTask(Plasma::PopupApplet *systemTray)
     : d(new Private(systemTray, this))
 {
     setOrder(Last);
 }
 
 
-Task::~Task()
+ExtenderTask::~ExtenderTask()
 {
     emit taskDeleted(d->typeId);
     delete d;
 }
 
 
-bool Task::isEmbeddable() const
+bool ExtenderTask::isEmbeddable() const
 {
     return true;
 }
 
-bool Task::isValid() const
+bool ExtenderTask::isValid() const
 {
     return true;
 }
 
-QString Task::name() const
+QString ExtenderTask::name() const
 {
     return i18n("Show or hide notifications and jobs");
 }
 
 
-QString Task::typeId() const
+QString ExtenderTask::typeId() const
 {
     //FIXME: what should we return here?
     return "toggle_extender";
 }
 
 
-QIcon Task::icon() const
+QIcon ExtenderTask::icon() const
 {
     return d->icon;
 }
 
-void Task::setIcon(const QString &icon)
+void ExtenderTask::setIcon(const QString &icon)
 {
     d->iconName = icon;
     if (d->iconWidget) {
@@ -100,7 +96,7 @@
     }
 }
 
-QGraphicsWidget* Task::createWidget(Plasma::Applet *host)
+QGraphicsWidget* ExtenderTask::createWidget(Plasma::Applet *host)
 {
     d->iconWidget = new Plasma::IconWidget(host);
     d->iconWidget->setToolTip(i18n("toggle visibility of notifications and jobs"));
@@ -112,7 +108,5 @@
 
 
 }
-}
 
-
 #include "extendertask.moc"
--- trunk/KDE/kdebase/workspace/plasma/applets/systemtray/ui/extendertask.h \
#886769:886770 @@ -31,16 +31,13 @@
 namespace SystemTray
 {
 
-namespace Extender
+class ExtenderTask : public SystemTray::Task
 {
-
-class Task : public SystemTray::Task
-{
     Q_OBJECT
 
 public:
-    Task(Plasma::PopupApplet *systemTray);
-    virtual ~Task();
+    ExtenderTask(Plasma::PopupApplet *systemTray);
+    virtual ~ExtenderTask();
 
     bool isValid() const;
     virtual bool isEmbeddable() const;
@@ -60,8 +57,6 @@
     Private* const d;
 };
 
-
 }
-}
 
 #endif


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

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