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>
bb10
Christoph Schleifenbaum 2015-07-04 16:22:50 +02:00 committed by Marc Mutz
parent 4b17bc3497
commit c9dd554ea6
1 changed files with 2 additions and 0 deletions

View File

@ -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();
}