From 6bf48f3e54011b7c59c5e6502f91108cf02d6499 Mon Sep 17 00:00:00 2001 From: Albert Astals Cid Date: Tue, 29 Mar 2016 21:48:14 +0200 Subject: [PATCH 09/12] Fix Qt4 build --- CMakeLists.txt | 2 +- src/qaccessibilityclient/registry_p.cpp | 4 ++++ tests/auto/tst_accessibilityclient.cpp | 4 ++++ 3 files changed, 9 insertions(+), 1 deletion(-) diff --git a/CMakeLists.txt b/CMakeLists.txt index 233a765..76c92df 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -40,7 +40,7 @@ else (QT5_BUILD) if (${QT4_FOUND}) message("Using Qt 4") include(${QT_USE_FILE}) - add_definitions(${QT_DEFINITIONS}) + add_definitions(${QT_DEFINITIONS} -DQT4_BUILD) include_directories(${QT4_INCLUDES} ${QT_INCLUDE_DIR} ${QT_QT_INCLUDE_DIR} ${QT_QTDBUS_INCLUDE_DIR}) endif (${QT4_FOUND}) endif (QT5_BUILD) diff --git a/src/qaccessibilityclient/registry_p.cpp b/src/qaccessibilityclient/registry_p.cpp index c86eee8..7112d80 100644 --- a/src/qaccessibilityclient/registry_p.cpp +++ b/src/qaccessibilityclient/registry_p.cpp @@ -40,6 +40,10 @@ #include #include +#ifdef QT4_BUILD +#define QStringLiteral(x) QLatin1String(x) +#endif + // interface names from at-spi2-core/atspi/atspi-misc-private.h #define ATSPI_DBUS_NAME_REGISTRY "org.a11y.atspi.Registry" #define ATSPI_DBUS_PATH_REGISTRY "/org/a11y/atspi/registry" diff --git a/tests/auto/tst_accessibilityclient.cpp b/tests/auto/tst_accessibilityclient.cpp index 3aaa892..8d7df13 100644 --- a/tests/auto/tst_accessibilityclient.cpp +++ b/tests/auto/tst_accessibilityclient.cpp @@ -37,6 +37,10 @@ #include "atspi/dbusconnection.h" +#ifdef QT4_BUILD +#define QStringLiteral(x) QLatin1String(x) +#endif + typedef QSharedPointer QAIPointer; using namespace QAccessibleClient; -- 2.9.4