summaryrefslogtreecommitdiffstats
path: root/src/widgets
diff options
context:
space:
mode:
authorChristoph Schleifenbaum <christoph.schleifenbaum@kdab.com>2015-07-04 16:22:50 +0200
committerMarc Mutz <marc.mutz@kdab.com>2015-07-13 19:40:25 +0000
commitc9dd554ea600f5a3c23053a507c2ef1e4c124f4e (patch)
treeb554a7ddbc4584592927d3e4780211c55c6faad3 /src/widgets
parent4b17bc34977329aa68fefdd1e2c9428adaa65356 (diff)
QComboBox: Fix compilation with QT_NO_COMPLETER
Change-Id: Ie57b06ebbddaa0801e265e6908da1548fe02085a Task-number: QTBUG-46871 Reviewed-by: Marc Mutz <marc.mutz@kdab.com> Reviewed-by: André Hartmann <aha_1980@gmx.de>
Diffstat (limited to 'src/widgets')
-rw-r--r--src/widgets/widgets/qcombobox.cpp2
1 files changed, 2 insertions, 0 deletions
diff --git a/src/widgets/widgets/qcombobox.cpp b/src/widgets/widgets/qcombobox.cpp
index ba19b63c12..cc4c3416f0 100644
--- a/src/widgets/widgets/qcombobox.cpp
+++ b/src/widgets/widgets/qcombobox.cpp
@@ -2092,8 +2092,10 @@ void QComboBoxPrivate::setCurrentIndex(const QModelIndex &mi)
const QString newText = itemText(normalized);
if (lineEdit->text() != newText) {
lineEdit->setText(newText);
+#ifndef QT_NO_COMPLETER
if (lineEdit->completer())
lineEdit->completer()->setCompletionPrefix(newText);
+#endif
}
updateLineEditGeometry();
}