Do not leak the list of panes
This commit is contained in:
@@ -10,6 +10,8 @@
|
|||||||
|
|
||||||
#include "wx/statusbr.h"
|
#include "wx/statusbr.h"
|
||||||
|
|
||||||
|
#include <QtCore/QScopedPointer>
|
||||||
|
|
||||||
class QLabel;
|
class QLabel;
|
||||||
class QStatusBar;
|
class QStatusBar;
|
||||||
|
|
||||||
@@ -45,7 +47,7 @@ private:
|
|||||||
void UpdateFields();
|
void UpdateFields();
|
||||||
|
|
||||||
QStatusBar *m_qtStatusBar;
|
QStatusBar *m_qtStatusBar;
|
||||||
QList< QLabel* > *m_qtPanes;
|
QScopedPointer< QList<QLabel*> > m_qtPanes; // should this really be a pointer?
|
||||||
|
|
||||||
wxDECLARE_DYNAMIC_CLASS(wxStatusBar);
|
wxDECLARE_DYNAMIC_CLASS(wxStatusBar);
|
||||||
};
|
};
|
||||||
|
@@ -48,7 +48,7 @@ bool wxStatusBar::Create(wxWindow *parent, wxWindowID WXUNUSED(winid),
|
|||||||
long style, const wxString& WXUNUSED(name))
|
long style, const wxString& WXUNUSED(name))
|
||||||
{
|
{
|
||||||
m_qtStatusBar = new wxQtStatusBar( parent, this );
|
m_qtStatusBar = new wxQtStatusBar( parent, this );
|
||||||
m_qtPanes = new QList < QLabel* >;
|
m_qtPanes.reset(new QList<QLabel*>());
|
||||||
|
|
||||||
if ( style & wxSTB_SIZEGRIP )
|
if ( style & wxSTB_SIZEGRIP )
|
||||||
m_qtStatusBar->setSizeGripEnabled(true);
|
m_qtStatusBar->setSizeGripEnabled(true);
|
||||||
@@ -106,7 +106,6 @@ void wxStatusBar::Refresh( bool eraseBackground, const wxRect *rect )
|
|||||||
void wxStatusBar::Init()
|
void wxStatusBar::Init()
|
||||||
{
|
{
|
||||||
m_qtStatusBar = NULL;
|
m_qtStatusBar = NULL;
|
||||||
m_qtPanes = NULL;
|
|
||||||
}
|
}
|
||||||
|
|
||||||
void wxStatusBar::UpdateFields()
|
void wxStatusBar::UpdateFields()
|
||||||
|
Reference in New Issue
Block a user