summaryrefslogtreecommitdiffstats
path: root/src/widgets/itemviews/qstyleditemdelegate.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'src/widgets/itemviews/qstyleditemdelegate.cpp')
-rw-r--r--src/widgets/itemviews/qstyleditemdelegate.cpp6
1 files changed, 5 insertions, 1 deletions
diff --git a/src/widgets/itemviews/qstyleditemdelegate.cpp b/src/widgets/itemviews/qstyleditemdelegate.cpp
index bda3325adb..716df2c729 100644
--- a/src/widgets/itemviews/qstyleditemdelegate.cpp
+++ b/src/widgets/itemviews/qstyleditemdelegate.cpp
@@ -42,9 +42,13 @@
#include <qabstractitemmodel.h>
#include <qapplication.h>
#include <qbrush.h>
+#if QT_CONFIG(lineedit)
#include <qlineedit.h>
+#endif
+#if QT_CONFIG(textedit)
#include <qtextedit.h>
#include <qplaintextedit.h>
+#endif
#include <qpainter.h>
#include <qpalette.h>
#include <qpoint.h>
@@ -501,7 +505,7 @@ void QStyledItemDelegate::updateEditorGeometry(QWidget *editor,
// let the editor take up all available space
//if the editor is not a QLineEdit
//or it is in a QTableView
-#if QT_CONFIG(tableview) && !defined(QT_NO_LINEEDIT)
+#if QT_CONFIG(tableview) && QT_CONFIG(lineedit)
if (qobject_cast<QExpandingLineEdit*>(editor) && !qobject_cast<const QTableView*>(widget))
opt.showDecorationSelected = editor->style()->styleHint(QStyle::SH_ItemView_ShowDecorationSelected, 0, editor);
else