summaryrefslogtreecommitdiff
path: root/tests/auto/extras
diff options
context:
space:
mode:
authorMitch Curtis <mitch.curtis@theqtcompany.com>2015-02-17 13:53:44 +0100
committerCaroline Chao <caroline.chao@theqtcompany.com>2015-03-02 13:52:13 +0000
commitf0c227f8a9a5c5e3ed83f86702626092457175aa (patch)
tree9d5903b76206906a7dc5abff7a8c06bfcfc3f129 /tests/auto/extras
parentb80076c53c045076afdba44a975a533d130a7b60 (diff)
downloadqtquickcontrols-f0c227f8a9a5c5e3ed83f86702626092457175aa.tar.gz
Merge Extras' styling system into Controls'.
- Removes the duplicated style settings functionality in Extras and simplifies the installed styles directory structure. - Extras' Base style is now part of Controls' Base style, eliminating the need for a separate QtQuick.Extras.Styles import. The cost of doing this should be negligible: a few QML files and two images. If we didn't merge Extras' Baste style into Controls', we'd need extras-specific code in qquickcontrolssettings, as the default style search path is: qml/QtQuick/Controls/Styles/ Whereas the Extras Base style would be in: qml/QtQuick/Extras/Styles/ The Extras Base style can't go into Controls' Base style directory, either, because otherwise we'd have two qmldir files there. The Flat style doesn't have this problem because it is all contained in one plugin and gets installed into its own Flat/ folder. - Documentation now lists the Extras controls as \since QtQuick.Extras 1.4. - Adds the customcontrolsstyle auto test to ensure that custom styling is tested. Change-Id: I19ca7a8b7e1c1daa85b272f4ccf9a2f05c76e0d9 Reviewed-by: Caroline Chao <caroline.chao@theqtcompany.com> Reviewed-by: J-P Nurmi <jpnurmi@theqtcompany.com>
Diffstat (limited to 'tests/auto/extras')
-rw-r--r--tests/auto/extras/data/PieMenu3Items.qml2
-rw-r--r--tests/auto/extras/data/PieMenu3ItemsKeepOpen.qml2
-rw-r--r--tests/auto/extras/data/PieMenu3ItemsLongPress.qml2
-rw-r--r--tests/auto/extras/data/PieMenuBoundingItem.qml2
-rw-r--r--tests/auto/extras/data/PieMenuRotatedBoundingItem.qml2
-rw-r--r--tests/auto/extras/data/PieMenuVisibleButNoParent.qml2
-rw-r--r--tests/auto/extras/data/PieMenuVisibleOnCompleted.qml2
-rw-r--r--tests/auto/extras/data/TumblerDatePicker.qml2
-rw-r--r--tests/auto/extras/data/tst_circulargauge.qml4
-rw-r--r--tests/auto/extras/data/tst_circulartickmarklabel.qml2
-rw-r--r--tests/auto/extras/data/tst_common.qml6
-rw-r--r--tests/auto/extras/data/tst_delaybutton.qml30
-rw-r--r--tests/auto/extras/data/tst_dial.qml22
-rw-r--r--tests/auto/extras/data/tst_gauge.qml4
-rw-r--r--tests/auto/extras/data/tst_picture.qml15
-rw-r--r--tests/auto/extras/data/tst_piemenu.qml4
-rw-r--r--tests/auto/extras/data/tst_statusindicator.qml21
-rw-r--r--tests/auto/extras/data/tst_togglebutton.qml4
-rw-r--r--tests/auto/extras/data/tst_tumbler.qml15
19 files changed, 77 insertions, 66 deletions
diff --git a/tests/auto/extras/data/PieMenu3Items.qml b/tests/auto/extras/data/PieMenu3Items.qml
index f9349e63..8e8396eb 100644
--- a/tests/auto/extras/data/PieMenu3Items.qml
+++ b/tests/auto/extras/data/PieMenu3Items.qml
@@ -1,6 +1,6 @@
import QtQuick 2.2
import QtQuick.Controls 1.1
-import QtQuick.Extras 1.3
+import QtQuick.Extras 1.4
Rectangle {
id: rect
diff --git a/tests/auto/extras/data/PieMenu3ItemsKeepOpen.qml b/tests/auto/extras/data/PieMenu3ItemsKeepOpen.qml
index ffbfa20a..c2c0dce4 100644
--- a/tests/auto/extras/data/PieMenu3ItemsKeepOpen.qml
+++ b/tests/auto/extras/data/PieMenu3ItemsKeepOpen.qml
@@ -1,6 +1,6 @@
import QtQuick 2.2
import QtQuick.Controls 1.1
-import QtQuick.Extras 1.3
+import QtQuick.Extras 1.4
Rectangle {
id: rect
diff --git a/tests/auto/extras/data/PieMenu3ItemsLongPress.qml b/tests/auto/extras/data/PieMenu3ItemsLongPress.qml
index fddc5460..5503c8d4 100644
--- a/tests/auto/extras/data/PieMenu3ItemsLongPress.qml
+++ b/tests/auto/extras/data/PieMenu3ItemsLongPress.qml
@@ -1,6 +1,6 @@
import QtQuick 2.2
import QtQuick.Controls 1.1
-import QtQuick.Extras 1.3
+import QtQuick.Extras 1.4
Rectangle {
id: rect
diff --git a/tests/auto/extras/data/PieMenuBoundingItem.qml b/tests/auto/extras/data/PieMenuBoundingItem.qml
index 3daf0f19..cb6f1e89 100644
--- a/tests/auto/extras/data/PieMenuBoundingItem.qml
+++ b/tests/auto/extras/data/PieMenuBoundingItem.qml
@@ -1,6 +1,6 @@
import QtQuick 2.2
import QtQuick.Controls 1.1
-import QtQuick.Extras 1.3
+import QtQuick.Extras 1.4
Rectangle {
id: root
diff --git a/tests/auto/extras/data/PieMenuRotatedBoundingItem.qml b/tests/auto/extras/data/PieMenuRotatedBoundingItem.qml
index 2df592ab..b1095158 100644
--- a/tests/auto/extras/data/PieMenuRotatedBoundingItem.qml
+++ b/tests/auto/extras/data/PieMenuRotatedBoundingItem.qml
@@ -1,6 +1,6 @@
import QtQuick 2.2
import QtQuick.Controls 1.1
-import QtQuick.Extras 1.3
+import QtQuick.Extras 1.4
Rectangle {
id: root
diff --git a/tests/auto/extras/data/PieMenuVisibleButNoParent.qml b/tests/auto/extras/data/PieMenuVisibleButNoParent.qml
index 582e168a..609539e7 100644
--- a/tests/auto/extras/data/PieMenuVisibleButNoParent.qml
+++ b/tests/auto/extras/data/PieMenuVisibleButNoParent.qml
@@ -1,5 +1,5 @@
import QtQuick 2.2
-import QtQuick.Extras 1.3
+import QtQuick.Extras 1.4
Rectangle {
width: 400
diff --git a/tests/auto/extras/data/PieMenuVisibleOnCompleted.qml b/tests/auto/extras/data/PieMenuVisibleOnCompleted.qml
index aa9cc18c..55ba328c 100644
--- a/tests/auto/extras/data/PieMenuVisibleOnCompleted.qml
+++ b/tests/auto/extras/data/PieMenuVisibleOnCompleted.qml
@@ -1,5 +1,5 @@
import QtQuick 2.2
-import QtQuick.Extras 1.3
+import QtQuick.Extras 1.4
Rectangle {
width: 400
diff --git a/tests/auto/extras/data/TumblerDatePicker.qml b/tests/auto/extras/data/TumblerDatePicker.qml
index 9872fc00..9a5ad480 100644
--- a/tests/auto/extras/data/TumblerDatePicker.qml
+++ b/tests/auto/extras/data/TumblerDatePicker.qml
@@ -1,6 +1,6 @@
import QtQuick 2.3
import QtQuick.Controls 1.2
-import QtQuick.Extras 1.3
+import QtQuick.Extras 1.4
Tumbler {
id: tumbler
diff --git a/tests/auto/extras/data/tst_circulargauge.qml b/tests/auto/extras/data/tst_circulargauge.qml
index 16c0815f..1fb47982 100644
--- a/tests/auto/extras/data/tst_circulargauge.qml
+++ b/tests/auto/extras/data/tst_circulargauge.qml
@@ -46,7 +46,7 @@ TestCase {
height: 400
function test_instance() {
- var gauge = Qt.createQmlObject('import QtQuick.Extras 1.3; CircularGauge { }', testcase, '');
+ var gauge = Qt.createQmlObject('import QtQuick.Extras 1.4; CircularGauge { }', testcase, '');
verify (gauge, "CircularGauge: failed to create an instance")
verify(gauge.__style)
gauge.destroy()
@@ -73,7 +73,7 @@ TestCase {
}
function test_tickmarksVisible() {
- var gauge = Qt.createQmlObject("import QtQuick.Extras 1.3; CircularGauge { }", testcase, "");
+ var gauge = Qt.createQmlObject("import QtQuick.Extras 1.4; CircularGauge { }", testcase, "");
verify(gauge, "CircularGauge: failed to create an instance");
gauge.__style.tickmark = tickmark;
diff --git a/tests/auto/extras/data/tst_circulartickmarklabel.qml b/tests/auto/extras/data/tst_circulartickmarklabel.qml
index 2521cbe9..731e15d1 100644
--- a/tests/auto/extras/data/tst_circulartickmarklabel.qml
+++ b/tests/auto/extras/data/tst_circulartickmarklabel.qml
@@ -49,7 +49,7 @@ TestCase {
property var label: null
function init() {
- label = Qt.createQmlObject("import QtQuick.Extras 1.3; import QtQuick.Extras.Private 1.0; CircularTickmarkLabel {}", testcase, "");
+ label = Qt.createQmlObject("import QtQuick.Extras 1.4; import QtQuick.Extras.Private 1.0; CircularTickmarkLabel {}", testcase, "");
verify(label, "CircularTickmarkLabel: failed to create an instance");
verify(label.__style);
}
diff --git a/tests/auto/extras/data/tst_common.qml b/tests/auto/extras/data/tst_common.qml
index 1a7fe990..f0c3e428 100644
--- a/tests/auto/extras/data/tst_common.qml
+++ b/tests/auto/extras/data/tst_common.qml
@@ -53,11 +53,11 @@ TestCase {
{ tag: "DelayButton" },
{ tag: "Dial" },
{ tag: "Gauge" },
- { tag: "PieMenu", qml: "import QtQuick.Controls 1.1; import QtQuick.Extras 1.3;"
+ { tag: "PieMenu", qml: "import QtQuick.Controls 1.1; import QtQuick.Extras 1.4;"
+ "PieMenu { visible: true; MenuItem { text: 'foo' } }"},
{ tag: "StatusIndicator" },
{ tag: "ToggleButton" },
- { tag: "Tumbler", qml: "import QtQuick.Extras 1.3; Tumbler { TumblerColumn { model: 10 } }" }
+ { tag: "Tumbler", qml: "import QtQuick.Extras 1.4; Tumbler { TumblerColumn { model: 10 } }" }
];
}
@@ -66,7 +66,7 @@ TestCase {
}
function test_resize(data) {
- var qml = data.qml ? data.qml : "import QtQuick.Extras 1.3; " + data.tag + " { }";
+ var qml = data.qml ? data.qml : "import QtQuick.Extras 1.4; " + data.tag + " { }";
control = Qt.createQmlObject(qml, testCase, "");
var resizeAnimation = Qt.createQmlObject("import QtQuick 2.2; NumberAnimation {}", testCase, "");
diff --git a/tests/auto/extras/data/tst_delaybutton.qml b/tests/auto/extras/data/tst_delaybutton.qml
index 59e602a1..9fc736c0 100644
--- a/tests/auto/extras/data/tst_delaybutton.qml
+++ b/tests/auto/extras/data/tst_delaybutton.qml
@@ -46,12 +46,13 @@ TestCase {
height: 400
function test_instance() {
- var button = Qt.createQmlObject('import QtQuick.Extras 1.3; DelayButton { }', testcase, '')
+ var button = Qt.createQmlObject('import QtQuick.Extras 1.4; DelayButton { }', testcase, '')
verify (button, "DelayButton: failed to create an instance")
verify(button.__style)
verify(!button.checked)
verify(!button.pressed)
- button.destroy()
+ // QTBUG-44664
+// button.destroy()
}
SignalSpy {
@@ -68,7 +69,7 @@ TestCase {
}
function test_activation(data) {
- var button = Qt.createQmlObject('import QtQuick.Extras 1.3; DelayButton { }', testcase, '')
+ var button = Qt.createQmlObject('import QtQuick.Extras 1.4; DelayButton { }', testcase, '')
verify (button, "DelayButton: failed to create an instance")
button.delay = data.delay
@@ -89,7 +90,8 @@ TestCase {
verify(!button.pressed)
compare(activationSpy.count, 1)
- button.destroy()
+ // QTBUG-44664
+// button.destroy()
}
SignalSpy {
@@ -98,7 +100,7 @@ TestCase {
}
function test_progress() {
- var button = Qt.createQmlObject('import QtQuick.Extras 1.3; DelayButton { delay: 1 }', testcase, '')
+ var button = Qt.createQmlObject('import QtQuick.Extras 1.4; DelayButton { delay: 1 }', testcase, '')
verify (button, "DelayButton: failed to create an instance")
progressSpy.target = button
@@ -109,7 +111,8 @@ TestCase {
tryCompare(button, "progress", 1.0)
verify(progressSpy.count > 0)
- button.destroy()
+ // QTBUG-44664
+// button.destroy()
}
SignalSpy {
@@ -126,7 +129,7 @@ TestCase {
}
function test_checked(data) {
- var button = Qt.createQmlObject('import QtQuick.Extras 1.3; DelayButton { }', testcase, '')
+ var button = Qt.createQmlObject('import QtQuick.Extras 1.4; DelayButton { }', testcase, '')
verify (button, "DelayButton: failed to create an instance")
button.delay = data.delay
@@ -164,11 +167,12 @@ TestCase {
verify(!button.checked)
compare(checkSpy.count, checkCount)
- button.destroy()
+ // QTBUG-44664
+// button.destroy()
}
function test_programmaticCheck() {
- var button = Qt.createQmlObject("import QtQuick.Extras 1.3; DelayButton {}", testcase, "");
+ var button = Qt.createQmlObject("import QtQuick.Extras 1.4; DelayButton {}", testcase, "");
verify(button, "DelayButton: failed to create an instance");
checkSpy.clear();
@@ -181,14 +185,16 @@ TestCase {
button.checked = false;
compare(button.progress, 0);
- button.destroy();
+ // QTBUG-44664
+// button.destroy();
}
function test_largeText() {
// Should be no binding loop warnings.
- var button = Qt.createQmlObject("import QtQuick.Extras 1.3; DelayButton { "
+ var button = Qt.createQmlObject("import QtQuick.Extras 1.4; DelayButton { "
+ "anchors.centerIn: parent; text: 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' }", testcase, "");
verify(button, "DelayButton: failed to create an instance");
- button.destroy();
+ // QTBUG-44664
+// button.destroy();
}
}
diff --git a/tests/auto/extras/data/tst_dial.qml b/tests/auto/extras/data/tst_dial.qml
index 02e6eaa3..3c508184 100644
--- a/tests/auto/extras/data/tst_dial.qml
+++ b/tests/auto/extras/data/tst_dial.qml
@@ -47,7 +47,7 @@ TestCase {
height: 400
function test_instance() {
- var dial = Qt.createQmlObject('import QtQuick.Extras 1.3; Dial { }', testcase, '');
+ var dial = Qt.createQmlObject('import QtQuick.Extras 1.4; Dial { }', testcase, '');
verify (dial, "Dial: failed to create an instance")
verify(dial.__style)
compare(dial.value, 0.0)
@@ -62,7 +62,7 @@ TestCase {
}
function test_minimumValue() {
- var dial = Qt.createQmlObject('import QtQuick.Extras 1.3; Dial { }', testcase, '');
+ var dial = Qt.createQmlObject('import QtQuick.Extras 1.4; Dial { }', testcase, '');
verify (dial, "Dial: failed to create an instance")
dial.minimumValue = 5
dial.maximumValue = 10
@@ -73,7 +73,7 @@ TestCase {
}
function test_maximumValue() {
- var dial = Qt.createQmlObject('import QtQuick.Extras 1.3; Dial { }', testcase, '');
+ var dial = Qt.createQmlObject('import QtQuick.Extras 1.4; Dial { }', testcase, '');
verify (dial, "Dial: failed to create an instance")
dial.minimumValue = 5
dial.maximumValue = 10
@@ -87,7 +87,7 @@ TestCase {
var scope = Qt.createQmlObject('import QtQuick 2.2; FocusScope { focus: false }', testcase, '')
verify(!scope.activeFocus)
- var dial = Qt.createQmlObject('import QtQuick.Extras 1.3; Dial { }', scope, '')
+ var dial = Qt.createQmlObject('import QtQuick.Extras 1.4; Dial { }', scope, '')
verify (dial, "Dial: failed to create an instance")
verify(!dial.activeFocusOnPress)
verify(!dial.activeFocus)
@@ -119,7 +119,7 @@ TestCase {
}
function test_pressed() {
- var dial = Qt.createQmlObject('import QtQuick.Extras 1.3; Dial { }', testcase, '')
+ var dial = Qt.createQmlObject('import QtQuick.Extras 1.4; Dial { }', testcase, '')
verify (dial, "Dial: failed to create an instance")
pressSpy.target = dial
@@ -143,7 +143,7 @@ TestCase {
}
function test_hovered() {
- var dial = Qt.createQmlObject('import QtQuick.Extras 1.3; Dial { }', testcase, '')
+ var dial = Qt.createQmlObject('import QtQuick.Extras 1.4; Dial { }', testcase, '')
verify (dial, "Dial: failed to create an instance")
hoverSpy.target = dial
@@ -175,7 +175,7 @@ TestCase {
}
function test_dragging(data) {
- var dial = Qt.createQmlObject('import QtQuick.Extras 1.3; Dial { }', testcase, '')
+ var dial = Qt.createQmlObject('import QtQuick.Extras 1.4; Dial { }', testcase, '')
verify(dial, "Dial: failed to create an instance")
dial.minimumValue = data.min
dial.maximumValue = data.max
@@ -211,7 +211,7 @@ TestCase {
}
function test_outerRadius() {
- var dial = Qt.createQmlObject("import QtQuick.Extras 1.3; Dial { }", testcase, "");
+ var dial = Qt.createQmlObject("import QtQuick.Extras 1.4; Dial { }", testcase, "");
verify(dial, "Dial: failed to create an instance");
// Implicit width and height are identical.
compare(dial.__style.outerRadius, dial.width / 2);
@@ -250,7 +250,7 @@ TestCase {
}
function test_tickmarksVisible() {
- var dial = Qt.createQmlObject("import QtQuick.Extras 1.3; Dial { }", testcase, "");
+ var dial = Qt.createQmlObject("import QtQuick.Extras 1.4; Dial { }", testcase, "");
verify(dial, "Dial: failed to create an instance");
dial.__style.minorTickmarkCount = 4;
@@ -291,7 +291,7 @@ TestCase {
parentEventSpy.target = focusScope;
parentEventSpy.signalName = "receivedKeyPress";
- var dial = Qt.createQmlObject("import QtQuick.Extras 1.3; Dial { }", focusScope, "");
+ var dial = Qt.createQmlObject("import QtQuick.Extras 1.4; Dial { }", focusScope, "");
verify(dial, "Dial: failed to create an instance");
compare(dial.activeFocusOnTab, true);
compare(dial.value, 0);
@@ -343,7 +343,7 @@ TestCase {
}
function test_dragToSet() {
- var dial = Qt.createQmlObject("import QtQuick.Extras 1.3; Dial { }", testcase, "");
+ var dial = Qt.createQmlObject("import QtQuick.Extras 1.4; Dial { }", testcase, "");
verify(dial, "Dial: failed to create an instance");
dial.__style.__dragToSet = false;
diff --git a/tests/auto/extras/data/tst_gauge.qml b/tests/auto/extras/data/tst_gauge.qml
index 08fdf53f..ba065232 100644
--- a/tests/auto/extras/data/tst_gauge.qml
+++ b/tests/auto/extras/data/tst_gauge.qml
@@ -36,7 +36,7 @@
import QtTest 1.0
import QtQuick 2.2
-import QtQuick.Extras.Styles 1.3
+import QtQuick.Controls.Styles 1.4
import "TestUtils.js" as TestUtils
TestCase {
@@ -69,7 +69,7 @@ TestCase {
}
function init() {
- gauge = Qt.createQmlObject("import QtQuick.Extras 1.3; Gauge { }", testcase, "");
+ gauge = Qt.createQmlObject("import QtQuick.Extras 1.4; Gauge { }", testcase, "");
verify(gauge, "Gauge: failed to create an instance");
verify(gauge.__style);
}
diff --git a/tests/auto/extras/data/tst_picture.qml b/tests/auto/extras/data/tst_picture.qml
index bfdcc557..5ddc4406 100644
--- a/tests/auto/extras/data/tst_picture.qml
+++ b/tests/auto/extras/data/tst_picture.qml
@@ -36,7 +36,7 @@
import QtTest 1.0
import QtQuick 2.4
-import QtQuick.Extras 1.3
+import QtQuick.Extras 1.4
import QtQuick.Extras.Private 1.0
TestCase {
@@ -69,7 +69,7 @@ TestCase {
}
function test_instance() {
- picture = Qt.createQmlObject("import QtQuick.Extras 1.3; Picture { }", testCase, "");
+ picture = Qt.createQmlObject("import QtQuick.Extras 1.4; Picture { }", testCase, "");
verify(picture, "Picture: failed to create an instance");
}
@@ -93,7 +93,7 @@ TestCase {
}
function test_source(data) {
- picture = Qt.createQmlObject("import QtQuick.Extras 1.3; Picture {}", testCase, "");
+ picture = Qt.createQmlObject("import QtQuick.Extras 1.4; Picture {}", testCase, "");
verify(picture, "Picture: failed to create an instance");
picture.source = data.tag;
picture.width = data.implicitSize.width;
@@ -120,14 +120,17 @@ TestCase {
}
function test_color(data) {
- picture = Qt.createQmlObject("import QtQuick.Extras 1.3; Picture {}", testCase, "");
+ picture = Qt.createQmlObject("import QtQuick.Extras 1.4; Picture {}", testCase, "");
verify(picture, "Picture: failed to create an instance");
picture.width = pictureDotDatImplicitSize.width;
picture.height = pictureDotDatImplicitSize.height;
picture.source = "picture.dat";
picture.color = data.color;
- waitForRendering(picture);
+ // For some reason we need two waits here, otherwise the color detected is *sometimes* white instead of black.
+ // Also, we use an explicit, shorter timeout, otherwise the default (5000 ms) seems to be exhausted.
+ waitForRendering(picture, 200);
+ waitForRendering(picture, 200);
var pictureImage = grabImage(picture);
@@ -144,7 +147,7 @@ TestCase {
}
function test_size() {
- picture = Qt.createQmlObject("import QtQuick.Extras 1.3; Picture {}", testCase, "");
+ picture = Qt.createQmlObject("import QtQuick.Extras 1.4; Picture {}", testCase, "");
verify(picture, "Picture: failed to create an instance");
compare(picture.implicitWidth, fontMetrics.height * 4);
diff --git a/tests/auto/extras/data/tst_piemenu.qml b/tests/auto/extras/data/tst_piemenu.qml
index fa109a1a..d90aebab 100644
--- a/tests/auto/extras/data/tst_piemenu.qml
+++ b/tests/auto/extras/data/tst_piemenu.qml
@@ -37,7 +37,7 @@
import QtTest 1.0
import QtQuick 2.1
import QtQuick.Controls 1.1
-import QtQuick.Extras 1.3
+import QtQuick.Extras 1.4
import QtQuick.Extras.Private 1.0
import QtQuick.Extras.Private.CppUtils 1.0
@@ -94,7 +94,7 @@ Item {
}
function test_instance() {
- var pieMenu = Qt.createQmlObject("import QtQuick.Extras 1.3; PieMenu { }", container, "");
+ var pieMenu = Qt.createQmlObject("import QtQuick.Extras 1.4; PieMenu { }", container, "");
verify(pieMenu, "PieMenu: failed to create an instance");
verify(pieMenu.__style);
compare(pieMenu.triggerMode, TriggerMode.TriggerOnClick);
diff --git a/tests/auto/extras/data/tst_statusindicator.qml b/tests/auto/extras/data/tst_statusindicator.qml
index e9fa6ac9..da38f9fc 100644
--- a/tests/auto/extras/data/tst_statusindicator.qml
+++ b/tests/auto/extras/data/tst_statusindicator.qml
@@ -36,8 +36,9 @@
import QtTest 1.0
import QtQuick 2.1
-import QtQuick.Extras 1.3
-import QtQuick.Extras.Private 1.0
+import QtQuick.Controls 1.4
+import QtQuick.Controls.Private 1.0
+import QtQuick.Extras 1.4
TestCase {
id: testCase
@@ -55,13 +56,13 @@ TestCase {
}
function test_instance() {
- indicator = Qt.createQmlObject("import QtQuick.Extras 1.3; StatusIndicator { }", testCase, "");
+ indicator = Qt.createQmlObject("import QtQuick.Extras 1.4; StatusIndicator { }", testCase, "");
verify(indicator, "StatusIndicator: failed to create an instance")
verify(indicator.__style);
}
function test_active_data() {
- if (StyleSettings.styleName === "Flat") {
+ if (Settings.styleName === "Flat") {
return [
{ tag: "active", active: true, expectedColor: { r: 18, g: 136, b: 203 } },
{ tag: "inactive", active: false, expectedColor: { r: 179, g: 179, b: 179 } }
@@ -75,13 +76,13 @@ TestCase {
}
function test_active(data) {
- indicator = Qt.createQmlObject("import QtQuick.Extras 1.3; StatusIndicator { }", testCase, "");
+ indicator = Qt.createQmlObject("import QtQuick.Extras 1.4; StatusIndicator { }", testCase, "");
verify(indicator);
compare(indicator.active, false);
indicator.active = data.active;
// Color is slightly different on some platforms/machines, like Windows.
- var lenience = StyleSettings.styleName === "Flat" ? 0 : 2;
+ var lenience = Settings.styleName === "Flat" ? 0 : 2;
waitForRendering(indicator);
var image = grabImage(indicator);
@@ -91,9 +92,9 @@ TestCase {
}
function test_color() {
- var flatStyle = StyleSettings.styleName === "Flat";
+ var flatStyle = Settings.styleName === "Flat";
- indicator = Qt.createQmlObject("import QtQuick.Extras 1.3; StatusIndicator { }", testCase, "");
+ indicator = Qt.createQmlObject("import QtQuick.Extras 1.4; StatusIndicator { }", testCase, "");
verify(indicator);
compare(indicator.color, flatStyle ? "#1288cb" : "#ff0000");
@@ -113,10 +114,10 @@ TestCase {
}
function test_baseStyleHasOuterShadow() {
- if (StyleSettings.styleName !== "Base")
+ if (Settings.styleName !== "Base")
return;
- indicator = Qt.createQmlObject("import QtQuick.Extras 1.3; StatusIndicator { }", testCase, "");
+ indicator = Qt.createQmlObject("import QtQuick.Extras 1.4; StatusIndicator { }", testCase, "");
verify(indicator);
// There should be a "shadow" here...
diff --git a/tests/auto/extras/data/tst_togglebutton.qml b/tests/auto/extras/data/tst_togglebutton.qml
index 46b87f93..b68f6ca3 100644
--- a/tests/auto/extras/data/tst_togglebutton.qml
+++ b/tests/auto/extras/data/tst_togglebutton.qml
@@ -46,7 +46,7 @@ TestCase {
height: 400
function test_instance() {
- var button = Qt.createQmlObject('import QtQuick.Extras 1.3; ToggleButton { }', testcase, '');
+ var button = Qt.createQmlObject('import QtQuick.Extras 1.4; ToggleButton { }', testcase, '');
verify (button, "ToggleButton: failed to create an instance")
verify(button.__style)
verify(button.checkable)
@@ -57,7 +57,7 @@ TestCase {
function test_largeText() {
// Should be no binding loop warnings.
- var button = Qt.createQmlObject("import QtQuick.Extras 1.3; ToggleButton { "
+ var button = Qt.createQmlObject("import QtQuick.Extras 1.4; ToggleButton { "
+ "anchors.centerIn: parent; text: 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' }", testcase, "");
verify(button, "ToggleButton: failed to create an instance");
waitForRendering(button);
diff --git a/tests/auto/extras/data/tst_tumbler.qml b/tests/auto/extras/data/tst_tumbler.qml
index 936269c8..0f1a29fd 100644
--- a/tests/auto/extras/data/tst_tumbler.qml
+++ b/tests/auto/extras/data/tst_tumbler.qml
@@ -36,9 +36,10 @@
import QtTest 1.0
import QtQuick 2.1
-import QtQuick.Extras 1.3
-import QtQuick.Extras.Styles 1.3
-import QtQuick.Extras.Private 1.0
+import QtQuick.Controls 1.4
+import QtQuick.Controls.Styles 1.4
+import QtQuick.Controls.Private 1.0
+import QtQuick.Extras 1.4
import "TestUtils.js" as TestUtils
Item {
@@ -75,7 +76,7 @@ Item {
}
function init() {
- tumbler = Qt.createQmlObject("import QtQuick.Extras 1.3; Tumbler { }", container, "");
+ tumbler = Qt.createQmlObject("import QtQuick.Extras 1.4; Tumbler { }", container, "");
verify(tumbler, "Tumbler: failed to create an instance");
}
@@ -165,7 +166,7 @@ Item {
tumbler.getColumn(0).visible = false;
verify(!tumbler.__viewAt(0).visible);
- if (StyleSettings.styleName === "Base")
+ if (Settings.styleName === "Base")
verify(!tumbler.__viewAt(0).parent.separator.visible);
}
@@ -243,7 +244,7 @@ Item {
// Somehow it works with the Base style. It could be rewritten to use an
// equal amount of items for the model and visibleItemCount, judging from
// the snippet in QTBUG-40298.
- if (StyleSettings.styleName === "Flat")
+ if (Settings.styleName === "Flat")
skip("Not a valid test case as the model count is less than the visibleItemCount");
tumbler.height = 120;
@@ -308,7 +309,7 @@ Item {
var pos = Qt.point(columnXCenter(0), tumbler.__style.padding.top);
mouseDrag(tumbler, pos.x, pos.y, 0, tumbler.height - tumbler.__style.padding.bottom,
Qt.LeftButton, Qt.NoModifier, 300);
- tryCompare(tumbler.__viewAt(0), "offset", StyleSettings.styleName === "Flat" ? 6.0 : 4.0);
+ tryCompare(tumbler.__viewAt(0), "offset", Settings.styleName === "Flat" ? 6.0 : 4.0);
tumbler.height += 100;
var padding = tumbler.__style.padding;