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>bb10
parent
53a1e74009
commit
ca86d1e8c3
|
|
@ -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);
|
||||
|
|
|
|||
Loading…
Reference in New Issue