diff options
Diffstat (limited to 'src/widgets/widgets/qcombobox.cpp')
-rw-r--r-- | src/widgets/widgets/qcombobox.cpp | 6 |
1 files changed, 4 insertions, 2 deletions
diff --git a/src/widgets/widgets/qcombobox.cpp b/src/widgets/widgets/qcombobox.cpp index 5520e9d28f..84d81fa089 100644 --- a/src/widgets/widgets/qcombobox.cpp +++ b/src/widgets/widgets/qcombobox.cpp @@ -47,7 +47,9 @@ #include <qapplication.h> #include <qdesktopwidget.h> #include <qlistview.h> +#if QT_CONFIG(tableview) #include <qtableview.h> +#endif #include <qitemdelegate.h> #include <qmap.h> #include <qmenu.h> @@ -598,7 +600,7 @@ int QComboBoxPrivateContainer::topMargin() const { if (const QListView *lview = qobject_cast<const QListView*>(view)) return lview->spacing(); -#ifndef QT_NO_TABLEVIEW +#if QT_CONFIG(tableview) if (const QTableView *tview = qobject_cast<const QTableView*>(view)) return tview->showGrid() ? 1 : 0; #endif @@ -613,7 +615,7 @@ int QComboBoxPrivateContainer::spacing() const QListView *lview = qobject_cast<QListView*>(view); if (lview) return 2 * lview->spacing(); // QListView::spacing is the padding around the item. -#ifndef QT_NO_TABLEVIEW +#if QT_CONFIG(tableview) QTableView *tview = qobject_cast<QTableView*>(view); if (tview) return tview->showGrid() ? 1 : 0; |