Revision 1190023

Go back to digest for 31st October 2010

Optimization in KDE Base

Aaron J. Seigo committed changes in /trunk/KDE/kdelibs/kdeui/widgets/klineedit.cpp:

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.

File Changes

Modified 1 files
  • /trunk/KDE/kdelibs/kdeui/widgets/klineedit.cpp
1 files changed in total