diff options
author | Jan-Arve Saether <jan-arve.saether@nokia.com> | 2011-11-24 15:33:29 +0100 |
---|---|---|
committer | Qt by Nokia <qt-info@nokia.com> | 2011-11-25 11:29:11 +0100 |
commit | 53e4dfec7be15d63f60da4fddb926579c56a20a5 (patch) | |
tree | 1ae9138ca0d045068f994c97940630b639f01455 /src/gui/accessible/qaccessible.cpp | |
parent | 84a9b009e71857192a2e7edbd569393231748b7c (diff) |
Change default implementation of window() to just return 0
Instead move the traversal up to the ancestors to the bridge.
This simplifies the default implementation to just return 0
Change-Id: Ic3ec60851f378587f4a23363aec2039d0e8a08a1
Reviewed-by: Frederik Gladhorn <frederik.gladhorn@nokia.com>
Diffstat (limited to 'src/gui/accessible/qaccessible.cpp')
-rw-r--r-- | src/gui/accessible/qaccessible.cpp | 12 |
1 files changed, 6 insertions, 6 deletions
diff --git a/src/gui/accessible/qaccessible.cpp b/src/gui/accessible/qaccessible.cpp index 5faadc8dfb..057d97a30b 100644 --- a/src/gui/accessible/qaccessible.cpp +++ b/src/gui/accessible/qaccessible.cpp @@ -1167,18 +1167,18 @@ QColor QAccessibleInterface::backgroundColor() const For instance, QAccessibleWidget reimplements this and returns the windowHandle() of the QWidget. - The default implementation returns the window() of the parent interface. - It is used on some platforms to be able to notify the AT client about state changes. + The backend will traverse up all ancestors until it finds a window. + (This means that at least one interface among the ancestors should + return a valid QWindow pointer). + + The default implementation of this returns 0. \preliminary */ QWindow *QAccessibleInterface::window() const { - QAccessibleInterface *par = parent(); - QWindow *w = par ? par->window() : 0; - delete par; - return w; + return 0; } /*! |