Fix compile with -no-widgets
authorRohan McGovern <rohan.mcgovern@nokia.com>
Thu, 18 Oct 2012 01:14:57 +0000 (11:14 +1000)
committerThe Qt Project <gerrit-noreply@qt-project.org>
Thu, 18 Oct 2012 10:24:11 +0000 (12:24 +0200)
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>
src/platformsupport/linuxaccessibility/application.cpp
src/platformsupport/linuxaccessibility/atspiadaptor.cpp
tests/auto/other/other.pro

index 0b9f1ce..c2049e5 100644 (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);
     }
 }
 
index 68c1f8a..bea84d0 100644 (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>
index 0d96c7d..eb6ed66 100644 (file)
@@ -39,6 +39,8 @@ contains(QT_CONFIG, no-widgets): SUBDIRS -= \
    qnetworkaccessmanager_and_qprogressdialog \
    qsharedpointer_and_qwidget \
    windowsmobile \
+   qaccessibility \
+   qaccessibilitylinux \
 
 testcocoon: SUBDIRS -= headersclean