Merge branch 'wxQt-memory-leaks' of https://github.com/catalinr/wxWidgets
Fix many memory leaks in wxQt port. See https://github.com/wxWidgets/wxWidgets/pull/1243
This commit is contained in:
@@ -43,7 +43,7 @@ public:
|
||||
wxAcceleratorTable(int n, const wxAcceleratorEntry entries[]);
|
||||
|
||||
// Implementation
|
||||
QList < QShortcut* > *ConvertShortcutTable( QWidget *parent ) const;
|
||||
wxVector<QShortcut*> ConvertShortcutTable( QWidget *parent ) const;
|
||||
|
||||
bool Ok() const { return IsOk(); }
|
||||
bool IsOk() const;
|
||||
|
@@ -9,6 +9,8 @@
|
||||
#ifndef _WX_QT_APP_H_
|
||||
#define _WX_QT_APP_H_
|
||||
|
||||
#include <wx/scopedarray.h>
|
||||
|
||||
class QApplication;
|
||||
class WXDLLIMPEXP_CORE wxApp : public wxAppBase
|
||||
{
|
||||
@@ -19,9 +21,9 @@ public:
|
||||
virtual bool Initialize(int& argc, wxChar **argv);
|
||||
|
||||
private:
|
||||
QApplication *m_qtApplication;
|
||||
wxScopedPtr<QApplication> m_qtApplication;
|
||||
int m_qtArgc;
|
||||
char **m_qtArgv;
|
||||
wxScopedArray<char*> m_qtArgv;
|
||||
|
||||
wxDECLARE_DYNAMIC_CLASS_NO_COPY( wxApp );
|
||||
};
|
||||
|
@@ -45,7 +45,7 @@ private:
|
||||
void UpdateFields();
|
||||
|
||||
QStatusBar *m_qtStatusBar;
|
||||
QList< QLabel* > *m_qtPanes;
|
||||
wxVector<QLabel*> m_qtPanes;
|
||||
|
||||
wxDECLARE_DYNAMIC_CLASS(wxStatusBar);
|
||||
};
|
||||
|
@@ -216,24 +216,24 @@ protected:
|
||||
|
||||
private:
|
||||
void Init();
|
||||
QScrollArea *m_qtContainer;
|
||||
QScrollArea *m_qtContainer; // either NULL or the same as m_qtWindow pointer
|
||||
|
||||
QScrollBar *m_horzScrollBar;
|
||||
QScrollBar *m_vertScrollBar;
|
||||
QScrollBar *m_horzScrollBar; // owned by m_qtWindow when allocated
|
||||
QScrollBar *m_vertScrollBar; // owned by m_qtWindow when allocated
|
||||
|
||||
QScrollBar *QtGetScrollBar( int orientation ) const;
|
||||
QScrollBar *QtSetScrollBar( int orientation, QScrollBar *scrollBar=NULL );
|
||||
|
||||
bool QtSetBackgroundStyle();
|
||||
|
||||
QPicture *m_qtPicture;
|
||||
QPainter *m_qtPainter;
|
||||
QPicture *m_qtPicture; // not owned
|
||||
wxScopedPtr<QPainter> m_qtPainter; // always allocated
|
||||
|
||||
bool m_mouseInside;
|
||||
|
||||
#if wxUSE_ACCEL
|
||||
QList< QShortcut* > *m_qtShortcuts;
|
||||
wxQtShortcutHandler *m_qtShortcutHandler;
|
||||
wxVector<QShortcut*> m_qtShortcuts; // owned by whatever GetHandle() returns
|
||||
wxScopedPtr<wxQtShortcutHandler> m_qtShortcutHandler; // always allocated
|
||||
bool m_processingShortcut;
|
||||
#endif // wxUSE_ACCEL
|
||||
|
||||
|
Reference in New Issue
Block a user