summaryrefslogtreecommitdiffstats
path: root/src/widgets/styles/qstylehelper.cpp
diff options
context:
space:
mode:
authorBjoern Breitmeyer <bjoern.breitmeyer@kdab.com>2013-01-30 14:02:28 +0100
committerThe Qt Project <gerrit-noreply@qt-project.org>2013-02-13 09:50:28 +0100
commitad05af534dc61b0c07b2c676d8f1ff040d9fbf7b (patch)
tree1a8c57dd7e7b2c44cdae364de389da0ece0eff85 /src/widgets/styles/qstylehelper.cpp
parente95a758236cf2c68e33da4ddb62bff4fe8d9dd8b (diff)
Fixed QT_NO_ACCESSIBILITY build.
Change-Id: I14229753fc2e3b54da8a285ae9d27201b73e24be Reviewed-by: Friedemann Kleint <Friedemann.Kleint@digia.com>
Diffstat (limited to 'src/widgets/styles/qstylehelper.cpp')
-rw-r--r--src/widgets/styles/qstylehelper.cpp12
1 files changed, 2 insertions, 10 deletions
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