diff options
author | Samuel Rødal <samuel.rodal@nokia.com> | 2010-09-18 09:26:24 (GMT) |
---|---|---|
committer | Samuel Rødal <samuel.rodal@nokia.com> | 2010-09-18 09:41:32 (GMT) |
commit | 072be90e0240ec544a9f2910e7e1c6533d1efc68 (patch) | |
tree | 342b03238bd8a7f6b5b5e9bb358c3bb54b3deb0a /src/gui/image/qpixmap.cpp | |
parent | d9d62f176bddc62d9ec0d3b91654bd1d331416a0 (diff) | |
download | Qt-072be90e0240ec544a9f2910e7e1c6533d1efc68.zip Qt-072be90e0240ec544a9f2910e7e1c6533d1efc68.tar.gz Qt-072be90e0240ec544a9f2910e7e1c6533d1efc68.tar.bz2 |
Give a warning in QPixmap::handle() if pixmap is not X11 class.
Reviewed-by: Markus Goetz
Diffstat (limited to 'src/gui/image/qpixmap.cpp')
-rw-r--r-- | src/gui/image/qpixmap.cpp | 8 |
1 files changed, 6 insertions, 2 deletions
diff --git a/src/gui/image/qpixmap.cpp b/src/gui/image/qpixmap.cpp index 0445b46..04c53f9 100644 --- a/src/gui/image/qpixmap.cpp +++ b/src/gui/image/qpixmap.cpp @@ -1182,8 +1182,12 @@ Qt::HANDLE QPixmap::handle() const { #if defined(Q_WS_X11) const QPixmapData *pd = pixmapData(); - if (pd && pd->classId() == QPixmapData::X11Class) - return static_cast<const QX11PixmapData*>(pd)->handle(); + 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"); + } #endif return 0; } |