File libqt5-fix-a-memory-leak-dirtyOnScreenWidgets.patch of Package libqt5-qtbase.1959

From 462e537e0334838a9bf90735f9fd14e1b91fc987 Mon Sep 17 00:00:00 2001
From: Timur Pocheptsov <Timur.Pocheptsov@digia.com>
Date: Tue, 28 Jul 2015 17:38:34 +0200
Subject: [PATCH] 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>
---
 src/widgets/kernel/qwidgetbackingstore.cpp | 3 +--
 src/widgets/kernel/qwidgetbackingstore_p.h | 2 ++
 2 files changed, 3 insertions(+), 2 deletions(-)

diff --git a/src/widgets/kernel/qwidgetbackingstore.cpp b/src/widgets/kernel/qwidgetbackingstore.cpp
index d107083..fff75d8 100644
--- a/src/widgets/kernel/qwidgetbackingstore.cpp
+++ b/src/widgets/kernel/qwidgetbackingstore.cpp
@@ -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
diff --git a/src/widgets/kernel/qwidgetbackingstore_p.h b/src/widgets/kernel/qwidgetbackingstore_p.h
index bcffa3b..b7ee7e4 100644
--- a/src/widgets/kernel/qwidgetbackingstore_p.h
+++ b/src/widgets/kernel/qwidgetbackingstore_p.h
@@ -301,6 +301,8 @@ private:
     friend class QWidgetPrivate;
     friend class QWidget;
     friend class QBackingStore;
+
+    Q_DISABLE_COPY(QWidgetBackingStore)
 };
 
 QT_END_NAMESPACE
-- 
2.6.2