Allow NULL width and/or height pointer parameters in wxQT, thanks @seandepagnier
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@77915 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
This commit is contained in:
@@ -82,14 +82,14 @@ bool wxQtDCImpl::CanGetTextExtent() const
|
|||||||
|
|
||||||
void wxQtDCImpl::DoGetSize(int *width, int *height) const
|
void wxQtDCImpl::DoGetSize(int *width, int *height) const
|
||||||
{
|
{
|
||||||
*width = m_qtPainter->device()->width();
|
if (width) *width = m_qtPainter->device()->width();
|
||||||
*height = m_qtPainter->device()->height();
|
if (height) *height = m_qtPainter->device()->height();
|
||||||
}
|
}
|
||||||
|
|
||||||
void wxQtDCImpl::DoGetSizeMM(int* width, int* height) const
|
void wxQtDCImpl::DoGetSizeMM(int* width, int* height) const
|
||||||
{
|
{
|
||||||
*width = m_qtPainter->device()->widthMM();
|
if (width) *width = m_qtPainter->device()->widthMM();
|
||||||
*height = m_qtPainter->device()->heightMM();
|
if (height) *height = m_qtPainter->device()->heightMM();
|
||||||
}
|
}
|
||||||
|
|
||||||
int wxQtDCImpl::GetDepth() const
|
int wxQtDCImpl::GetDepth() const
|
||||||
|
@@ -782,8 +782,8 @@ void wxWindowQt::DoGetSize(int *width, int *height) const
|
|||||||
wxASSERT( size.width() == rect.width() );
|
wxASSERT( size.width() == rect.width() );
|
||||||
wxASSERT( size.height() == rect.height() );
|
wxASSERT( size.height() == rect.height() );
|
||||||
|
|
||||||
*width = rect.width();
|
if (width) *width = rect.width();
|
||||||
*height = rect.height();
|
if (height) *height = rect.height();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
@@ -815,8 +815,8 @@ void wxWindowQt::DoSetSize(int x, int y, int width, int height, int sizeFlags )
|
|||||||
void wxWindowQt::DoGetClientSize(int *width, int *height) const
|
void wxWindowQt::DoGetClientSize(int *width, int *height) const
|
||||||
{
|
{
|
||||||
QRect geometry = GetHandle()->geometry();
|
QRect geometry = GetHandle()->geometry();
|
||||||
*width = geometry.width();
|
if (width) *width = geometry.width();
|
||||||
*height = geometry.height();
|
if (height) *height = geometry.height();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
Reference in New Issue
Block a user