QComboBox: remove dead keyboard-navigation code
The code called setEditFocus, which no longer exists anywhere in Qt. Change-Id: Icd02b8d8b204819188e090e7462309e5c5a5b3d6 Reviewed-by: Richard Moe Gustavsen <richard.gustavsen@qt.io>
This commit is contained in:
parent
ffb9dee1b0
commit
ad80533473
@ -226,15 +226,6 @@ void QComboBoxPrivate::_q_completerActivated(const QModelIndex &index)
|
||||
}
|
||||
}
|
||||
#endif
|
||||
|
||||
# ifdef QT_KEYPAD_NAVIGATION
|
||||
if ( QApplicationPrivate::keypadNavigationEnabled()
|
||||
&& q->isEditable()
|
||||
&& q->completer()
|
||||
&& q->completer()->completionMode() == QCompleter::UnfilteredPopupCompletion ) {
|
||||
q->setEditFocus(false);
|
||||
}
|
||||
# endif // QT_KEYPAD_NAVIGATION
|
||||
}
|
||||
#endif // QT_CONFIG(completer)
|
||||
|
||||
@ -2568,17 +2559,6 @@ void QComboBox::showPopup()
|
||||
return;
|
||||
#endif // Q_OS_MAC
|
||||
|
||||
#ifdef QT_KEYPAD_NAVIGATION
|
||||
#if QT_CONFIG(completer)
|
||||
if (QApplicationPrivate::keypadNavigationEnabled() && d->completer) {
|
||||
// editable combo box is line edit plus completer
|
||||
setEditFocus(true);
|
||||
d->completer->complete(); // show popup
|
||||
return;
|
||||
}
|
||||
#endif
|
||||
#endif
|
||||
|
||||
// set current item and select it
|
||||
QItemSelectionModel::SelectionFlags selectionMode = QItemSelectionModel::ClearAndSelect;
|
||||
if (view()->selectionBehavior() == QAbstractItemView::SelectRows)
|
||||
@ -2783,10 +2763,6 @@ void QComboBox::showPopup()
|
||||
#endif
|
||||
|
||||
container->update();
|
||||
#ifdef QT_KEYPAD_NAVIGATION
|
||||
if (QApplicationPrivate::keypadNavigationEnabled())
|
||||
view()->setEditFocus(true);
|
||||
#endif
|
||||
if (startTimer) {
|
||||
container->popupTimer.start();
|
||||
container->maybeIgnoreMouseButtonRelease = true;
|
||||
@ -2855,11 +2831,6 @@ void QComboBoxPrivate::doHidePopup()
|
||||
if (container && container->isVisible())
|
||||
container->hide();
|
||||
|
||||
#ifdef QT_KEYPAD_NAVIGATION
|
||||
if (QApplicationPrivate::keypadNavigationEnabled() && isEditable() && hasFocus())
|
||||
setEditFocus(true);
|
||||
#endif
|
||||
|
||||
_q_resetButton();
|
||||
}
|
||||
|
||||
@ -3066,9 +3037,7 @@ bool QComboBox::event(QEvent *event)
|
||||
break;
|
||||
#ifdef QT_KEYPAD_NAVIGATION
|
||||
case QEvent::EnterEditFocus:
|
||||
if (!d->lineEdit)
|
||||
setEditFocus(false); // We never want edit focus if we are not editable
|
||||
else
|
||||
if (d->lineEdit)
|
||||
d->lineEdit->event(event); //so cursor starts
|
||||
break;
|
||||
case QEvent::LeaveEditFocus:
|
||||
|
Loading…
Reference in New Issue
Block a user