diff options
author | Anders Bakken <anders.bakken@nokia.com> | 2009-10-15 15:15:34 (GMT) |
---|---|---|
committer | Anders Bakken <anders.bakken@nokia.com> | 2009-10-15 15:23:17 (GMT) |
commit | 739a36b3e86d6c112bc1720ec92a61433c48ee80 (patch) | |
tree | 4878757493a17904390a8519a2c5c0b4f7af8121 /src/plugins/gfxdrivers/directfb/qdirectfbscreen.h | |
parent | 8d1d511a51aa26b4d86f4cc83e1eed194441469f (diff) | |
download | Qt-739a36b3e86d6c112bc1720ec92a61433c48ee80.zip Qt-739a36b3e86d6c112bc1720ec92a61433c48ee80.tar.gz Qt-739a36b3e86d6c112bc1720ec92a61433c48ee80.tar.bz2 |
Fix a problem with QDirectFBScreen::instance
If using a proxy screen QScreen::instance() will not return a
QDirectFBScreen but rather a QProxyScreen. This patch lets
QDirectFBScreen::instance hold its own pointer.
Reviewed-by: Jervey Kong <jervey.kong@nokia.com>
Diffstat (limited to 'src/plugins/gfxdrivers/directfb/qdirectfbscreen.h')
-rw-r--r-- | src/plugins/gfxdrivers/directfb/qdirectfbscreen.h | 7 |
1 files changed, 1 insertions, 6 deletions
diff --git a/src/plugins/gfxdrivers/directfb/qdirectfbscreen.h b/src/plugins/gfxdrivers/directfb/qdirectfbscreen.h index 5e8c5c6..437f1ae 100644 --- a/src/plugins/gfxdrivers/directfb/qdirectfbscreen.h +++ b/src/plugins/gfxdrivers/directfb/qdirectfbscreen.h @@ -163,12 +163,7 @@ public: QWSWindowSurface *createSurface(QWidget *widget) const; QWSWindowSurface *createSurface(const QString &key) const; - static inline QDirectFBScreen *instance() { - QScreen *inst = QScreen::instance(); - Q_ASSERT(!inst || inst->classId() == QScreen::DirectFBClass); - return static_cast<QDirectFBScreen*>(inst); - } - + static QDirectFBScreen *instance(); void waitIdle(); IDirectFBSurface *surfaceForWidget(const QWidget *widget, QRect *rect) const; #ifdef QT_DIRECTFB_SUBSURFACE |