aboutsummaryrefslogtreecommitdiffstats
path: root/src/quicktemplates2
diff options
context:
space:
mode:
Diffstat (limited to 'src/quicktemplates2')
-rw-r--r--src/quicktemplates2/qquickcombobox.cpp6
-rw-r--r--src/quicktemplates2/qtquicktemplates2global.cpp2
2 files changed, 6 insertions, 2 deletions
diff --git a/src/quicktemplates2/qquickcombobox.cpp b/src/quicktemplates2/qquickcombobox.cpp
index ea8d3d1d..b715659f 100644
--- a/src/quicktemplates2/qquickcombobox.cpp
+++ b/src/quicktemplates2/qquickcombobox.cpp
@@ -1740,7 +1740,11 @@ void QQuickComboBox::focusInEvent(QFocusEvent *event)
{
Q_D(QQuickComboBox);
QQuickControl::focusInEvent(event);
- if (d->contentItem && isEditable())
+ // Setting focus on TextField should not be done when drop down indicator was clicked
+ // That is why, if focus is not set with key reason, it should not be passed to textEdit by default.
+ // Focus on Edit Text should be set only intentionally by user.
+ if ((event->reason() == Qt::TabFocusReason || event->reason() == Qt::BacktabFocusReason ||
+ event->reason() == Qt::ShortcutFocusReason) && d->contentItem && isEditable())
d->contentItem->forceActiveFocus(event->reason());
}
diff --git a/src/quicktemplates2/qtquicktemplates2global.cpp b/src/quicktemplates2/qtquicktemplates2global.cpp
index 9b79d60c..5d7816b4 100644
--- a/src/quicktemplates2/qtquicktemplates2global.cpp
+++ b/src/quicktemplates2/qtquicktemplates2global.cpp
@@ -42,7 +42,7 @@
QT_BEGIN_NAMESPACE
#if QT_CONFIG(accessibility)
-QAccessibleInterface *qQuickAccessibleFactory(const QString &classname, QObject *object)
+static QAccessibleInterface *qQuickAccessibleFactory(const QString &classname, QObject *object)
{
if (classname == u"QQuickPage") {
return new QAccessibleQuickPage(qobject_cast<QQuickPage *>(object));