Fix compile with -no-widgets

Remove more unnecessary references to QtWidgets in accessibility
implementation.

Disable accessibility tests (which rely on QtWidgets) when QtWidgets is
not available.

Change-Id: I57315537779d31af1245d42d1b4c49174016da54
Reviewed-by: Jens Bache-Wiig <jens.bache-wiig@digia.com>
Reviewed-by: Frederik Gladhorn <frederik.gladhorn@digia.com>
bb10
Rohan McGovern 2012-10-18 11:14:57 +10:00 committed by The Qt Project
parent 0b23cd186c
commit bfbeaffda8
3 changed files with 5 additions and 4 deletions

View File

@ -42,7 +42,7 @@
#include "application_p.h"
#include <QtWidgets/qapplication.h>
#include <QtCore/qcoreapplication.h>
#include <QtDBus/qdbuspendingreply.h>
#include <qdebug.h>
@ -204,7 +204,7 @@ void QSpiApplicationAdaptor::notifyKeyboardListenerCallback(const QDBusMessage&
delete event.second;
} else {
QPair<QObject*, QKeyEvent*> event = keyEvents.dequeue();
QApplication::postEvent(event.first, event.second);
QCoreApplication::postEvent(event.first, event.second);
}
}
@ -213,7 +213,7 @@ void QSpiApplicationAdaptor::notifyKeyboardListenerError(const QDBusError& error
qWarning() << QStringLiteral("QSpiApplication::keyEventError ") << error.name() << error.message();
while (!keyEvents.isEmpty()) {
QPair<QObject*, QKeyEvent*> event = keyEvents.dequeue();
QApplication::postEvent(event.first, event.second);
QCoreApplication::postEvent(event.first, event.second);
}
}

View File

@ -45,7 +45,6 @@
#include <QtGui/qguiapplication.h>
#include <qdbusmessage.h>
#include <qdbusreply.h>
#include <QtWidgets/qwidget.h>
#include <qclipboard.h>
#include <qdebug.h>

View File

@ -39,6 +39,8 @@ contains(QT_CONFIG, no-widgets): SUBDIRS -= \
qnetworkaccessmanager_and_qprogressdialog \
qsharedpointer_and_qwidget \
windowsmobile \
qaccessibility \
qaccessibilitylinux \
testcocoon: SUBDIRS -= headersclean