author | zecke <zecke> | 2004-09-12 23:02:35 (UTC) |
---|---|---|
committer | zecke <zecke> | 2004-09-12 23:02:35 (UTC) |
commit | 8123b75c55cb5140ae5b0c5aeddb4644a0a8ffbb (patch) (side-by-side diff) | |
tree | 2ada329a539b5143bd732be361b9bcb5e7784ec4 /libopie2/opieui/otabwidget.cpp | |
parent | 0f705db7c338e9642294823333e5f4410aa0573f (diff) | |
download | opie-8123b75c55cb5140ae5b0c5aeddb4644a0a8ffbb.zip opie-8123b75c55cb5140ae5b0c5aeddb4644a0a8ffbb.tar.gz opie-8123b75c55cb5140ae5b0c5aeddb4644a0a8ffbb.tar.bz2 |
Remove memory leak
Diffstat (limited to 'libopie2/opieui/otabwidget.cpp') (more/less context) (ignore whitespace changes)
-rw-r--r-- | libopie2/opieui/otabwidget.cpp | 5 |
1 files changed, 4 insertions, 1 deletions
diff --git a/libopie2/opieui/otabwidget.cpp b/libopie2/opieui/otabwidget.cpp index a9f7da9..d23b1c9 100644 --- a/libopie2/opieui/otabwidget.cpp +++ b/libopie2/opieui/otabwidget.cpp @@ -75,33 +75,36 @@ OTabWidget::OTabWidget( QWidget *parent, const char *name, TabStyle s, TabPositi tabBar = new OTabBar( tabBarStack, "tabbar" ); tabBarStack->addWidget( tabBar, 0 ); connect( tabBar, SIGNAL( selected(int) ), this, SLOT( slotTabBarSelected(int) ) ); tabList = new QComboBox( false, tabBarStack, "tablist" ); tabBarStack->addWidget( tabList, 1 ); connect( tabList, SIGNAL( activated(int) ), this, SLOT( slotTabListSelected(int) ) ); tabBarPosition = p; setTabStyle( s ); setTabPosition( p ); currTab= 0x0; } OTabWidget::~OTabWidget() -{} +{ + tabs.setAutoDelete( true ); + tabs.clear(); +} void OTabWidget::addTab( QWidget *child, const QString &icon, const QString &label ) { QPixmap iconset = loadSmooth( icon ); QTab *tab = new QTab(); if ( tabBarStyle == IconTab ) { tab->label = QString::null; } else { tab->label = label; } if ( tabBarStyle == IconTab || tabBarStyle == IconList ) { |