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

List:       kde-commits
Subject:    KDE/kdepim/akonadi/tray
From:       Davide Bettio <davide.bettio () kdemail ! net>
Date:       2009-05-05 21:58:08
Message-ID: 1241560688.711425.11082.nullmailer () svn ! kde ! org
[Download RAW message or body]

SVN commit 964067 by bettio:

We don't need anymore to set a KNotificationItem parent :)


 M  +12 -10    dock.cpp  
 M  +1 -0      dock.h  


--- trunk/KDE/kdepim/akonadi/tray/dock.cpp #964066:964067
@@ -58,8 +58,10 @@
 }
 
 Dock::Dock( QWidget *parent )
-        : KNotificationItem(parent )
+        : KNotificationItem( 0 )
 {
+    m_parentWidget = parent;
+  
     setIcon("akonadi");
     KMenu *menu = new KMenu();
     m_title = menu->addTitle( i18n( "Akonadi" ) );
@@ -97,24 +99,24 @@
 {
     updateMenu( true );
     KPassivePopup::message( i18n( "Akonadi available" ),
-                            i18n( "The Akonadi server has been started and can be \
used now." ), associatedWidget() ); +                            i18n( "The Akonadi \
server has been started and can be used now." ), m_parentWidget );  }
 
 void Dock::slotServerStopped()
 {
     updateMenu( false );
     KPassivePopup::message( i18n( "Akonadi not available" ),
-                            i18n( "The Akonadi server has been stopped, Akonadi \
related applications can no longer be used." ), associatedWidget()  ); +              \
i18n( "The Akonadi server has been stopped, Akonadi related applications can no \
longer be used." ), m_parentWidget  );  }
 
 void Dock::slotStopAkonadi()
 {
-    Akonadi::Control::stop( associatedWidget()  );
+    Akonadi::Control::stop( m_parentWidget  );
 }
 
 void Dock::slotStartAkonadi()
 {
-    Akonadi::Control::start( associatedWidget()  );
+    Akonadi::Control::start( m_parentWidget  );
 }
 
 void Dock::slotActivated()
@@ -127,7 +129,7 @@
     bool registered = ServerManager::isRunning();
     Q_ASSERT( registered );
 
-    QPointer<BackupAssistant> backup = new BackupAssistant( associatedWidget()  );
+    QPointer<BackupAssistant> backup = new BackupAssistant( m_parentWidget  );
     backup->exec();
     delete backup;
 }
@@ -137,7 +139,7 @@
     bool registered = ServerManager::isRunning();
     Q_ASSERT( registered );
 
-    QPointer<RestoreAssistant> restore = new RestoreAssistant( associatedWidget()  \
); +    QPointer<RestoreAssistant> restore = new RestoreAssistant( m_parentWidget  );
     restore->exec();
     delete restore;
 }
@@ -164,7 +166,7 @@
 void Dock::infoMessage( const QString &message, const QString &title )
 {
     KPassivePopup::message( title.isEmpty() ? i18n( "Akonadi message" ) : title,
-                            message, associatedWidget()  );
+                            message, m_parentWidget  );
 }
 
 void Dock::slotInstanceError( const Akonadi::AgentInstance& agent, const QString& \
message ) @@ -174,13 +176,13 @@
 
 void Dock::errorMessage( const QString &message, const QString &title )
 {
-    KMessageBox::error( associatedWidget() , message,
+    KMessageBox::error( m_parentWidget , message,
                         title.isEmpty() ?i18n( "Akonadi error" ) : title );
 }
 
 qlonglong Dock::getWinId()
 {
-    return ( qlonglong )associatedWidget() ->winId();
+    return ( qlonglong )m_parentWidget ->winId();
 }
 
 void Dock::slotConfigure()
--- trunk/KDE/kdepim/akonadi/tray/dock.h #964066:964067
@@ -77,6 +77,7 @@
 
 private:
     void updateMenu( bool );
+    QWidget *m_parentWidget;
     QAction *m_title;
     QAction *m_stopAction;
     QAction *m_startAction;


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

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