diff options
| author | Liang Qi <liang.qi@theqtcompany.com> | 2015-10-28 09:32:26 +0100 |
|---|---|---|
| committer | Liang Qi <liang.qi@theqtcompany.com> | 2015-10-28 09:32:26 +0100 |
| commit | 2e48d16e4a230069884ac0585ae111037f4171fb (patch) | |
| tree | d31d2dbc2be10d203721387955f2cdde451e5b95 /src | |
| parent | 4cfdab4a3317b09dab9c4000b6a004d2ea0560c1 (diff) | |
| parent | d3dbbe4781c4a7137ada0324e6ec5b14fed5c859 (diff) | |
Merge remote-tracking branch 'origin/5.5' into 5.6
Change-Id: I7177ee6f1dc74d7f0d2ac9a3aedcc8d7a00cee41
Diffstat (limited to 'src')
| -rw-r--r-- | src/controls/ComboBox.qml | 2 | ||||
| -rw-r--r-- | src/controls/Private/qquickrangemodel_p_p.h | 6 | ||||
| -rw-r--r-- | src/controls/plugins.qmltypes | 8 | ||||
| -rw-r--r-- | src/extras/Styles/Flat/flatstyleplugin.cpp | 2 |
4 files changed, 13 insertions, 5 deletions
diff --git a/src/controls/ComboBox.qml b/src/controls/ComboBox.qml index 4e29dfe95..10702ff69 100644 --- a/src/controls/ComboBox.qml +++ b/src/controls/ComboBox.qml @@ -564,7 +564,7 @@ Control { style: isPopup ? __style.__popupStyle : __style.__dropDownStyle property string currentText: selectedText - onSelectedTextChanged: if (selectedText) popup.currentText = selectedText + onSelectedTextChanged: popup.currentText = selectedText property string selectedText on__SelectedIndexChanged: { diff --git a/src/controls/Private/qquickrangemodel_p_p.h b/src/controls/Private/qquickrangemodel_p_p.h index 67f0745c0..235ba0690 100644 --- a/src/controls/Private/qquickrangemodel_p_p.h +++ b/src/controls/Private/qquickrangemodel_p_p.h @@ -93,7 +93,11 @@ public: return minimum; const qreal scale = (maximum - minimum) / posRange; - return (pos - effectivePosAtMin()) * scale + minimum; + // Avoid perverse rounding glitches when at an end: + const qreal mid = (effectivePosAtMax() + effectivePosAtMin()) * 0.5; + if (pos < mid) + return (pos - effectivePosAtMin()) * scale + minimum; + return maximum - scale * (effectivePosAtMax() - pos); } qreal publicPosition(qreal position) const; diff --git a/src/controls/plugins.qmltypes b/src/controls/plugins.qmltypes index 866ef043b..89b9260a7 100644 --- a/src/controls/plugins.qmltypes +++ b/src/controls/plugins.qmltypes @@ -2339,8 +2339,12 @@ Module { name: "QQuickWindow" defaultProperty: "data" prototype: "QWindow" - exports: ["QtQuick.Window/Window 2.0"] - exportMetaObjectRevisions: [0] + exports: [ + "QtQuick.Window/Window 2.0", + "QtQuick.Window/Window 2.1", + "QtQuick.Window/Window 2.2" + ] + exportMetaObjectRevisions: [0, 1, 2] Enum { name: "SceneGraphError" values: { diff --git a/src/extras/Styles/Flat/flatstyleplugin.cpp b/src/extras/Styles/Flat/flatstyleplugin.cpp index db464c386..a207f0a08 100644 --- a/src/extras/Styles/Flat/flatstyleplugin.cpp +++ b/src/extras/Styles/Flat/flatstyleplugin.cpp @@ -69,7 +69,7 @@ QtQuickExtrasStylesPlugin::QtQuickExtrasStylesPlugin(QObject *parent) : void QtQuickExtrasStylesPlugin::registerTypes(const char *uri) { - Q_INIT_RESOURCE(flatstyle); + initResources(); const QString prefix = "qrc:/ExtrasImports/QtQuick/Controls/Styles/Flat/"; // register version 1.0 |
