summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorDyami Caliri <dyami@dragonframe.com>2015-10-28 13:47:24 -0700
committerDyami Caliri <dyami@dragonframe.com>2015-10-30 16:42:25 +0000
commit5a7f69f82434498124f060386d518a099d3aca16 (patch)
tree35ca6f53dcdf852955e04ac571f71cf9f2583aec
parent7daae2c2c706fd5d1c1ae44ace6847bc297803a0 (diff)
Fix Vista style compilation with QT_NO_ACCESSIBILITY
A recent change uses an accessibility function even if accessibility is disabled. Change-Id: Ibf9afbb90120772065743b2f9dd3615e4e6a2f37 Reviewed-by: Gabriel de Dietrich <gabriel.dedietrich@theqtcompany.com>
-rw-r--r--src/widgets/styles/qwindowsvistastyle.cpp6
1 files changed, 4 insertions, 2 deletions
diff --git a/src/widgets/styles/qwindowsvistastyle.cpp b/src/widgets/styles/qwindowsvistastyle.cpp
index b8ed82fee3..375ada6a64 100644
--- a/src/widgets/styles/qwindowsvistastyle.cpp
+++ b/src/widgets/styles/qwindowsvistastyle.cpp
@@ -657,10 +657,12 @@ void QWindowsVistaStyle::drawPrimitive(PrimitiveElement element, const QStyleOpt
newStyle = !qobject_cast<const QTableView*>(view);
selectionBehavior = view->selectionBehavior();
selectionMode = view->selectionMode();
- } else if (!widget) {
+ }
+#ifndef QT_NO_ACCESSIBILITY
+ else if (!widget) {
newStyle = !QStyleHelper::hasAncestor(option->styleObject, QAccessible::MenuItem) ;
}
-
+#endif
if (newStyle && (vopt = qstyleoption_cast<const QStyleOptionViewItem *>(option))) {
bool selected = vopt->state & QStyle::State_Selected;
const bool hover = selectionMode != QAbstractItemView::NoSelection && (vopt->state & QStyle::State_MouseOver);