Commit 26582140 authored by Francois Cartegnie's avatar Francois Cartegnie

Qt: EPG fix memleak

parent 2f1aa52f
...@@ -64,6 +64,13 @@ EPGWidget::EPGWidget( QWidget *parent ) : QWidget( parent ) ...@@ -64,6 +64,13 @@ EPGWidget::EPGWidget( QWidget *parent ) : QWidget( parent )
this, SIGNAL(itemSelectionChanged(EPGEvent*)) ); this, SIGNAL(itemSelectionChanged(EPGEvent*)) );
} }
EPGWidget::~EPGWidget()
{
foreach( const QString &str, m_events.uniqueKeys() )
foreach( EPGEvent *item, m_events.values( str ) )
delete item;
}
void EPGWidget::setZoom( int level ) void EPGWidget::setZoom( int level )
{ {
double scale = (double)level / 20; double scale = (double)level / 20;
......
...@@ -42,6 +42,7 @@ class EPGWidget : public QWidget ...@@ -42,6 +42,7 @@ class EPGWidget : public QWidget
Q_OBJECT Q_OBJECT
public: public:
explicit EPGWidget( QWidget* parent = 0 ); explicit EPGWidget( QWidget* parent = 0 );
~EPGWidget();
public slots: public slots:
void setZoom( int level ); void setZoom( int level );
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment