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

List:       kde-commits
Subject:    KDE/kdeplasma-addons/applets/incomingmsg
From:       Artur Duque de Souza <morpheuz () gmail ! com>
Date:       2009-01-16 1:31:02
Message-ID: 1232069462.755816.6002.nullmailer () svn ! kde ! org
[Download RAW message or body]

SVN commit 911742 by asouza:

Fix bug on incoming message and code cleanup

Put all 'deletes' inside clearLayout() (as this is what it's doing,
clearing the layout).


 M  +5 -2      incomingmsg.cpp  
 M  +2 -0      incomingmsg.h  


--- trunk/KDE/kdeplasma-addons/applets/incomingmsg/incomingmsg.cpp #911741:911742
@@ -289,7 +289,7 @@
     }
 }
 
-void IncomingMsg::initLayout()
+void IncomingMsg::clearLayout()
 {
     delete mKMailLayout;
     mKMailLayout = NULL;
@@ -321,8 +321,10 @@
 
     delete mErrorLabel;
     mErrorLabel = NULL;
+}
 
-    delete mLayout;
+void IncomingMsg::initLayout()
+{
     mLayout = new QGraphicsLinearLayout(Qt::Vertical);
 
     //initEvolutionLayout();
@@ -373,6 +375,7 @@
     cg.writeEntry("showKopete", ui.showKopete->isChecked());
     cg.writeEntry("showPidgin", ui.showPidgin->isChecked());
 
+    clearLayout();
     initLayout();
 }
 
--- trunk/KDE/kdeplasma-addons/applets/incomingmsg/incomingmsg.h #911741:911742
@@ -61,7 +61,9 @@
     void configAccepted();
 
 private:
+    void clearLayout();
     void initLayout();
+
     // text labels
     Plasma::Label *mEvolutionLabel, *mEvolutionIconLabel,
         *mKMailLabel, *mKMailIconLabel, *mXChatLabel,
[prev in list] [next in list] [prev in thread] [next in thread] 

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