aboutsummaryrefslogtreecommitdiffstats
path: root/tests/auto
diff options
context:
space:
mode:
authorJ-P Nurmi <jpnurmi@theqtcompany.com>2015-12-08 14:26:51 +0100
committerJ-P Nurmi <jpnurmi@theqtcompany.com>2015-12-09 19:26:18 +0000
commit3a5bd3d4e564a1b3cd56ed2cfb5258e4ded763b6 (patch)
treecaf02741b70b3a1c44277e74fc9ce7d1aa924620 /tests/auto
parentd1d3438f59a96f2263076d41d82a99e7269b4159 (diff)
Rename Panel to Popup
Popup is a more descriptive name. Furthermore, this name change opens the door for another type called Pane. It gives the appropriate background color for the current style & theme. Change-Id: Idb91d37e807f62e870b50f0b656e84ee2d43a9fb Reviewed-by: Mitch Curtis <mitch.curtis@theqtcompany.com>
Diffstat (limited to 'tests/auto')
-rw-r--r--tests/auto/controls/data/tst_combobox.qml52
-rw-r--r--tests/auto/menu/tst_menu.cpp2
2 files changed, 27 insertions, 27 deletions
diff --git a/tests/auto/controls/data/tst_combobox.qml b/tests/auto/controls/data/tst_combobox.qml
index a0798842..c8b720cb 100644
--- a/tests/auto/controls/data/tst_combobox.qml
+++ b/tests/auto/controls/data/tst_combobox.qml
@@ -104,7 +104,7 @@ TestCase {
compare(control.highlightedIndex, -1)
compare(control.currentText, "")
verify(control.delegate)
- verify(control.panel)
+ verify(control.popup)
control.destroy()
}
@@ -342,7 +342,7 @@ TestCase {
compare(highlightedSpy.count, 0)
compare(activatedSpy.count, 0)
- // show panel
+ // show popup
keyClick(Qt.Key_Space)
compare(control.currentIndex, 0)
@@ -400,7 +400,7 @@ TestCase {
compare(highlightedSpy.signalArguments[0][0], 1)
highlightedSpy.clear()
- // hide panel
+ // hide popup
keyClick(Qt.Key_Space)
compare(control.currentIndex, 1)
@@ -431,54 +431,54 @@ TestCase {
verify(control.activeFocus)
compare(control.pressed, false)
- compare(control.panel.visible, false)
+ compare(control.popup.visible, false)
- // show panel
+ // show popup
keyPress(data.key1)
compare(control.pressed, data.showPress)
- compare(control.panel.visible, false)
+ compare(control.popup.visible, false)
keyRelease(data.key1)
compare(control.pressed, false)
- compare(control.panel.visible, data.showPopup)
+ compare(control.popup.visible, data.showPopup)
- // hide panel
+ // hide popup
keyPress(data.key2)
compare(control.pressed, data.hidePress)
- compare(control.panel.visible, data.showPopup)
+ compare(control.popup.visible, data.showPopup)
keyRelease(data.key2)
compare(control.pressed, false)
- compare(control.panel.visible, !data.hidePopup)
+ compare(control.popup.visible, !data.hidePopup)
control.destroy()
}
- function test_panel() {
+ function test_popup() {
var control = comboBox.createObject(window.contentItem, {model: 3})
verify(control)
// show below
mousePress(control)
compare(control.pressed, true)
- compare(control.panel.visible, false)
+ compare(control.popup.visible, false)
mouseRelease(control)
compare(control.pressed, false)
- compare(control.panel.visible, true)
- verify(control.panel.contentItem.y >= control.y)
+ compare(control.popup.visible, true)
+ verify(control.popup.contentItem.y >= control.y)
// hide
mouseClick(control)
compare(control.pressed, false)
- compare(control.panel.visible, false)
+ compare(control.popup.visible, false)
// show above
control.y = window.height - control.height
mousePress(control)
compare(control.pressed, true)
- compare(control.panel.visible, false)
+ compare(control.popup.visible, false)
mouseRelease(control)
compare(control.pressed, false)
- compare(control.panel.visible, true)
- verify(control.panel.contentItem.y < control.y)
+ compare(control.popup.visible, true)
+ verify(control.popup.contentItem.y < control.y)
control.destroy()
}
@@ -494,9 +494,9 @@ TestCase {
verify(highlightedSpy.valid)
mouseClick(control)
- compare(control.panel.visible, true)
+ compare(control.popup.visible, true)
- var content = control.panel.contentItem
+ var content = control.popup.contentItem
waitForRendering(content)
// press - move - release outside - not activated - not closed
@@ -509,7 +509,7 @@ TestCase {
mouseRelease(content, content.width * 2)
compare(activatedSpy.count, 0)
compare(highlightedSpy.count, 0)
- compare(control.panel.visible, true)
+ compare(control.popup.visible, true)
// press - move - release inside - activated - closed
mousePress(content)
@@ -521,7 +521,7 @@ TestCase {
mouseRelease(content)
compare(activatedSpy.count, 1)
compare(highlightedSpy.count, 1)
- compare(control.panel.visible, false)
+ compare(control.popup.visible, false)
control.destroy()
}
@@ -530,16 +530,16 @@ TestCase {
var control = comboBox.createObject(window.contentItem, {model: 3})
verify(control)
- // click - gain focus - show panel
+ // click - gain focus - show popup
mouseClick(control)
verify(control.activeFocus)
- compare(control.panel.visible, true)
+ compare(control.popup.visible, true)
- // lose focus - hide panel
+ // lose focus - hide popup
window.contentItem.forceActiveFocus()
verify(window.contentItem.activeFocus)
verify(!control.activeFocus)
- compare(control.panel.visible, false)
+ compare(control.popup.visible, false)
control.destroy()
}
diff --git a/tests/auto/menu/tst_menu.cpp b/tests/auto/menu/tst_menu.cpp
index f4df7eb5..5823767a 100644
--- a/tests/auto/menu/tst_menu.cpp
+++ b/tests/auto/menu/tst_menu.cpp
@@ -149,7 +149,7 @@ void tst_menu::mouse()
QVERIFY(window->overlay()->childItems().contains(menu->contentItem()));
// Try pressing within the menu and releasing outside of it; it should close.
- // TODO: won't work until QQuickPanel::releasedOutside() actually gets emitted
+ // TODO: won't work until QQuickPopup::releasedOutside() actually gets emitted
// QTest::mousePress(window, Qt::LeftButton, Qt::NoModifier, QPoint(firstItem->width() / 2, firstItem->height() / 2));
// QVERIFY(firstItem->hasActiveFocus());
// QCOMPARE(menu->contentItem()->property("currentIndex"), QVariant(0));