SVN commit 851495 by bram: Forward port r851493: Fix memleak. M +4 -2 konqtabs.cpp M +2 -0 konqtabs.h --- trunk/KDE/kdebase/apps/konqueror/src/konqtabs.cpp #851494:851495 @@ -133,7 +133,8 @@ m_pPopupMenu(0), m_pSubPopupMenuTab(0), m_rightWidget(0), m_leftWidget(0), m_alwaysTabBar(false), - m_closeOtherTabsId(0) + m_closeOtherTabsId(0), + m_konqTabsStyle( new KonqTabsStyle( this ) ) { // Set an object name so the widget style can identify this widget. setObjectName("kde_konq_tabwidget"); @@ -142,7 +143,7 @@ // Set the widget style to a forwarding proxy style that removes the tabwidget frame, // and draws a tabbar base underneath the tabbar. - setStyle(new KonqTabsStyle(this)); + setStyle(m_konqTabsStyle); // The base will be drawn on the frame instead of on the tabbar, so it extends across // the whole widget. @@ -225,6 +226,7 @@ //kDebug(1202) << "KonqFrameTabs::~KonqFrameTabs() " << this << " - " << className(); qDeleteAll( m_childFrameList ); m_childFrameList.clear(); + delete m_konqTabsStyle; } void KonqFrameTabs::saveConfig( KConfigGroup& config, const QString &prefix, const KonqFrameBase::Options &options, --- trunk/KDE/kdebase/apps/konqueror/src/konqtabs.h #851494:851495 @@ -36,6 +36,7 @@ class KonqViewManager; class KonqFrameContainerBase; class KonqFrameContainer; +class KonqTabsStyle; class KConfig; class KonqFrameTabs : public KTabWidget, public KonqFrameContainerBase @@ -127,6 +128,7 @@ bool m_alwaysTabBar; bool m_MouseMiddleClickClosesTab; int m_closeOtherTabsId; + KonqTabsStyle *m_konqTabsStyle; friend class KonqTabsStyle; };