summaryrefslogtreecommitdiffstats
path: root/src
diff options
context:
space:
mode:
authorGirish Ramakrishnan <girish.1.ramakrishnan@nokia.com>2012-05-19 20:43:05 -0700
committerQt by Nokia <qt-info@nokia.com>2012-05-21 13:00:20 +0200
commitca86d1e8c3c820937f5aa165cd1f761884da6e0b (patch)
tree6165178b60147993ccbce1330346ffb3b2abf93f /src
parent53a1e74009e5de5031d5a0c6b855440bf406a675 (diff)
Don't create QBackingStore for QDesktopWidget
QDesktopWidget doesn't need a backing store since it cannot be painted on. Since the QDesktopWidget is always created, this change avoids any resources created in the QPlatformBackingStore contructor. Change-Id: I33679c98363f9c0d7ea64d9c5e27327679ad92a0 Reviewed-by: Friedemann Kleint <Friedemann.Kleint@nokia.com>
Diffstat (limited to 'src')
-rw-r--r--src/widgets/kernel/qwidget_qpa.cpp2
1 files changed, 1 insertions, 1 deletions
diff --git a/src/widgets/kernel/qwidget_qpa.cpp b/src/widgets/kernel/qwidget_qpa.cpp
index c4d1fb1d0d..262165a024 100644
--- a/src/widgets/kernel/qwidget_qpa.cpp
+++ b/src/widgets/kernel/qwidget_qpa.cpp
@@ -137,7 +137,7 @@ void QWidgetPrivate::create_sys(WId window, bool initializeWindow, bool destroyO
QBackingStore *store = q->backingStore();
if (!store) {
- if (win)
+ if (win && q->windowType() != Qt::Desktop)
q->setBackingStore(new QBackingStore(win));
else
q->setAttribute(Qt::WA_PaintOnScreen, true);