summaryrefslogtreecommitdiff
path: root/tests/auto/controls
diff options
context:
space:
mode:
Diffstat (limited to 'tests/auto/controls')
-rw-r--r--tests/auto/controls/data/tst_calendar.qml18
-rw-r--r--tests/auto/controls/data/tst_combobox.qml9
-rw-r--r--tests/auto/controls/data/tst_slider.qml9
-rw-r--r--tests/auto/controls/data/tst_tableview.qml2
4 files changed, 25 insertions, 13 deletions
diff --git a/tests/auto/controls/data/tst_calendar.qml b/tests/auto/controls/data/tst_calendar.qml
index 1185aca9..814a361a 100644
--- a/tests/auto/controls/data/tst_calendar.qml
+++ b/tests/auto/controls/data/tst_calendar.qml
@@ -132,7 +132,7 @@ Item {
compare(calendar.selectedDate, new Date(new Date().setHours(0, 0, 0, 0)));
compare(calendar.frameVisible, true);
compare(calendar.dayOfWeekFormat, Locale.ShortFormat);
- compare(calendar.__locale, Qt.locale());
+ compare(calendar.locale, Qt.locale());
}
function test_setAfterConstructed() {
@@ -141,13 +141,13 @@ Item {
calendar.selectedDate = new Date(1980, 0, 1);
calendar.frameVisible = false;
calendar.dayOfWeekFormat = Locale.NarrowFormat;
- calendar.__locale = Qt.locale("de_DE");
+ calendar.locale = Qt.locale("de_DE");
compare(calendar.minimumDate, new Date(1900, 0, 1));
compare(calendar.maximumDate, new Date(1999, 11, 31));
compare(calendar.selectedDate, new Date(1980, 0, 1));
compare(calendar.frameVisible, false);
- compare(calendar.__locale, Qt.locale("de_DE"));
+ compare(calendar.locale, Qt.locale("de_DE"));
}
function test_selectedDate() {
@@ -205,7 +205,7 @@ Item {
calendar.selectedDate = new Date(2013, 0, 1);
// Set this to a certain locale, because days will be in different
// places depending on the system locale of the host machine.
- calendar.__locale = Qt.locale("en_GB");
+ calendar.locale = Qt.locale("en_GB");
/* January 2013 December 2012
M T W T F S S M T W T F S S
@@ -371,7 +371,7 @@ Item {
var startDate = new Date(2013, 0, 1);
calendar.selectedDate = startDate;
- calendar.__locale = Qt.locale("en_US");
+ calendar.locale = Qt.locale("en_US");
compare(calendar.selectedDate, startDate);
pressedSignalSpy.target = calendar;
@@ -457,7 +457,7 @@ Item {
calendar.minimumDate = new Date(2013, 0, 1);
calendar.selectedDate = new Date(startDate);
calendar.maximumDate = new Date(2013, 1, 5);
- calendar.__locale = Qt.locale("no_NO");
+ calendar.locale = Qt.locale("no_NO");
pressedSignalSpy.target = calendar;
pressedSignalSpy.signalName = "pressed";
@@ -531,7 +531,7 @@ Item {
22 23 24 25 26 27 28
29 30 31 1 2 3 4 */
- calendar.__locale = Qt.locale("en_GB");
+ calendar.locale = Qt.locale("en_GB");
calendar.selectedDate = new Date(2014, 11, 1);
mousePress(calendar, toPixelsX(0), toPixelsY(0), Qt.LeftButton);
compare(calendar.selectedDate, new Date(2014, 10, 24));
@@ -602,7 +602,7 @@ Item {
calendar.minimumDate = new Date(2014, 1, 1);
calendar.selectedDate = new Date(2014, 1, 28);
calendar.maximumDate = new Date(2014, 2, 31);
- calendar.__locale = Qt.locale("en_GB");
+ calendar.locale = Qt.locale("en_GB");
pressedSignalSpy.target = calendar;
pressedSignalSpy.signalName = "pressed";
@@ -875,7 +875,7 @@ Item {
function test_pressAndHold() {
calendar.selectedDate = new Date(2013, 0, 1);
- calendar.__locale = Qt.locale("en_GB");
+ calendar.locale = Qt.locale("en_GB");
pressedSignalSpy.target = calendar;
pressedSignalSpy.signalName = "pressed";
diff --git a/tests/auto/controls/data/tst_combobox.qml b/tests/auto/controls/data/tst_combobox.qml
index 632a1d15..ce8b6c42 100644
--- a/tests/auto/controls/data/tst_combobox.qml
+++ b/tests/auto/controls/data/tst_combobox.qml
@@ -512,10 +512,13 @@ TestCase {
mouseClick(comboBox, comboBox.x + 1, comboBox.y + 1)
verify(!comboBox.activeFocus)
comboBox.activeFocusOnPress = true
- if (Qt.platform.os === "osx") // on mac when the menu open, the __popup function does not return
+ if (Qt.platform.os === "osx") { // on macOS when the menu open, the __popup function does not return
timer.start()
- else // two mouse clicks to open and close the popup menu
- mouseClick(comboBox, comboBox.x + 1, comboBox.y + 1)
+ } else {
+ // two mouse clicks to open and close the popup menu. The 1ms delay between mouse presses is
+ // needed with software quick renderer. Without the delay, this test is flaky.
+ mouseClick(comboBox, comboBox.x + 1, comboBox.y + 1, Qt.LeftButton, Qt.NoModifier, 1)
+ }
mouseClick(comboBox, comboBox.x + 1, comboBox.y + 1)
verify(comboBox.activeFocus)
comboBox.destroy()
diff --git a/tests/auto/controls/data/tst_slider.qml b/tests/auto/controls/data/tst_slider.qml
index 34627daa..9e2ba0f1 100644
--- a/tests/auto/controls/data/tst_slider.qml
+++ b/tests/auto/controls/data/tst_slider.qml
@@ -51,7 +51,7 @@
import QtQuick 2.6
import QtTest 1.0
import QtQuickControlsTests 1.0
-import QtQuick.Controls 1.4
+import QtQuick.Controls 1.6
import QtQuick.Controls.Private 1.0
import QtQuick.Controls.Styles 1.4
@@ -176,6 +176,13 @@ Item {
slider.value = 0
mouseWheel(slider, 5, 5, -40 * ratio, 0)
compare(slider.value, slider.maximumValue)
+
+ // Mousewheel deactivated
+ slider.value = 0
+ slider.wheelEnabled = false
+ mouseWheel(slider, 5, 5, 4 * ratio, 0)
+ compare(slider.value, 0)
+
slider.destroy()
}
diff --git a/tests/auto/controls/data/tst_tableview.qml b/tests/auto/controls/data/tst_tableview.qml
index fe50f241..0b54634e 100644
--- a/tests/auto/controls/data/tst_tableview.qml
+++ b/tests/auto/controls/data/tst_tableview.qml
@@ -971,6 +971,8 @@ TestCase {
table.getColumn(0).width = 20
compare(table.getColumn(0).width, 20)
table.resizeColumnsToContents()
+ if (Qt.platform.pluginName === "offscreen")
+ expectFail("", "QTBUG-62496")
compare(table.getColumn(0).width, 50)
table.destroy()
}