From ad05af534dc61b0c07b2c676d8f1ff040d9fbf7b Mon Sep 17 00:00:00 2001 From: Bjoern Breitmeyer Date: Wed, 30 Jan 2013 14:02:28 +0100 Subject: Fixed QT_NO_ACCESSIBILITY build. Change-Id: I14229753fc2e3b54da8a285ae9d27201b73e24be Reviewed-by: Friedemann Kleint --- src/gui/accessible/qaccessible.h | 2 ++ src/gui/kernel/qguiapplication.cpp | 2 ++ src/widgets/styles/qstylehelper.cpp | 12 ++---------- src/widgets/styles/qstylehelper_p.h | 2 ++ 4 files changed, 8 insertions(+), 10 deletions(-) (limited to 'src') diff --git a/src/gui/accessible/qaccessible.h b/src/gui/accessible/qaccessible.h index d316ec4f10..5988e6c346 100644 --- a/src/gui/accessible/qaccessible.h +++ b/src/gui/accessible/qaccessible.h @@ -39,6 +39,7 @@ ** ****************************************************************************/ +#ifndef QT_NO_ACCESSIBILITY #ifndef QACCESSIBLE_H #define QACCESSIBLE_H @@ -681,3 +682,4 @@ QT_END_NAMESPACE QT_END_HEADER #endif // QACCESSIBLE_H +#endif //!QT_NO_ACCESSIBILITY diff --git a/src/gui/kernel/qguiapplication.cpp b/src/gui/kernel/qguiapplication.cpp index 02ae51bfc2..c155ecfe0c 100644 --- a/src/gui/kernel/qguiapplication.cpp +++ b/src/gui/kernel/qguiapplication.cpp @@ -60,7 +60,9 @@ #include #include #include +#ifndef QT_NO_ACCESSIBILITY #include "qaccessible.h" +#endif #include #include #include "qsessionmanager.h" diff --git a/src/widgets/styles/qstylehelper.cpp b/src/widgets/styles/qstylehelper.cpp index 6d8a3ce0c3..75c74e4a88 100644 --- a/src/widgets/styles/qstylehelper.cpp +++ b/src/widgets/styles/qstylehelper.cpp @@ -86,17 +86,13 @@ qreal dpiScaled(qreal value) #endif } +#ifndef QT_NO_ACCESSIBILITY bool isInstanceOf(QObject *obj, QAccessible::Role role) { bool match = false; -#ifndef QT_NO_ACCESSIBILITY QAccessibleInterface *iface = QAccessible::queryAccessibleInterface(obj); match = iface && iface->role() == role; delete iface; -#else - Q_UNUSED(obj) - Q_UNUSED(role) -#endif // QT_NO_ACCESSIBILITY return match; } @@ -104,19 +100,15 @@ bool isInstanceOf(QObject *obj, QAccessible::Role role) bool hasAncestor(QObject *obj, QAccessible::Role role) { bool found = false; -#ifndef QT_NO_ACCESSIBILITY QObject *parent = obj ? obj->parent() : 0; while (parent && !found) { if (isInstanceOf(parent, role)) found = true; parent = parent->parent(); } -#else - Q_UNUSED(obj) - Q_UNUSED(role) -#endif // QT_NO_ACCESSIBILITY return found; } +#endif // QT_NO_ACCESSIBILITY #ifndef QT_NO_DIAL diff --git a/src/widgets/styles/qstylehelper_p.h b/src/widgets/styles/qstylehelper_p.h index 41f823def7..01772e765c 100644 --- a/src/widgets/styles/qstylehelper_p.h +++ b/src/widgets/styles/qstylehelper_p.h @@ -82,8 +82,10 @@ namespace QStyleHelper void drawBorderPixmap(const QPixmap &pixmap, QPainter *painter, const QRect &rect, int left = 0, int top = 0, int right = 0, int bottom = 0); +#ifndef QT_NO_ACCESSIBILITY bool isInstanceOf(QObject *obj, QAccessible::Role role); bool hasAncestor(QObject *obj, QAccessible::Role role); +#endif } -- cgit v1.2.3