diff options
author | Tarja Sundqvist <tarja.sundqvist@qt.io> | 2024-05-08 08:17:16 +0300 |
---|---|---|
committer | Tarja Sundqvist <tarja.sundqvist@qt.io> | 2024-05-08 08:17:16 +0300 |
commit | 86c62c8f6088ec148512457cb7e964661ba643b0 (patch) | |
tree | 15f82dc1436a5dd229fed729e15afb18bfafde62 /src/widgets/widgets | |
parent | 4e158f6bfa7d0747d8da70b3b15a44b52e35bb8a (diff) | |
parent | 5ca8cfaa56043163997be2a6188812a8cd1c289c (diff) |
Merge remote-tracking branch 'origin/tqtc/lts-5.15.14' into tqtc/lts-5.15-opensourcev5.15.14-lts-lgpl5.15
Change-Id: Ibe29c3c6b47675d0a342bff3db91e79a3ea8a166
Diffstat (limited to 'src/widgets/widgets')
-rw-r--r-- | src/widgets/widgets/qcombobox.cpp | 2 | ||||
-rw-r--r-- | src/widgets/widgets/qtabbar.cpp | 3 | ||||
-rw-r--r-- | src/widgets/widgets/qwidgettextcontrol.cpp | 5 |
3 files changed, 9 insertions, 1 deletions
diff --git a/src/widgets/widgets/qcombobox.cpp b/src/widgets/widgets/qcombobox.cpp index 7a496c27e0..422082da6c 100644 --- a/src/widgets/widgets/qcombobox.cpp +++ b/src/widgets/widgets/qcombobox.cpp @@ -2685,10 +2685,12 @@ bool QComboBoxPrivate::showNativePopup() QVariant textVariant = model->data(rowIndex, Qt::EditRole); item->setText(textVariant.toString()); QVariant iconVariant = model->data(rowIndex, Qt::DecorationRole); + const Qt::ItemFlags itemFlags = model->flags(rowIndex); if (iconVariant.canConvert<QIcon>()) item->setIcon(iconVariant.value<QIcon>()); item->setCheckable(true); item->setChecked(i == currentIndex); + item->setEnabled(itemFlags & Qt::ItemIsEnabled); if (!currentItem || i == currentIndex) currentItem = item; diff --git a/src/widgets/widgets/qtabbar.cpp b/src/widgets/widgets/qtabbar.cpp index 9a382e96dd..7f80fcc250 100644 --- a/src/widgets/widgets/qtabbar.cpp +++ b/src/widgets/widgets/qtabbar.cpp @@ -2190,7 +2190,8 @@ void QTabBar::mouseMoveEvent(QMouseEvent *event) } } // Buttons needs to follow the dragged tab - d->layoutTab(d->pressedIndex); + if (d->pressedIndex != -1) + d->layoutTab(d->pressedIndex); update(); } diff --git a/src/widgets/widgets/qwidgettextcontrol.cpp b/src/widgets/widgets/qwidgettextcontrol.cpp index ba9b6e0587..9493f090ec 100644 --- a/src/widgets/widgets/qwidgettextcontrol.cpp +++ b/src/widgets/widgets/qwidgettextcontrol.cpp @@ -2057,6 +2057,11 @@ void QWidgetTextControlPrivate::inputMethodEvent(QInputMethodEvent *e) || e->preeditString() != cursor.block().layout()->preeditAreaText() || e->replacementLength() > 0; + if (!isGettingInput && e->attributes().isEmpty()) { + e->ignore(); + return; + } + int oldCursorPos = cursor.position(); cursor.beginEditBlock(); |