Accessibility Linux: Do not depend on external libatspi2

This has (and still does) caused lots of grief since
it means accessibility was often unintendedly not built.

Instead copy the lib-at-spi-2 header file needed for the
type enum and build it by default again.

Change-Id: I1ba26f20edff1aeb444c96a37928f36230ac7576
Reviewed-by: J-P Nurmi <jpnurmi@digia.com>
This commit is contained in:
Frederik Gladhorn 2012-11-01 17:50:56 +01:00 committed by The Qt Project
parent 15b5ed3294
commit 4c1c8207b9
6 changed files with 1253 additions and 13 deletions

6
configure vendored
View File

@ -4982,14 +4982,14 @@ if [ "$CFG_ACCESSIBILITY" != "no" ]; then
if [ "$CFG_XCB" = "no" ]; then if [ "$CFG_XCB" = "no" ]; then
CFG_ACCESSIBILITY=yes CFG_ACCESSIBILITY=yes
else else
# linux/xcb accessibility needs dbus and atspi-2 # linux/xcb accessibility needs dbus
if [ "$CFG_DBUS" != "no" ] && [ -n "$PKG_CONFIG" ] && $PKG_CONFIG --exists "atspi-2" 2>/dev/null; then if [ "$CFG_DBUS" != "no" ] && [ -n "$PKG_CONFIG" ]; then
CFG_ACCESSIBILITY=yes CFG_ACCESSIBILITY=yes
else else
if [ "$CFG_ACCESSIBILITY" = "auto" ]; then if [ "$CFG_ACCESSIBILITY" = "auto" ]; then
CFG_ACCESSIBILITY=no CFG_ACCESSIBILITY=no
else else
echo "Accessibility support needs pkg-config and libatspi2." echo "Accessibility support needs DBus."
exit 101 exit 101
fi fi
fi fi

File diff suppressed because it is too large Load Diff

View File

@ -4,3 +4,7 @@ QDBUSXML2CPP_ADAPTOR_HEADER_FLAGS = -i struct_marshallers_p.h
DBUS_INTERFACES = $$PWD/xml/Socket.xml DBUS_INTERFACES = $$PWD/xml/Socket.xml
QDBUSXML2CPP_INTERFACE_HEADER_FLAGS = -i struct_marshallers_p.h QDBUSXML2CPP_INTERFACE_HEADER_FLAGS = -i struct_marshallers_p.h
INCLUDEPATH += $$PWD
HEADERS += $$PWD/atspi/atspi-constants.h

View File

@ -1,7 +1,5 @@
contains(QT_CONFIG, dbus):contains(QT_CONFIG, xcb):contains(QT_CONFIG, accessibility) { contains(QT_CONFIG, dbus):contains(QT_CONFIG, xcb):contains(QT_CONFIG, accessibility) {
PKGCONFIG += atspi-2
CONFIG += link_pkgconfig
QT += dbus QT += dbus
include(../../3rdparty/atspi2/atspi2.pri) include(../../3rdparty/atspi2/atspi2.pri)

View File

@ -3,15 +3,12 @@ CONFIG += testcase
# This is temporary to start running the test as part of normal CI. # This is temporary to start running the test as part of normal CI.
CONFIG += insignificant_test # QTBUG-27732 CONFIG += insignificant_test # QTBUG-27732
include($$QT_SOURCE_TREE/src/platformsupport/linuxaccessibility/linuxaccessibility.pri)
TARGET = tst_qaccessibilitylinux TARGET = tst_qaccessibilitylinux
SOURCES += tst_qaccessibilitylinux.cpp \ SOURCES += tst_qaccessibilitylinux.cpp
../../../../src/platformsupport/linuxaccessibility/dbusconnection.cpp \
../../../../src/platformsupport/linuxaccessibility/struct_marshallers.cpp
CONFIG += gui CONFIG += gui
CONFIG += link_pkgconfig
QT += gui gui-private widgets dbus testlib QT += gui gui-private widgets dbus testlib
PKGCONFIG += atspi-2

View File

@ -54,10 +54,10 @@
#include <QDBusInterface> #include <QDBusInterface>
#include <QDBusReply> #include <QDBusReply>
#include <atspi/atspi-constants.h> #include "atspi/atspi-constants.h"
#include "../../../../src/platformsupport/linuxaccessibility/dbusconnection_p.h" #include "dbusconnection_p.h"
#include "../../../../src/platformsupport/linuxaccessibility/struct_marshallers_p.h" #include "struct_marshallers_p.h"
#define COMPARE3(v1, v2, v3) QCOMPARE(v1, v3); QCOMPARE(v2, v3); #define COMPARE3(v1, v2, v3) QCOMPARE(v1, v3); QCOMPARE(v2, v3);