diff options
| author | Peter Penz <[email protected]> | 2007-09-26 11:46:49 +0000 |
|---|---|---|
| committer | Peter Penz <[email protected]> | 2007-09-26 11:46:49 +0000 |
| commit | 8df41dd0061fb92882aefe532bd762341df64072 (patch) | |
| tree | f7efab1d01df2fad6ea7236daa1950d3f8d8ad8e /src/dolphiniconsview.cpp | |
| parent | 1c819fb0ed6871bb716ae8224270eb333a9a4cf5 (diff) | |
* Fix memory leak (DolphinCategoryDrawer is leaking...)
* There is no need to explicitly turning on the category, as this is done automatically when reading out the view properties. @Rafael: I tested your error description and could not reproduce the problem anymore. If I miss something, please let me know, so that we can work together to fix this :-)
CCMAIL: [email protected]
svn path=/trunk/KDE/kdebase/apps/; revision=717245
Diffstat (limited to 'src/dolphiniconsview.cpp')
| -rw-r--r-- | src/dolphiniconsview.cpp | 7 |
1 files changed, 7 insertions, 0 deletions
diff --git a/src/dolphiniconsview.cpp b/src/dolphiniconsview.cpp index d9bfef8a4..3da04c113 100644 --- a/src/dolphiniconsview.cpp +++ b/src/dolphiniconsview.cpp @@ -19,6 +19,7 @@ #include "dolphiniconsview.h" +#include "dolphincategorydrawer.h" #include "dolphincontroller.h" #include "dolphinsettings.h" @@ -34,6 +35,7 @@ DolphinIconsView::DolphinIconsView(QWidget* parent, DolphinController* controller) : KCategorizedView(parent), m_controller(controller), + m_categoryDrawer(0), m_itemSize(), m_dragging(false), m_dropRect() @@ -92,10 +94,15 @@ DolphinIconsView::DolphinIconsView(QWidget* parent, DolphinController* controlle m_viewOptions.decorationPosition = QStyleOptionViewItem::Left; m_viewOptions.displayAlignment = Qt::AlignLeft | Qt::AlignVCenter; } + + m_categoryDrawer = new DolphinCategoryDrawer(); + setCategoryDrawer(m_categoryDrawer); } DolphinIconsView::~DolphinIconsView() { + delete m_categoryDrawer; + m_categoryDrawer = 0; } QRect DolphinIconsView::visualRect(const QModelIndex& index) const |
