aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorJ-P Nurmi <jpnurmi@qt.io>2018-04-06 15:45:23 +0200
committerJ-P Nurmi <jpnurmi@qt.io>2018-04-06 15:46:16 +0200
commitf447493bf9a8cf3490da0f5409d76e7f7fc98759 (patch)
tree3a7849bd636b820b211c24885e7cdb72334338c6
parent4696c5609ae5741a841d2222c45c1e020c03db25 (diff)
parent4a8c2605c26acf575e181682f083e077b815ab4b (diff)
Merge remote-tracking branch 'origin/5.11' into dev
-rw-r--r--src/imports/controls/doc/src/includes/qquickoverlay-popup-parent.qdocinc4
-rw-r--r--src/imports/controls/plugins.qmltypes12
-rw-r--r--src/imports/templates/plugins.qmltypes10
-rw-r--r--src/imports/templates/qtquicktemplates2plugin.cpp1
-rw-r--r--src/quicktemplates2/qquickrangeslider.cpp2
-rw-r--r--src/quicktemplates2/qquickslider.cpp3
-rw-r--r--src/quicktemplates2/qquicktextarea.cpp5
-rw-r--r--tests/auto/controls/data/tst_textarea.qml3
8 files changed, 35 insertions, 5 deletions
diff --git a/src/imports/controls/doc/src/includes/qquickoverlay-popup-parent.qdocinc b/src/imports/controls/doc/src/includes/qquickoverlay-popup-parent.qdocinc
index 7ad8a003..5562f6a0 100644
--- a/src/imports/controls/doc/src/includes/qquickoverlay-popup-parent.qdocinc
+++ b/src/imports/controls/doc/src/includes/qquickoverlay-popup-parent.qdocinc
@@ -11,8 +11,8 @@ Button {
parent: Overlay.overlay
- x: (parent.width - width) / 2
- y: (parent.height - height) / 2
+ x: Math.round((parent.width - width) / 2)
+ y: Math.round((parent.height - height) / 2)
width: 100
height: 100
}
diff --git a/src/imports/controls/plugins.qmltypes b/src/imports/controls/plugins.qmltypes
index 8b2be4a1..5011365c 100644
--- a/src/imports/controls/plugins.qmltypes
+++ b/src/imports/controls/plugins.qmltypes
@@ -1208,6 +1208,16 @@ Module {
Property { name: "title"; type: "string" }
Property { name: "label"; type: "QQuickItem"; isPointer: true }
}
+
+ Component {
+ name: "QQuickIcon"
+ Property { name: "name"; type: "string" }
+ Property { name: "source"; type: "QUrl" }
+ Property { name: "width"; type: "int" }
+ Property { name: "height"; type: "int" }
+ Property { name: "color"; type: "QColor" }
+ }
+
Component {
name: "QQuickItemDelegate"
defaultProperty: "data"
@@ -1903,7 +1913,7 @@ Module {
Property { name: "busy"; type: "bool"; isReadonly: true }
Property { name: "depth"; type: "int"; isReadonly: true }
Property { name: "currentItem"; type: "QQuickItem"; isReadonly: true; isPointer: true }
- Property { name: "initialItem"; type: "QVariant" }
+ Property { name: "initialItem"; type: "QJSValue" }
Property { name: "popEnter"; type: "QQuickTransition"; isPointer: true }
Property { name: "popExit"; type: "QQuickTransition"; isPointer: true }
Property { name: "pushEnter"; type: "QQuickTransition"; isPointer: true }
diff --git a/src/imports/templates/plugins.qmltypes b/src/imports/templates/plugins.qmltypes
index ed609c1f..0283f50d 100644
--- a/src/imports/templates/plugins.qmltypes
+++ b/src/imports/templates/plugins.qmltypes
@@ -567,6 +567,14 @@ Module {
Property { name: "label"; type: "QQuickItem"; isPointer: true }
}
Component {
+ name: "QQuickIcon"
+ Property { name: "name"; type: "string" }
+ Property { name: "source"; type: "QUrl" }
+ Property { name: "width"; type: "int" }
+ Property { name: "height"; type: "int" }
+ Property { name: "color"; type: "QColor" }
+ }
+ Component {
name: "QQuickItemDelegate"
defaultProperty: "data"
prototype: "QQuickAbstractButton"
@@ -1261,7 +1269,7 @@ Module {
Property { name: "busy"; type: "bool"; isReadonly: true }
Property { name: "depth"; type: "int"; isReadonly: true }
Property { name: "currentItem"; type: "QQuickItem"; isReadonly: true; isPointer: true }
- Property { name: "initialItem"; type: "QVariant" }
+ Property { name: "initialItem"; type: "QJSValue" }
Property { name: "popEnter"; type: "QQuickTransition"; isPointer: true }
Property { name: "popExit"; type: "QQuickTransition"; isPointer: true }
Property { name: "pushEnter"; type: "QQuickTransition"; isPointer: true }
diff --git a/src/imports/templates/qtquicktemplates2plugin.cpp b/src/imports/templates/qtquicktemplates2plugin.cpp
index 81330447..ace2b316 100644
--- a/src/imports/templates/qtquicktemplates2plugin.cpp
+++ b/src/imports/templates/qtquicktemplates2plugin.cpp
@@ -299,6 +299,7 @@ void QtQuickTemplates2Plugin::registerTypes(const char *uri)
qmlRegisterType<QQuickContainer, 3>(uri, 2, 3, "Container");
qmlRegisterType<QQuickDialog, 3>(uri, 2, 3, "Dialog");
qmlRegisterType<QQuickDialogButtonBox, 3>(uri, 2, 3, "DialogButtonBox");
+ qmlRegisterType<QQuickIcon>();
qRegisterMetaType<QQuickIcon>();
qmlRegisterType<QQuickLabel, 3>(uri, 2, 3, "Label");
qmlRegisterType<QQuickMenu, 3>(uri, 2, 3, "Menu");
diff --git a/src/quicktemplates2/qquickrangeslider.cpp b/src/quicktemplates2/qquickrangeslider.cpp
index 5b282f2c..49384fe4 100644
--- a/src/quicktemplates2/qquickrangeslider.cpp
+++ b/src/quicktemplates2/qquickrangeslider.cpp
@@ -86,6 +86,8 @@ QT_BEGIN_NAMESPACE
RangeSlider. In the example above, \l {first.visualPosition} will be \c 0.24
in a left-to-right application, and \c 0.76 in a right-to-left application.
+ For a slider that allows the user to select a single value, see \l Slider.
+
\sa {Customizing RangeSlider}, {Input Controls},
{Focus Management in Qt Quick Controls 2}
*/
diff --git a/src/quicktemplates2/qquickslider.cpp b/src/quicktemplates2/qquickslider.cpp
index 86e2445a..60667267 100644
--- a/src/quicktemplates2/qquickslider.cpp
+++ b/src/quicktemplates2/qquickslider.cpp
@@ -73,6 +73,9 @@ QT_BEGIN_NAMESPACE
In the example above, \l visualPosition will be \c 0.24 in a left-to-right
application, and \c 0.76 in a right-to-left application.
+ For a slider that allows the user to select a range by providing two
+ handles, see \l RangeSlider.
+
\sa {Customizing Slider}, {Input Controls}
*/
diff --git a/src/quicktemplates2/qquicktextarea.cpp b/src/quicktemplates2/qquicktextarea.cpp
index a13213fd..45a084d2 100644
--- a/src/quicktemplates2/qquicktextarea.cpp
+++ b/src/quicktemplates2/qquicktextarea.cpp
@@ -529,7 +529,10 @@ void QQuickTextArea::setBackground(QQuickItem *background)
delete d->background;
d->background = background;
if (background) {
- background->setParentItem(this);
+ if (d->flickable)
+ background->setParentItem(d->flickable);
+ else
+ background->setParentItem(this);
if (qFuzzyIsNull(background->z()))
background->setZ(-1);
if (isComponentComplete())
diff --git a/tests/auto/controls/data/tst_textarea.qml b/tests/auto/controls/data/tst_textarea.qml
index ea30c8d6..38e810f7 100644
--- a/tests/auto/controls/data/tst_textarea.qml
+++ b/tests/auto/controls/data/tst_textarea.qml
@@ -212,6 +212,9 @@ TestCase {
var textArea = control.TextArea.flickable
verify(textArea)
+ if (textArea.background)
+ compare(textArea.background.parent, control)
+
for (var i = 1; i <= 100; ++i)
textArea.text += "line\n" + i