diff options
author | Frederik Gladhorn <frederik.gladhorn@digia.com> | 2012-12-12 12:02:23 +0100 |
---|---|---|
committer | The Qt Project <gerrit-noreply@qt-project.org> | 2012-12-16 19:41:58 +0100 |
commit | ff20caae2be743794a90f94128e454526e8b835f (patch) | |
tree | d8859319e7a3cc3d6b4276cd4fe803b9603739d3 | |
parent | 10e4b0c110a21a7c3234c109b8911ca9d83aec1b (diff) |
Accessibility: Activate in QGuiApp instead of QApp.
This makes it possible to use accessibility with
QQuickWindow.
Change-Id: I5fccd5f25021c4953b03e146705f48a198dbaaa7
Reviewed-by: Jan Arve Sæther <jan-arve.saether@digia.com>
-rw-r--r-- | src/gui/kernel/qguiapplication.cpp | 4 | ||||
-rw-r--r-- | src/widgets/kernel/qapplication.cpp | 4 |
2 files changed, 4 insertions, 4 deletions
diff --git a/src/gui/kernel/qguiapplication.cpp b/src/gui/kernel/qguiapplication.cpp index 7abda84bfa..72e95c996c 100644 --- a/src/gui/kernel/qguiapplication.cpp +++ b/src/gui/kernel/qguiapplication.cpp @@ -60,6 +60,7 @@ #include <QtCore/private/qthread_p.h> #include <QtCore/qdir.h> #include <QtDebug> +#include "qaccessible.h" #include <qpalette.h> #include <qscreen.h> #include "qsessionmanager.h" @@ -1184,6 +1185,9 @@ QPlatformNativeInterface *QGuiApplication::platformNativeInterface() */ int QGuiApplication::exec() { +#ifndef QT_NO_ACCESSIBILITY + QAccessible::setRootObject(qApp); +#endif return QCoreApplication::exec(); } diff --git a/src/widgets/kernel/qapplication.cpp b/src/widgets/kernel/qapplication.cpp index 4922e2e778..9d3c5f8616 100644 --- a/src/widgets/kernel/qapplication.cpp +++ b/src/widgets/kernel/qapplication.cpp @@ -41,7 +41,6 @@ #include "qplatformdefs.h" #include "qabstracteventdispatcher.h" -#include "qaccessible.h" #include "qapplication.h" #include "qclipboard.h" #include "qcursor.h" @@ -2662,9 +2661,6 @@ int QApplication::startDragDistance() */ int QApplication::exec() { -#ifndef QT_NO_ACCESSIBILITY - QAccessible::setRootObject(qApp); -#endif return QGuiApplication::exec(); } |