Merge branch 'qt_fix_unitialised_fields' of https://github.com/GeoTeric/wxWidgets
Add missing field initialization to a number of wxQt controls. See https://github.com/wxWidgets/wxWidgets/pull/1092
This commit is contained in:
@@ -20,6 +20,8 @@ wxIMPLEMENT_DYNAMIC_CLASS(wxApp, wxEvtHandler);
|
||||
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,7 +112,8 @@ bool wxComboBox::Create(wxWindow *parent, wxWindowID id,
|
||||
const wxValidator& validator,
|
||||
const wxString& name )
|
||||
{
|
||||
return Create( parent, id, value, pos, size, choices.size(), &choices[ 0 ],
|
||||
const wxString *pChoices = choices.size() ? &choices[ 0 ] : NULL;
|
||||
return Create(parent, id, value, pos, size, choices.size(), pChoices,
|
||||
style, validator, name );
|
||||
}
|
||||
|
||||
|
@@ -117,14 +117,50 @@ bool wxQtDCImpl::CanGetTextExtent() const
|
||||
|
||||
void wxQtDCImpl::DoGetSize(int *width, int *height) const
|
||||
{
|
||||
if (width) *width = m_qtPainter->device()->width();
|
||||
if (height) *height = m_qtPainter->device()->height();
|
||||
QPaintDevice *pDevice = m_qtPainter->device();
|
||||
|
||||
int deviceWidth;
|
||||
int deviceHeight;
|
||||
|
||||
if ( pDevice )
|
||||
{
|
||||
deviceWidth = pDevice->width();
|
||||
deviceHeight = pDevice->height();
|
||||
}
|
||||
else
|
||||
{
|
||||
deviceWidth = 0;
|
||||
deviceHeight = 0;
|
||||
|
||||
}
|
||||
if ( width )
|
||||
*width = deviceWidth;
|
||||
if ( height )
|
||||
*height = deviceHeight;
|
||||
}
|
||||
|
||||
void wxQtDCImpl::DoGetSizeMM(int* width, int* height) const
|
||||
{
|
||||
if (width) *width = m_qtPainter->device()->widthMM();
|
||||
if (height) *height = m_qtPainter->device()->heightMM();
|
||||
QPaintDevice *pDevice = m_qtPainter->device();
|
||||
|
||||
int deviceWidthMM;
|
||||
int deviceHeightMM;
|
||||
|
||||
if ( pDevice )
|
||||
{
|
||||
deviceWidthMM = pDevice->widthMM();
|
||||
deviceHeightMM = pDevice->heightMM();
|
||||
}
|
||||
else
|
||||
{
|
||||
deviceWidthMM = 0;
|
||||
deviceHeightMM = 0;
|
||||
}
|
||||
|
||||
if ( width )
|
||||
*width = deviceWidthMM;
|
||||
if ( height )
|
||||
*height = deviceHeightMM;
|
||||
}
|
||||
|
||||
int wxQtDCImpl::GetDepth() const
|
||||
|
@@ -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)
|
||||
{
|
||||
}
|
||||
|
||||
|
@@ -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;
|
||||
}
|
||||
|
||||
|
@@ -1074,6 +1074,7 @@ bool wxWindowQt::QtHandlePaintEvent ( QWidget *handler, QPaintEvent *event )
|
||||
dc.SetDeviceClippingRegion( m_updateRegion );
|
||||
|
||||
wxEraseEvent erase( GetId(), &dc );
|
||||
erase.SetEventObject(this);
|
||||
if ( ProcessWindowEvent(erase) )
|
||||
{
|
||||
// background erased, don't do it again
|
||||
|
Reference in New Issue
Block a user