Fix crashes due to unitialised fields
This commit is contained in:
@@ -20,6 +20,8 @@ wxIMPLEMENT_DYNAMIC_CLASS(wxApp, wxAppBase);
|
||||
wxApp::wxApp()
|
||||
{
|
||||
m_qtApplication = NULL;
|
||||
m_qtArgc = 0;
|
||||
m_qtArgv = NULL;
|
||||
}
|
||||
|
||||
|
||||
|
@@ -46,7 +46,8 @@ void wxQtCheckBox::clicked( bool checked )
|
||||
}
|
||||
|
||||
|
||||
wxCheckBox::wxCheckBox()
|
||||
wxCheckBox::wxCheckBox() :
|
||||
m_qtCheckBox(NULL)
|
||||
{
|
||||
}
|
||||
|
||||
|
@@ -37,7 +37,8 @@ void wxQtChoice::activated(int WXUNUSED(index))
|
||||
}
|
||||
|
||||
|
||||
wxChoice::wxChoice()
|
||||
wxChoice::wxChoice() :
|
||||
m_qtComboBox(NULL)
|
||||
{
|
||||
}
|
||||
|
||||
|
@@ -112,8 +112,9 @@ bool wxComboBox::Create(wxWindow *parent, wxWindowID id,
|
||||
const wxValidator& validator,
|
||||
const wxString& name )
|
||||
{
|
||||
return Create( parent, id, value, pos, size, choices.size(), &choices[ 0 ],
|
||||
style, validator, name );
|
||||
const wxString *pChoices = choices.size() ? &choices[ 0 ] : NULL;
|
||||
return Create(parent, id, value, pos, size, choices.size(), pChoices,
|
||||
style, validator, name );
|
||||
}
|
||||
|
||||
|
||||
|
@@ -29,7 +29,8 @@ wxQtProgressBar::wxQtProgressBar( wxWindow *parent, wxGauge *handler )
|
||||
}
|
||||
|
||||
|
||||
wxGauge::wxGauge()
|
||||
wxGauge::wxGauge() :
|
||||
m_qtProgressBar(NULL)
|
||||
{
|
||||
}
|
||||
|
||||
|
@@ -45,7 +45,8 @@ void wxQtListWidget::doubleClicked( const QModelIndex &index )
|
||||
}
|
||||
|
||||
|
||||
wxListBox::wxListBox()
|
||||
wxListBox::wxListBox() :
|
||||
m_qtListWidget(NULL)
|
||||
{
|
||||
Init();
|
||||
}
|
||||
|
@@ -154,6 +154,7 @@ void wxListCtrl::Init()
|
||||
m_ownsImageListSmall = false;
|
||||
m_imageListState = NULL;
|
||||
m_ownsImageListState = false;
|
||||
m_qtTreeWidget = NULL;
|
||||
}
|
||||
|
||||
wxListCtrl::~wxListCtrl()
|
||||
|
@@ -50,7 +50,8 @@ void wxQtTabWidget::currentChanged(int index)
|
||||
}
|
||||
|
||||
|
||||
wxNotebook::wxNotebook()
|
||||
wxNotebook::wxNotebook() :
|
||||
m_qtTabWidget(NULL)
|
||||
{
|
||||
}
|
||||
|
||||
|
@@ -56,7 +56,10 @@ void wxQtButtonGroup::buttonClicked(int index) {
|
||||
wxIMPLEMENT_DYNAMIC_CLASS(wxRadioBox, wxControl);
|
||||
|
||||
|
||||
wxRadioBox::wxRadioBox()
|
||||
wxRadioBox::wxRadioBox() :
|
||||
m_qtGroupBox(NULL),
|
||||
m_qtButtonGroup(NULL),
|
||||
m_qtBoxLayout(NULL)
|
||||
{
|
||||
}
|
||||
|
||||
@@ -149,7 +152,7 @@ bool wxRadioBox::Create(wxWindow *parent,
|
||||
// GetMajorDim() is the number of rows.
|
||||
if ( style & wxRA_SPECIFY_COLS )
|
||||
m_qtBoxLayout = new QHBoxLayout;
|
||||
else if ( style & wxRA_SPECIFY_ROWS )
|
||||
else
|
||||
m_qtBoxLayout = new QVBoxLayout;
|
||||
|
||||
AddChoices< QRadioButton >( m_qtButtonGroup, m_qtBoxLayout, n, choices );
|
||||
@@ -242,6 +245,9 @@ bool wxRadioBox::Show(unsigned int n, bool show)
|
||||
|
||||
bool wxRadioBox::Show( bool show )
|
||||
{
|
||||
if (!m_qtGroupBox)
|
||||
return false;
|
||||
|
||||
if( m_qtGroupBox->isVisible() == show )
|
||||
{
|
||||
for( unsigned int i = 0; i < GetCount(); ++i )
|
||||
|
@@ -13,7 +13,8 @@
|
||||
|
||||
#include <QtWidgets/QRadioButton>
|
||||
|
||||
wxRadioButton::wxRadioButton()
|
||||
wxRadioButton::wxRadioButton() :
|
||||
m_qtRadioButton(NULL)
|
||||
{
|
||||
}
|
||||
|
||||
|
@@ -27,7 +27,8 @@ class wxQtScrollBar : public wxQtEventSignalHandler< QScrollBar, wxScrollBar >
|
||||
};
|
||||
|
||||
|
||||
wxScrollBar::wxScrollBar()
|
||||
wxScrollBar::wxScrollBar() :
|
||||
m_qtScrollBar(NULL)
|
||||
{
|
||||
}
|
||||
|
||||
|
@@ -46,7 +46,8 @@ void wxQtSlider::valueChanged(int position)
|
||||
}
|
||||
|
||||
|
||||
wxSlider::wxSlider()
|
||||
wxSlider::wxSlider() :
|
||||
m_qtSlider(NULL)
|
||||
{
|
||||
}
|
||||
|
||||
|
@@ -41,7 +41,8 @@ void wxQtSpinButton::valueChanged(int value)
|
||||
}
|
||||
|
||||
|
||||
wxSpinButton::wxSpinButton()
|
||||
wxSpinButton::wxSpinButton() :
|
||||
m_qtSpinBox(NULL)
|
||||
{
|
||||
}
|
||||
|
||||
|
@@ -18,7 +18,8 @@
|
||||
#include <QtWidgets/QSpinBox>
|
||||
|
||||
template< typename T, typename Widget >
|
||||
wxSpinCtrlQt< T, Widget >::wxSpinCtrlQt()
|
||||
wxSpinCtrlQt< T, Widget >::wxSpinCtrlQt() :
|
||||
m_qtSpinBox(NULL)
|
||||
{
|
||||
}
|
||||
|
||||
|
@@ -21,7 +21,8 @@ public:
|
||||
};
|
||||
|
||||
|
||||
wxStaticBitmap::wxStaticBitmap()
|
||||
wxStaticBitmap::wxStaticBitmap() :
|
||||
m_qtLabel(NULL)
|
||||
{
|
||||
}
|
||||
|
||||
|
@@ -23,7 +23,8 @@ public:
|
||||
};
|
||||
|
||||
|
||||
wxStaticBox::wxStaticBox()
|
||||
wxStaticBox::wxStaticBox() :
|
||||
m_qtGroupBox(NULL)
|
||||
{
|
||||
}
|
||||
|
||||
|
@@ -12,7 +12,8 @@
|
||||
|
||||
#include <QtWidgets/QFrame>
|
||||
|
||||
wxStaticLine::wxStaticLine()
|
||||
wxStaticLine::wxStaticLine() :
|
||||
m_qtFrame(NULL)
|
||||
{
|
||||
}
|
||||
|
||||
|
@@ -22,7 +22,8 @@ public:
|
||||
};
|
||||
|
||||
|
||||
wxStaticText::wxStaticText()
|
||||
wxStaticText::wxStaticText() :
|
||||
m_qtLabel(NULL)
|
||||
{
|
||||
}
|
||||
|
||||
|
@@ -105,6 +105,7 @@ void wxStatusBar::Refresh( bool eraseBackground, const wxRect *rect )
|
||||
|
||||
void wxStatusBar::Init()
|
||||
{
|
||||
m_qtStatusBar = NULL;
|
||||
m_qtPanes = NULL;
|
||||
}
|
||||
|
||||
|
@@ -90,7 +90,9 @@ void wxQtTextEdit::textChanged()
|
||||
}
|
||||
|
||||
|
||||
wxTextCtrl::wxTextCtrl()
|
||||
wxTextCtrl::wxTextCtrl() :
|
||||
m_qtLineEdit(NULL),
|
||||
m_qtTextEdit(NULL)
|
||||
{
|
||||
}
|
||||
|
||||
|
Reference in New Issue
Block a user