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

List:       kde-commits
Subject:    KDE/kdelibs/plasma/widgets
From:       Riccardo Iaconelli <riccardo () kde ! org>
Date:       2009-09-01 12:01:31
Message-ID: 1251806491.292795.20014.nullmailer () svn ! kde ! org
[Download RAW message or body]

SVN commit 1018177 by ruphy:

fix a huge leak :-)

Signed-off-by: Riccardo Iaconelli <riccardo@kde.org>

 M  +8 -6      label.cpp  


--- trunk/KDE/kdelibs/plasma/widgets/label.cpp #1018176:1018177
@@ -47,6 +47,7 @@
     ~LabelPrivate()
     {
         delete svg;
+        delete native;
     }
 
     void setPixmap(Label *q)
@@ -89,23 +90,24 @@
     QString absImagePath;
     Svg *svg;
     bool textSelectable;
+    QLabel *native;
 };
 
 Label::Label(QGraphicsWidget *parent)
     : QGraphicsProxyWidget(parent),
       d(new LabelPrivate(this))
 {
-    QLabel *native = new QLabel;
+    d->native = new QLabel;
     d->textSelectable = false;
-    connect(native, SIGNAL(linkActivated(QString)), this, SIGNAL(linkActivated(QString)));
-    connect(native, SIGNAL(linkHovered(QString)), this, SIGNAL(linkHovered(QString)));
+    connect(d->native, SIGNAL(linkActivated(QString)), this, SIGNAL(linkActivated(QString)));
+    connect(d->native, SIGNAL(linkHovered(QString)), this, SIGNAL(linkHovered(QString)));
 
     connect(Theme::defaultTheme(), SIGNAL(themeChanged()), this, SLOT(setPalette()));
     connect(KGlobalSettings::self(), SIGNAL(kdisplayPaletteChanged()), this, SLOT(setPalette()));
 
-    native->setAttribute(Qt::WA_NoSystemBackground);
-    native->setWordWrap(true);
-    setWidget(native);
+    d->native->setAttribute(Qt::WA_NoSystemBackground);
+    d->native->setWordWrap(true);
+    setWidget(d->native);
     d->setPalette();
 }
 
[prev in list] [next in list] [prev in thread] [next in thread] 

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