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>
This commit is contained in:
Frederik Gladhorn 2012-12-12 12:02:23 +01:00 committed by The Qt Project
parent 10e4b0c110
commit ff20caae2b
2 changed files with 4 additions and 4 deletions

View File

@ -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();
}

View File

@ -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();
}