correct return type of qt_x11Handle()

Signed-off-by: Ivailo Monev <xakepa10@laimg.moc>
This commit is contained in:
Ivailo Monev 2019-06-30 15:16:17 +00:00
parent 1eb096aa40
commit 82628bd75e
2 changed files with 5 additions and 11 deletions

View file

@ -51,11 +51,11 @@ QT_BEGIN_NAMESPACE
/*! \internal
Returns the X11 Drawable of the paint device. 0 is returned if it
Returns the X11 handle of the paint device. 0 is returned if it
can't be obtained.
*/
Drawable Q_GUI_EXPORT qt_x11Handle(const QPaintDevice *pd)
Qt::HANDLE Q_GUI_EXPORT qt_x11Handle(const QPaintDevice *pd)
{
if (!pd) return 0;
if (pd->devType() == QInternal::Widget)
@ -73,18 +73,12 @@ Drawable Q_GUI_EXPORT qt_x11Handle(const QPaintDevice *pd)
*/
const Q_GUI_EXPORT QX11Info *qt_x11Info(const QPaintDevice *pd)
{
if (!pd) return 0;
if (!pd) return Q_NULLPTR;
if (pd->devType() == QInternal::Widget)
return &static_cast<const QWidget *>(pd)->x11Info();
else if (pd->devType() == QInternal::Pixmap)
return &static_cast<const QPixmap *>(pd)->x11Info();
return 0;
return Q_NULLPTR;
}
QT_END_NAMESPACE

View file

@ -81,7 +81,7 @@
QT_BEGIN_NAMESPACE
extern Drawable qt_x11Handle(const QPaintDevice *pd);
extern Qt::HANDLE qt_x11Handle(const QPaintDevice *pd);
extern const QX11Info *qt_x11Info(const QPaintDevice *pd);
extern QPixmap qt_pixmapForBrush(int brushStyle, bool invert); //in qbrush.cpp
extern QPixmap qt_toX11Pixmap(const QPixmap &pixmap);