summaryrefslogtreecommitdiffstats
path: root/src/widgets/widgets
diff options
context:
space:
mode:
authorStephan Binner <stephan.binner@basyskom.com>2017-07-09 16:55:03 +0200
committerStephan Binner <stephan.binner@basyskom.com>2017-07-15 16:46:38 +0000
commit773178900f39febb0509cb4170bc091c9f91d3b3 (patch)
treea0bcc17a72f075793cf2438cd260e03b577ef277 /src/widgets/widgets
parenta23568be6c6859b3a149cfadb1104da4f32318f5 (diff)
Convert features.treeview to QT_[REQUIRE_]CONFIG
Change-Id: I4a036a0410615ac563b17f7715c47acccb8abfca Reviewed-by: Oswald Buddenhagen <oswald.buddenhagen@qt.io>
Diffstat (limited to 'src/widgets/widgets')
-rw-r--r--src/widgets/widgets/qcombobox.cpp6
1 files changed, 4 insertions, 2 deletions
diff --git a/src/widgets/widgets/qcombobox.cpp b/src/widgets/widgets/qcombobox.cpp
index 84d81fa089..6a8167b5e5 100644
--- a/src/widgets/widgets/qcombobox.cpp
+++ b/src/widgets/widgets/qcombobox.cpp
@@ -56,7 +56,9 @@
#include <qevent.h>
#include <qlayout.h>
#include <qscrollbar.h>
+#if QT_CONFIG(treeview)
#include <qtreeview.h>
+#endif
#include <qheaderview.h>
#include <qmath.h>
#include <qmetaobject.h>
@@ -2602,7 +2604,7 @@ void QComboBox::showPopup()
int count = 0;
QStack<QModelIndex> toCheck;
toCheck.push(view()->rootIndex());
-#ifndef QT_NO_TREEVIEW
+#if QT_CONFIG(treeview)
QTreeView *treeView = qobject_cast<QTreeView*>(view());
if (treeView && treeView->header() && !treeView->header()->isHidden())
listHeight += treeView->header()->height();
@@ -2614,7 +2616,7 @@ void QComboBox::showPopup()
if (!idx.isValid())
continue;
listHeight += view()->visualRect(idx).height();
-#ifndef QT_NO_TREEVIEW
+#if QT_CONFIG(treeview)
if (d->model->hasChildren(idx) && treeView && treeView->isExpanded(idx))
toCheck.push(idx);
#endif