diff options
author | Kari Oikarinen <kari.oikarinen@qt.io> | 2019-01-08 08:18:48 +0200 |
---|---|---|
committer | Kari Oikarinen <kari.oikarinen@qt.io> | 2019-01-08 08:18:48 +0200 |
commit | 71534dcff9d122891b5059baccd7f3dec21e063a (patch) | |
tree | 64de776f804cef2856fda6c59dfdc7236e26612a | |
parent | 1006eb36e58832b7142d1dfacbd1f878938fc155 (diff) | |
parent | 520657bdfa0aba68e31758c5952a01c45940cd8f (diff) |
Merge 5.12 into 5.12.1
Change-Id: I442b103e352bc49b35fb816104c87c112e2fd958
-rw-r--r-- | .qmake.conf | 2 | ||||
-rw-r--r-- | dist/changes-5.11.3 | 20 | ||||
-rw-r--r-- | src/imports/controls/fusion/ComboBox.qml | 1 | ||||
-rw-r--r-- | src/imports/controls/imagine/ComboBox.qml | 1 | ||||
-rw-r--r-- | src/imports/controls/universal/ComboBox.qml | 1 | ||||
-rw-r--r-- | src/quicktemplates2/qquickcombobox.cpp | 2 | ||||
-rw-r--r-- | src/quicktemplates2/qquicktextfield.cpp | 16 | ||||
-rw-r--r-- | tests/auto/controls/data/tst_textfield.qml | 27 | ||||
-rw-r--r-- | tests/auto/qquickstyle/tst_qquickstyle.cpp | 4 |
9 files changed, 70 insertions, 4 deletions
diff --git a/.qmake.conf b/.qmake.conf index 54e0cdc8..0d16d9ba 100644 --- a/.qmake.conf +++ b/.qmake.conf @@ -4,4 +4,4 @@ DEFINES += QT_NO_FOREACH QQC2_SOURCE_TREE = $$PWD -MODULE_VERSION = 5.12.0 +MODULE_VERSION = 5.12.1 diff --git a/dist/changes-5.11.3 b/dist/changes-5.11.3 new file mode 100644 index 00000000..f71fa341 --- /dev/null +++ b/dist/changes-5.11.3 @@ -0,0 +1,20 @@ +Qt 5.11.3 is a bug-fix release. It maintains both forward and backward +compatibility (source and binary) with Qt 5.11.0 through 5.11.2. + +For more details, refer to the online documentation included in this +distribution. The documentation is also available online: + +http://doc.qt.io/qt-5/index.html + +The Qt version 5.11 series is binary compatible with the 5.10.x series. +Applications compiled for 5.10 will continue to run with 5.11. + +Some of the changes listed in this file include issue tracking numbers +corresponding to tasks in the Qt Bug Tracker: + +https://bugreports.qt.io/ + +Each of these identifiers can be entered in the bug tracker to obtain more +information about a particular change. + + - This release contains only minor code improvements. diff --git a/src/imports/controls/fusion/ComboBox.qml b/src/imports/controls/fusion/ComboBox.qml index 012dbbd0..3ecb0cf2 100644 --- a/src/imports/controls/fusion/ComboBox.qml +++ b/src/imports/controls/fusion/ComboBox.qml @@ -57,6 +57,7 @@ T.ComboBox { delegate: MenuItem { width: parent.width text: control.textRole ? (Array.isArray(control.model) ? modelData[control.textRole] : model[control.textRole]) : modelData + font.weight: control.currentIndex === index ? Font.DemiBold : Font.Normal highlighted: control.highlightedIndex === index hoverEnabled: control.hoverEnabled } diff --git a/src/imports/controls/imagine/ComboBox.qml b/src/imports/controls/imagine/ComboBox.qml index 6cae167a..3a3ae682 100644 --- a/src/imports/controls/imagine/ComboBox.qml +++ b/src/imports/controls/imagine/ComboBox.qml @@ -61,6 +61,7 @@ T.ComboBox { delegate: ItemDelegate { width: parent.width text: control.textRole ? (Array.isArray(control.model) ? modelData[control.textRole] : model[control.textRole]) : modelData + font.weight: control.currentIndex === index ? Font.DemiBold : Font.Normal highlighted: control.highlightedIndex === index hoverEnabled: control.hoverEnabled } diff --git a/src/imports/controls/universal/ComboBox.qml b/src/imports/controls/universal/ComboBox.qml index 2b650682..3ec7e98b 100644 --- a/src/imports/controls/universal/ComboBox.qml +++ b/src/imports/controls/universal/ComboBox.qml @@ -58,6 +58,7 @@ T.ComboBox { delegate: ItemDelegate { width: parent.width text: control.textRole ? (Array.isArray(control.model) ? modelData[control.textRole] : model[control.textRole]) : modelData + font.weight: control.currentIndex === index ? Font.DemiBold : Font.Normal highlighted: control.highlightedIndex === index hoverEnabled: control.hoverEnabled } diff --git a/src/quicktemplates2/qquickcombobox.cpp b/src/quicktemplates2/qquickcombobox.cpp index 1b6161c0..ffdb7cc2 100644 --- a/src/quicktemplates2/qquickcombobox.cpp +++ b/src/quicktemplates2/qquickcombobox.cpp @@ -594,7 +594,7 @@ int QQuickComboBoxPrivate::match(int start, const QString &text, Qt::MatchFlags break; } case Qt::MatchWildcard: { - QRegularExpression rx(QRegularExpression::anchoredPattern(QRegularExpression::wildcardToRegularExpression(text)), + QRegularExpression rx(QRegularExpression::wildcardToRegularExpression(text), options); if (rx.match(t).hasMatch()) return idx; diff --git a/src/quicktemplates2/qquicktextfield.cpp b/src/quicktemplates2/qquicktextfield.cpp index 15acfeb6..56ffc52f 100644 --- a/src/quicktemplates2/qquicktextfield.cpp +++ b/src/quicktemplates2/qquicktextfield.cpp @@ -184,13 +184,20 @@ void QQuickTextFieldPrivate::resizeBackground() QQuickItemPrivate *p = QQuickItemPrivate::get(background); if (((!p->widthValid || !extra.isAllocated() || !extra->hasBackgroundWidth) && qFuzzyIsNull(background->x())) || (extra.isAllocated() && (extra->hasLeftInset || extra->hasRightInset))) { + const bool wasWidthValid = p->widthValid; background->setX(getLeftInset()); background->setWidth(width - getLeftInset() - getRightInset()); + // If the user hadn't previously set the width, that shouldn't change when we set it for them. + if (!wasWidthValid) + p->widthValid = false; } if (((!p->heightValid || !extra.isAllocated() || !extra->hasBackgroundHeight) && qFuzzyIsNull(background->y())) || (extra.isAllocated() && (extra->hasTopInset || extra->hasBottomInset))) { + const bool wasHeightValid = p->heightValid; background->setY(getTopInset()); background->setHeight(height - getTopInset() - getBottomInset()); + if (!wasHeightValid) + p->heightValid = false; } resizingBackground = false; @@ -386,8 +393,13 @@ void QQuickTextFieldPrivate::itemGeometryChanged(QQuickItem *item, QQuickGeometr return; QQuickItemPrivate *p = QQuickItemPrivate::get(item); - extra.value().hasBackgroundWidth = p->widthValid; - extra.value().hasBackgroundHeight = p->heightValid; + // QTBUG-71875: only allocate the extra data if we have to. + // resizeBackground() relies on the value of extra.isAllocated() + // as part of its checks to see whether it should resize the background or not. + if (p->widthValid || extra.isAllocated()) + extra.value().hasBackgroundWidth = p->widthValid; + if (p->heightValid || extra.isAllocated()) + extra.value().hasBackgroundHeight = p->heightValid; resizeBackground(); } diff --git a/tests/auto/controls/data/tst_textfield.qml b/tests/auto/controls/data/tst_textfield.qml index ee2d1a54..2ee1db41 100644 --- a/tests/auto/controls/data/tst_textfield.qml +++ b/tests/auto/controls/data/tst_textfield.qml @@ -51,6 +51,7 @@ import QtQuick 2.12 import QtTest 1.0 import QtQuick.Controls 2.12 +import QtQuick.Layouts 1.12 TestCase { id: testCase @@ -633,4 +634,30 @@ TestCase { compare(control.background.height, 100) } + Component { + id: layoutComponent + + ColumnLayout { + anchors.fill: parent + + property alias textField: textField + + TextField { + id: textField + placeholderText: "Placeholder" + Layout.fillWidth: true + } + } + } + + function test_inLayout() { + var layout = createTemporaryObject(layoutComponent, testCase) + verify(layout) + + var control = layout.textField + verify(control) + + compare(control.width, control.parent.width) + compare(control.background.width, control.width) + } } diff --git a/tests/auto/qquickstyle/tst_qquickstyle.cpp b/tests/auto/qquickstyle/tst_qquickstyle.cpp index 8d09a293..f5207a96 100644 --- a/tests/auto/qquickstyle/tst_qquickstyle.cpp +++ b/tests/auto/qquickstyle/tst_qquickstyle.cpp @@ -159,7 +159,11 @@ void tst_QQuickStyle::availableStyles() QQuickStyle::addStylePath(path); QStringList paths = QQuickStylePrivate::stylePaths(); +#ifndef Q_OS_WIN QVERIFY(paths.contains(path)); +#else + QVERIFY(paths.contains(path, Qt::CaseInsensitive)); +#endif const QStringList styles = QQuickStyle::availableStyles(); QVERIFY(!styles.isEmpty()); |