Replaced backing store reference count with list of visible widgets
authorGareth Stockwell <ext-gareth.stockwell@nokia.com>
Tue, 10 Aug 2010 15:34:19 +0000 (16:34 +0100)
committerJason McDonald <jason.mcdonald@nokia.com>
Thu, 2 Sep 2010 06:34:29 +0000 (16:34 +1000)
commitc97b258792730d8cd7e47a92ac232012cb0c7a14
treef7df33b7df792393948c8b1aa725299a39b9ecfd
parentd7d27b511c33dc8f649bffa8876f9213e6697365
Replaced backing store reference count with list of visible widgets

Previously, the following sequence:
  1. Widget is hidden
  2. Widget partially revealed
  3. Widget fully revealed
resulted in the reference count of the backing store owned by the
widget's window() being incremented twice.

This patch replaces the simple reference count with a QSet which
stores pointers to the native widgets which are descendents of
the backing store owner, and which are currently visible.  The
sequence above therefore results in just a single insertion at
step (2), with step (3) having no effect on the backing store.

The QRefCountedWidgetBackingStore class has been renamed
QWidgetBackingStoreTracker to better reflect its purpose.

Task-number: QTBUG-12800
Task-number: QTBUG-12817
Reviewed-by: Jason Barron
(cherry picked from commit cb8d2dcc70846ccd9384a8b94b2a80821c0eb285)
src/gui/kernel/qapplication_s60.cpp
src/gui/kernel/qwidget.cpp
src/gui/kernel/qwidget_p.h