summaryrefslogtreecommitdiffstats
path: root/src/gui/accessible/qaccessibleobject.cpp
diff options
context:
space:
mode:
authorJian Liang <jianliang79@gmail.com>2012-02-01 14:24:00 +0800
committerQt by Nokia <qt-info@nokia.com>2012-02-02 09:27:25 +0100
commitfe999022af36f01455b8d6f4dfff6eff473a4376 (patch)
tree0a8b057372625a03e55d5dc7f50e4293aea5117a /src/gui/accessible/qaccessibleobject.cpp
parentd1950d8e5294ba016e3050442d578a18c46c97c4 (diff)
fix memory leak of QAccessibleWidget
in topLevelObjects() we should use "root->object()" instead of "w->accessibleRoot()->object() to get the object attached to the accessible interface. This is because "w->accessibleRoot()" will create a new QAccessibleWidget(or its subclass) object and this object is never released. Change-Id: I34292b467b51d6cc439f0a1a45cd74d5f8a6a5a8 Reviewed-by: Jan-Arve Sæther <jan-arve.saether@nokia.com>
Diffstat (limited to 'src/gui/accessible/qaccessibleobject.cpp')
-rw-r--r--src/gui/accessible/qaccessibleobject.cpp2
1 files changed, 1 insertions, 1 deletions
diff --git a/src/gui/accessible/qaccessibleobject.cpp b/src/gui/accessible/qaccessibleobject.cpp
index 7e1a05b2a0..b9e0ac388b 100644
--- a/src/gui/accessible/qaccessibleobject.cpp
+++ b/src/gui/accessible/qaccessibleobject.cpp
@@ -202,7 +202,7 @@ static QObjectList topLevelObjects()
if (w->windowType() != Qt::Popup && w->windowType() != Qt::Desktop) {
if (QAccessibleInterface *root = w->accessibleRoot()) {
if (root->object())
- list.append(w->accessibleRoot()->object());
+ list.append(root->object());
delete root;
}
}