Fix a memory leak

We create dirtyOnScreenWidgets even if QT_NO_OPENGL is defined,
but dtor deletes this object  only if no QT_NO_OPENGL is defined.
Also, copy ctor/assignment operator must be disabled for such a class.

Task-number: QTBUG-47499
Change-Id: I9f8b5721ff6324fa7b28b715af68d0a5496c5eb5
Reviewed-by: Laszlo Agocs <laszlo.agocs@theqtcompany.com>
bb10
Timur Pocheptsov 2015-07-28 17:38:34 +02:00 committed by Timur Pocheptsov
parent e9eeb68a65
commit 462e537e03
2 changed files with 3 additions and 2 deletions

View File

@ -763,9 +763,8 @@ QWidgetBackingStore::~QWidgetBackingStore()
#ifndef QT_NO_OPENGL
delete widgetTextures;
delete dirtyOnScreenWidgets;
#endif
dirtyOnScreenWidgets = 0;
delete dirtyOnScreenWidgets;
}
//parent's coordinates; move whole rect; update parent and widget

View File

@ -301,6 +301,8 @@ private:
friend class QWidgetPrivate;
friend class QWidget;
friend class QBackingStore;
Q_DISABLE_COPY(QWidgetBackingStore)
};
QT_END_NAMESPACE