diff options
author | Volker Hilsheimer <volker.hilsheimer@qt.io> | 2022-08-26 18:00:55 +0200 |
---|---|---|
committer | Volker Hilsheimer <volker.hilsheimer@qt.io> | 2022-10-31 13:44:41 +0200 |
commit | ad805334736bc18e46c6a8bb73be6913efd7e3f2 (patch) | |
tree | 3aee6a2e833f9942c09913b21cb29d36ece821df /src/widgets/widgets/qcombobox.cpp | |
parent | ffb9dee1b0954e4d4f9e9791175609a80ecafc31 (diff) |
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>
Diffstat (limited to 'src/widgets/widgets/qcombobox.cpp')
-rw-r--r-- | src/widgets/widgets/qcombobox.cpp | 33 |
1 files changed, 1 insertions, 32 deletions
diff --git a/src/widgets/widgets/qcombobox.cpp b/src/widgets/widgets/qcombobox.cpp index 4b5508575a..b3a2531c18 100644 --- a/src/widgets/widgets/qcombobox.cpp +++ b/src/widgets/widgets/qcombobox.cpp @@ -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: |