OSDN Git Service

correct return type of qt_x11Handle()
authorIvailo Monev <xakepa10@laimg.moc>
Sun, 30 Jun 2019 15:16:17 +0000 (15:16 +0000)
committerIvailo Monev <xakepa10@laimg.moc>
Sun, 30 Jun 2019 15:16:17 +0000 (15:16 +0000)
Signed-off-by: Ivailo Monev <xakepa10@laimg.moc>
src/gui/painting/qpaintdevice_x11.cpp
src/gui/painting/qpaintengine_x11.cpp

index 9897e38..52f634c 100644 (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
-
-
index d4c1352..16906ad 100644 (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);