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

List:       kde-commits
Subject:    KDE/kdelibs/kdeui/widgets
From:       Aaron J. Seigo <aseigo () kde ! org>
Date:       2010-10-26 16:54:35
Message-ID: 20101026165436.01C2EAC897 () svn ! kde ! org
[Download RAW message or body]

SVN commit 1190023 by aseigo:

clean up the style created by the widget; the style itself doesn't set a parent \
widget. i believe this is due to the usual semantics of QStyle which is to be shared \
amongst widgets, making automatic QObject based deletion non-standard and even \
dangerous for QStyles. in this case, though, it does need to be deleted as there is a \
1:1 relationship between the line edit and the style object. so to keep memory from \
leaking and to keep with the usual QStyle semantics, leave it up to KLineEdit to \
clean it up.

KLineEdit unit tests still pass after this commit.

thanks to Joris Guisson for the valgrinding and reporting.

BUG:255118


 M  +1 -0      klineedit.cpp  


--- trunk/KDE/kdelibs/kdeui/widgets/klineedit.cpp #1190022:1190023
@@ -92,6 +92,7 @@
     {
 // causes a weird crash in KWord at least, so let Qt delete it for us.
 //        delete completionBox;
+        delete style.data();
     }
 
     void _k_slotSettingsChanged(int category)


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

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