Removed warning from QPixmap::handle().
authorSamuel Rødal <samuel.rodal@nokia.com>
Tue, 26 Apr 2011 15:20:11 +0000 (17:20 +0200)
committerOlivier Goffart <olivier.goffart@nokia.com>
Tue, 10 May 2011 10:54:49 +0000 (12:54 +0200)
With the new fromX11Pixmap function there are valid use-cases where
checking the handle() is useful also with the raster graphicssystem.

Reviewed-by: Thiago Macieira
(cherry picked from commit 1124f41253edd0e03704db72b0e1b6b4b518bd0f)

src/gui/image/qpixmap.cpp

index 34804e5..c34f6ac 100644 (file)
@@ -1224,12 +1224,8 @@ Qt::HANDLE QPixmap::handle() const
 {
 #if defined(Q_WS_X11)
     const QPixmapData *pd = pixmapData();
-    if (pd) {
-        if (pd->classId() == QPixmapData::X11Class)
-            return static_cast<const QX11PixmapData*>(pd)->handle();
-        else
-            qWarning("QPixmap::handle(): Pixmap is not an X11 class pixmap");
-    }
+    if (pd && pd->classId() == QPixmapData::X11Class)
+        return static_cast<const QX11PixmapData*>(pd)->handle();
 #endif
     return 0;
 }