Debian Codegraph @

tests/unit/bottomedge13/tst_bottomedge.cpp

raw symbols SCIP
1 /*
2 * Copyright 2015 Canonical Ltd.
3 *
4 * This program is free software; you can redistribute it and/or modify
5 * it under the terms of the GNU Lesser General Public License as published by
6 * the Free Software Foundation; version 3.
7 *
8 * This program is distributed in the hope that it will be useful,
9 * but WITHOUT ANY WARRANTY; without even the implied warranty of
10 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
11 * GNU Lesser General Public License for more details.
12 *
13 * You should have received a copy of the GNU Lesser General Public License
14 * along with this program. If not, see <http://www.gnu.org/licenses/>.
15 */
16
17 #include <QtGlobal>
18
19 #if QT_VERSIONcxx . . $ `<external>/15045578679651060896/qglobal.h:57:9`! >= QT_VERSION_CHECKcxx . . $ `<external>/15045578679651060896/qglobal.h:61:9`!(6, 0, 0)
20 #include <LomiriGestures-Qt6/private/ucswipearea_p_p.h>
21 #else
22 #include <LomiriGestures/private/ucswipearea_p_p.h>cxx . . $ `<file>/include/LomiriGestures/5.5.0/LomiriGestures/private/ucswipearea_p_p.h`/
23 #endif
24 #if QT_VERSIONcxx . . $ `<external>/15045578679651060896/qglobal.h:57:9`! >= QT_VERSION_CHECKcxx . . $ `<external>/15045578679651060896/qglobal.h:61:9`!(6, 0, 0)
25 #include <LomiriToolkit-Qt6/private/ucaction_p.h>
26 #else
27 #include <LomiriToolkit/private/ucaction_p.h>cxx . . $ `<file>/include/LomiriToolkit/5.5.0/LomiriToolkit/private/ucaction_p.h`/
28 #endif
29 #if QT_VERSIONcxx . . $ `<external>/15045578679651060896/qglobal.h:57:9`! >= QT_VERSION_CHECKcxx . . $ `<external>/15045578679651060896/qglobal.h:61:9`!(6, 0, 0)
30 #include <LomiriToolkit-Qt6/private/ucbottomedge_p.h>
31 #else
32 #include <LomiriToolkit/private/ucbottomedge_p.h>cxx . . $ `<file>/include/LomiriToolkit/5.5.0/LomiriToolkit/private/ucbottomedge_p.h`/
33 #endif
34 #if QT_VERSIONcxx . . $ `<external>/15045578679651060896/qglobal.h:57:9`! >= QT_VERSION_CHECKcxx . . $ `<external>/15045578679651060896/qglobal.h:61:9`!(6, 0, 0)
35 #include <LomiriToolkit-Qt6/private/ucbottomedge_p_p.h>
36 #else
37 #include <LomiriToolkit/private/ucbottomedge_p_p.h>cxx . . $ `<file>/include/LomiriToolkit/5.5.0/LomiriToolkit/private/ucbottomedge_p_p.h`/
38 #endif
39 #if QT_VERSIONcxx . . $ `<external>/15045578679651060896/qglobal.h:57:9`! >= QT_VERSION_CHECKcxx . . $ `<external>/15045578679651060896/qglobal.h:61:9`!(6, 0, 0)
40 #include <LomiriToolkit-Qt6/private/ucbottomedgehint_p.h>
41 #else
42 #include <LomiriToolkit/private/ucbottomedgehint_p.h>cxx . . $ `<file>/include/LomiriToolkit/5.5.0/LomiriToolkit/private/ucbottomedgehint_p.h`/
43 #endif
44 #if QT_VERSIONcxx . . $ `<external>/15045578679651060896/qglobal.h:57:9`! >= QT_VERSION_CHECKcxx . . $ `<external>/15045578679651060896/qglobal.h:61:9`!(6, 0, 0)
45 #include <LomiriToolkit-Qt6/private/ucbottomedgeregion_p.h>
46 #else
47 #include <LomiriToolkit/private/ucbottomedgeregion_p.h>cxx . . $ `<file>/include/LomiriToolkit/5.5.0/LomiriToolkit/private/ucbottomedgeregion_p.h`/
48 #endif
49 #if QT_VERSIONcxx . . $ `<external>/15045578679651060896/qglobal.h:57:9`! >= QT_VERSION_CHECKcxx . . $ `<external>/15045578679651060896/qglobal.h:61:9`!(6, 0, 0)
50 #include <LomiriToolkit-Qt6/private/ucbottomedgeregion_p_p.h>
51 #else
52 #include <LomiriToolkit/private/ucbottomedgeregion_p_p.h>cxx . . $ `<file>/include/LomiriToolkit/5.5.0/LomiriToolkit/private/ucbottomedgeregion_p_p.h`/
53 #endif
54 #if QT_VERSIONcxx . . $ `<external>/15045578679651060896/qglobal.h:57:9`! >= QT_VERSION_CHECKcxx . . $ `<external>/15045578679651060896/qglobal.h:61:9`!(6, 0, 0)
55 #include <LomiriToolkit-Qt6/private/ucheader_p.h>
56 #else
57 #include <LomiriToolkit/private/ucheader_p.h>cxx . . $ `<file>/include/LomiriToolkit/5.5.0/LomiriToolkit/private/ucheader_p.h`/
58 #endif
59 #if QT_VERSIONcxx . . $ `<external>/15045578679651060896/qglobal.h:57:9`! >= QT_VERSION_CHECKcxx . . $ `<external>/15045578679651060896/qglobal.h:61:9`!(6, 0, 0)
60 #include <LomiriToolkit-Qt6/private/ucunits_p.h>
61 #else
62 #include <LomiriToolkit/private/ucunits_p.h>cxx . . $ `<file>/include/LomiriToolkit/5.5.0/LomiriToolkit/private/ucunits_p.h`/
63 #endif
64 #define privatecxx . . $ `tests/unit/bottomedge13/tst_bottomedge.cpp:64:9`! public
65 #if QT_VERSIONcxx . . $ `<external>/15045578679651060896/qglobal.h:57:9`! >= QT_VERSION_CHECKcxx . . $ `<external>/15045578679651060896/qglobal.h:61:9`!(6, 0, 0)
66 #include <LomiriToolkit-Qt6/private/quickutils_p.h>
67 #else
68 #include <LomiriToolkit/private/quickutils_p.h>cxx . . $ `<file>/include/LomiriToolkit/5.5.0/LomiriToolkit/private/quickutils_p.h`/
69 #endif
70 #if QT_VERSIONcxx . . $ `<external>/15045578679651060896/qglobal.h:57:9`! >= QT_VERSION_CHECKcxx . . $ `<external>/15045578679651060896/qglobal.h:61:9`!(6, 0, 0)
71 #include <LomiriToolkit-Qt6/private/ucbottomedgestyle_p.h>
72 #else
73 #include <LomiriToolkit/private/ucbottomedgestyle_p.h>cxx . . $ `<file>/include/LomiriToolkit/5.5.0/LomiriToolkit/private/ucbottomedgestyle_p.h`/
74 #endif
75 #undef privatecxx . . $ `tests/unit/bottomedge13/tst_bottomedge.cpp:64:9`!
76 #include <QtQml/QQmlListReference>
77 #include <QtQml/QtQml>
78 #include <QtTest/QtTest>
79
80 #include "uctestcase.h"cxx . . $ `<file>/src/imports/Test/plugin/uctestcase.h`/
81 #include "uctestextras.h"cxx . . $ `<file>/src/imports/Test/plugin/uctestextras.h`/
82
83 UT_USE_NAMESPACEcxx . . $ `src/LomiriToolkit/lomiritoolkitglobal.h:55:9`!
84
85 Q_DECLARE_METATYPEcxx . . $ `<external>/17491093664533580526/qmetatype.h:2056:9`!(Qt::Key)
86
87 #define QVERIFY_RETURNcxx . . $ `tests/unit/bottomedge13/tst_bottomedge.cpp:87:9`!(statement, returnValue) \
88 do {\
89 if (!QTest::qVerify((statement), #statement, "", __FILE__, __LINE__))\
90 return returnValue;\
91 } while (0)
92
93 class BottomEdgeTestCasecxx . . $ BottomEdgeTestCase# : public LomiriTestCasecxx . . $ LomiriTestCase#
94 {
95 Q_OBJECTcxx . . $ `<external>/1208926524888476972/qobjectdefs.h:170:9`!
96 public:
97 BottomEdgeTestCasecxx . . $ BottomEdgeTestCase#BottomEdgeTestCase(c80babac42470bec).(const QStringcxx . . $ QString#& file, ResizeModecxx . . $ QQuickView#ResizeMode# resize = SizeViewToRootObjectcxx . . $ QQuickView#SizeViewToRootObject., bool assertOnFailure = true, QWindowcxx . . $ QWindow#* parent = 0)
98 : LomiriTestCasecxx . . $ LomiriTestCase#(file, resize, assertOnFailure, parent)
99 {
100 // make sure we disable the mouse
101 QuickUtilscxx . . $ QuickUtils#::instancecxx . . $ QuickUtils#instance(abb75bba3ce2).()->m_mouseAttachedcxx . . $ QuickUtils#m_mouseAttached. = false;
102
103 // patch all BottomEdges' SwipeArea gesture recognition timer
104 QListcxx . . $ QList#<UCBottomEdgecxx . . $ UCBottomEdge#*> list = findChildrencxx . . $ QObject#findChildren(ebc97c843616cfa2).<UCBottomEdgecxx . . $ UCBottomEdge#*>();
105 for (int i = 0; i < list.sizecxx . . $ QList#size(ea6fe5115c70a13f).(); ++i) {
106 UCBottomEdgecxx . . $ UCBottomEdge# *bottomEdge = list[cxx . . $ QList#`operator[]`(7a0ef1c7079e8533).i];
107 UCSwipeAreacxx . . $ UCSwipeArea# *swipeArea = bottomEdge->hintcxx . . $ UCBottomEdge#hint(8de00351da73cb39).()->swipeAreacxx . . $ UCBottomEdgeHint#swipeArea(a17832f3c564b97e).();
108 swipeArea->setImmediateRecognitioncxx . . $ LomiriGestures/UCSwipeArea#setImmediateRecognition(b45ddcbc8423892c).(true);
109 }
110 }
111 ~cxx . . $ BottomEdgeTestCase#`~BottomEdgeTestCase`(ced63f7c635d850d).BottomEdgeTestCasecxx . . $ BottomEdgeTestCase#()
112 {
113 // add a small timeout after each run to have a proper cleanup
114 QTestcxx . . $ QTest/::qWaitcxx . . $ QTest/qWait(d4f767463ce0a6b3).(400);
115 }
116
117 UCBottomEdgecxx . . $ UCBottomEdge# *testItemcxx . . $ BottomEdgeTestCase#testItem(801721994f3c45c4).(const QStringcxx . . $ QString# &objectName = "testItem"cxx . . $ QString#QString(85c52e162fed56f9).)
118 {
119 return findItemcxx . . $ LomiriTestCase#findItem(f3a17af68b47f04b).<UCBottomEdgecxx . . $ UCBottomEdge#*>(objectName);
120 }
121
122 typedef QListcxx . . $ QList#<UCBottomEdgeRegioncxx . . $ UCBottomEdgeRegion#*> RegionListcxx . . $ BottomEdgeTestCase#RegionList#;
123 RegionListcxx . . $ BottomEdgeTestCase#RegionList# *regionscxx . . $ BottomEdgeTestCase#regions(1215d4c8cdc41825).(const QStringcxx . . $ QString# &testItem)
124 {
125 QQmlListPropertycxx . . $ QQmlListProperty#<UCBottomEdgeRegioncxx . . $ UCBottomEdgeRegion#> qmlRegions(this->testItemcxx . . $ BottomEdgeTestCase#testItem(801721994f3c45c4).(testItem)->regionscxx . . $ UCBottomEdge#regions(b07b03f060c855c5).());
126 return reinterpret_cast<RegionListcxx . . $ BottomEdgeTestCase#RegionList#*>(qmlRegions.datacxx . . $ QQmlListProperty#data.);
127 }
128
129 UCBottomEdgeRegioncxx . . $ UCBottomEdgeRegion# *regionAtcxx . . $ BottomEdgeTestCase#regionAt(8f144f9e9581d575).(const QStringcxx . . $ QString# &testItem, int index)
130 {
131 QVERIFY_RETURNcxx . . $ `tests/unit/bottomedge13/tst_bottomedge.cpp:87:9`!(regions(testItem), nullptr);
132 QVERIFY_RETURNcxx . . $ `tests/unit/bottomedge13/tst_bottomedge.cpp:87:9`!(regions(testItem)->size() > index, nullptr);
133 return regionscxx . . $ BottomEdgeTestCase#regions(1215d4c8cdc41825).(testItem)->atcxx . . $ QList#at(e2681f9bb6b2f357).(index);
134 }
135
136 bool hasContentAutoCollapsecxx . . $ BottomEdgeTestCase#hasContentAutoCollapse(e1defb592416720d).(const QStringcxx . . $ QString# &testItem = "testItem"cxx . . $ QString#QString(85c52e162fed56f9).)
137 {
138 UCBottomEdgecxx . . $ UCBottomEdge# *bottomEdge = this->testItemcxx . . $ BottomEdgeTestCase#testItem(801721994f3c45c4).(testItem);
139 QQuickItemcxx . . $ QQuickItem# *contentItem = bottomEdge->contentItemcxx . . $ UCBottomEdge#contentItem(e7eee0192cff5fb0).();
140 if (!contentItem) {
141 return false;
142 }
143 // we do not have the PageHeader in cpp, therefore we need the same workaround we have in the code
144 UCHeadercxx . . $ UCHeader# *header = contentItem->findChildcxx . . $ QObject#findChild(d560e1421e3a90b4).<UCHeadercxx . . $ UCHeader#*>();
145 if (!QuickUtilscxx . . $ QuickUtils#::inheritscxx . . $ QuickUtils#inherits(c3b2fa720b8f59c3).(header, "PageHeader"cxx . . $ QString#QString(85c52e162fed56f9).)) {
146 return false;
147 }
148
149 #if QT_VERSIONcxx . . $ `<external>/15045578679651060896/qglobal.h:57:9`! >= QT_VERSION_CHECKcxx . . $ `<external>/15045578679651060896/qglobal.h:61:9`!(6, 0, 0)
150 QQmlListReference navigationActions(header, /* property */ "navigationActions");
151 #else
152 QQmlListReferencecxx . . $ QQmlListReference# navigationActionscxx . . $ QQmlListReference#QQmlListReference(50afbc2af027166).(header, /* property */ "navigationActions", qmlEnginecxx . . $ QtQml/qmlEngine(48d7b7cdcf102340).(header));
153 #endif
154 if (navigationActions.countcxx . . $ QQmlListReference#count(455f465bc33b4cdf).() <= 0) {
155 return false;
156 }
157 return (qobject_castcxx . . $ qobject_cast(c988cfc0ca08742e).<UCCollapseActioncxx . . $ UCCollapseAction#*>(navigationActions.atcxx . . $ QQmlListReference#at(2981cc40b79aaac9).(0)) != Q_NULLPTRcxx . . $ `/usr/include/x86_64-linux-gnu/qt5/QtCore/qcompilerdetection.h:1095:10`!);
158 }
159
160 void guToPointscxx . . $ BottomEdgeTestCase#guToPoints(6c7a99f76219d013).(QListcxx . . $ QList#<QPointcxx . . $ QPoint#> &guMoves)
161 {
162 for (int i = 0; i < guMoves.sizecxx . . $ QList#size(ea6fe5115c70a13f).(); i++) {
163 guMoves[cxx . . $ QList#`operator[]`(7a0ef1c7079e8533).i] =cxx . . $ QPoint#`operator=`(2950c70ea382b4e5). QPointFcxx . . $ QPointF#QPointF(bc12c9ec15586e6a).(UCUnitscxx . . $ UCUnits#::instancecxx . . $ UCUnits#instance(30bb1e7b117091bb).()->gucxx . . $ UCUnits#gu(fbcf3211dfe1bfd1).(guMoves[cxx . . $ QList#`operator[]`(7a0ef1c7079e8533).i].xcxx . . $ QPoint#x(455f465bc33b4cdf).()), UCUnitscxx . . $ UCUnits#::instancecxx . . $ UCUnits#instance(30bb1e7b117091bb).()->gucxx . . $ UCUnits#gu(fbcf3211dfe1bfd1).(guMoves[cxx . . $ QList#`operator[]`(7a0ef1c7079e8533).i].ycxx . . $ QPoint#y(455f465bc33b4cdf).())).toPointcxx . . $ QPointF#toPoint(75d69cfbd3c4b2dd).();
164 }
165 }
166 };
167
168
169 class tst_BottomEdgecxx . . $ tst_BottomEdge# : public QObjectcxx . . $ QObject#
170 {
171 Q_OBJECTcxx . . $ `<external>/1208926524888476972/qobjectdefs.h:170:9`!
172 QStringListcxx . . $ QStringList# regionObjectscxx . . $ tst_BottomEdge#regionObjects.;
173 private Q_SLOTScxx . . $ `<external>/1208926524888476972/qobjectdefs.h:92:10`!:
174
175 void initTestCasecxx . . $ tst_BottomEdge#initTestCase(49f6e7a06ebc5aa8).()
176 {
177 UCTestExtrascxx . . $ UCTestExtras#::registerTouchDevicecxx . . $ UCTestExtras#registerTouchDevice(49f6e7a06ebc5aa8).();
178 }
179
180 void initcxx . . $ tst_BottomEdge#init(49f6e7a06ebc5aa8).()
181 {
182 regionObjectscxx . . $ tst_BottomEdge#regionObjects..clearcxx . . $ QList#clear(49f6e7a06ebc5aa8).();
183 }
184
185 private Q_SLOTScxx . . $ `<external>/1208926524888476972/qobjectdefs.h:92:10`!:
186 void test_defaultscxx . . $ tst_BottomEdge#test_defaults(49f6e7a06ebc5aa8).()
187 {
188 QScopedPointercxx . . $ QScopedPointer#<BottomEdgeTestCasecxx . . $ BottomEdgeTestCase#> testcxx . . $ QScopedPointer#QScopedPointer(6f97683fca3ece44).(new BottomEdgeTestCasecxx . . $ BottomEdgeTestCase#("Defaults.qml"cxx . . $ QString#QString(85c52e162fed56f9).));
189 QCOMPAREcxx . . $ `<external>/8602788698586413231/qtestcase.h:86:9`!(test->testItem()->height(), test->rootObject()->height());
190 QCOMPAREcxx . . $ `<external>/8602788698586413231/qtestcase.h:86:9`!(test->testItem()->dragProgress(), 0.0);
191 QCOMPAREcxx . . $ `<external>/8602788698586413231/qtestcase.h:86:9`!(test->testItem()->dragDirection(), UCBottomEdge::Undefined);
192 QCOMPAREcxx . . $ `<external>/8602788698586413231/qtestcase.h:86:9`!(test->testItem()->status(), UCBottomEdge::Hidden);
193 QCOMPAREcxx . . $ `<external>/8602788698586413231/qtestcase.h:86:9`!(test->testItem()->contentUrl(), QUrl());
194 QVERIFYcxx . . $ `<external>/8602788698586413231/qtestcase.h:63:9`!(!test->testItem()->contentComponent());
195 QVERIFYcxx . . $ `<external>/8602788698586413231/qtestcase.h:63:9`!(!test->testItem()->contentItem());
196 QVERIFYcxx . . $ `<external>/8602788698586413231/qtestcase.h:63:9`!(test->regions("testItem"));
197 QCOMPAREcxx . . $ `<external>/8602788698586413231/qtestcase.h:86:9`!(test->regions("testItem")->size(), 1);
198 QCOMPAREcxx . . $ `<external>/8602788698586413231/qtestcase.h:86:9`!(test->regionAt("testItem", 0)->objectName(), QString("default_BottomEdgeRegion"));
199 QCOMPAREcxx . . $ `<external>/8602788698586413231/qtestcase.h:86:9`!(UCBottomEdgeRegionPrivate::get(test->regionAt("testItem", 0))->from, 0.0);
200 QCOMPAREcxx . . $ `<external>/8602788698586413231/qtestcase.h:86:9`!(UCBottomEdgeRegionPrivate::get(test->regionAt("testItem", 0))->to, 1.0);
201 QVERIFYcxx . . $ `<external>/8602788698586413231/qtestcase.h:63:9`!(!test->testItem()->activeRegion());
202 QVERIFYcxx . . $ `<external>/8602788698586413231/qtestcase.h:63:9`!(!test->testItem()->preloadContent());
203 }
204
205 void test_height_moves_when_reparentedcxx . . $ tst_BottomEdge#test_height_moves_when_reparented(49f6e7a06ebc5aa8).()
206 {
207 QScopedPointercxx . . $ QScopedPointer#<BottomEdgeTestCasecxx . . $ BottomEdgeTestCase#> testcxx . . $ QScopedPointer#QScopedPointer(6f97683fca3ece44).(new BottomEdgeTestCasecxx . . $ BottomEdgeTestCase#("DifferentSizes.qml"cxx . . $ QString#QString(85c52e162fed56f9).));
208 QQuickItemcxx . . $ QQuickItem# *newParent = test->cxx . . $ QScopedPointer#`operator->`(34d6acfd341ba7ab).rootObjectcxx . . $ QQuickView#rootObject(e7eee0192cff5fb0).();
209 QQuickItemcxx . . $ QQuickItem# *oldParent = test->cxx . . $ QScopedPointer#`operator->`(34d6acfd341ba7ab).findItemcxx . . $ LomiriTestCase#findItem(f3a17af68b47f04b).<QQuickItemcxx . . $ QQuickItem#*>("oldParent"cxx . . $ QString#QString(85c52e162fed56f9).);
210 UCBottomEdgecxx . . $ UCBottomEdge# *testItem = test->cxx . . $ QScopedPointer#`operator->`(34d6acfd341ba7ab).testItemcxx . . $ BottomEdgeTestCase#testItem(801721994f3c45c4).();
211
212 QSignalSpycxx . . $ QSignalSpy# spycxx . . $ QSignalSpy#QSignalSpy(593025bf41bda872).(testItem, SIGNALcxx . . $ `<external>/1208926524888476972/qobjectdefs.h:271:10`!(implicitHeightChanged()));
213 testItem->setParentItemcxx . . $ QQuickItem#setParentItem(28aa4acb8f529eea).(newParent);
214 LomiriTestCasecxx . . $ LomiriTestCase#::waitForSignalcxx . . $ LomiriTestCase#waitForSignal(fa74d1cf20e4f830).(&spy);
215
216 // change the implicit height so we are sure we don't get the height change triggered
217 testItem->setImplicitHeightcxx . . $ QQuickItem#setImplicitHeight(ba8836b59fb42830).(0);
218 spy.clearcxx . . $ QList#clear(49f6e7a06ebc5aa8).();
219 oldParent->setHeightcxx . . $ QQuickItem#setHeight(ba8836b59fb42830).(20);
220 QEXPECT_FAILcxx . . $ `<external>/8602788698586413231/qtestcase.h:195:9`!(0, "no implicitHeight change is expected", Continue);
221 QVERIFYcxx . . $ `<external>/8602788698586413231/qtestcase.h:63:9`!(spy.wait(400));
222 }
223
224 void test_panel_is_last_item_of_parentcxx . . $ tst_BottomEdge#test_panel_is_last_item_of_parent(49f6e7a06ebc5aa8).()
225 {
226 QScopedPointercxx . . $ QScopedPointer#<BottomEdgeTestCasecxx . . $ BottomEdgeTestCase#> testcxx . . $ QScopedPointer#QScopedPointer(6f97683fca3ece44).(new BottomEdgeTestCasecxx . . $ BottomEdgeTestCase#("LastItem.qml"cxx . . $ QString#QString(85c52e162fed56f9).));
227 QQuickItemcxx . . $ QQuickItem# *bottomEdgeParent = test->cxx . . $ QScopedPointer#`operator->`(34d6acfd341ba7ab).testItemcxx . . $ BottomEdgeTestCase#testItem(801721994f3c45c4).()->parentItemcxx . . $ QQuickItem#parentItem(e7eee0192cff5fb0).();
228 UCBottomEdgePrivatecxx . . $ UCBottomEdgePrivate# *privateTestItem = UCBottomEdgePrivatecxx . . $ UCBottomEdgePrivate#::getcxx . . $ UCBottomEdgePrivate#get(9a23c5ede8912ed6).(test->cxx . . $ QScopedPointer#`operator->`(34d6acfd341ba7ab).testItemcxx . . $ BottomEdgeTestCase#testItem(801721994f3c45c4).());
229 QCOMPAREcxx . . $ `<external>/8602788698586413231/qtestcase.h:86:9`!(bottomEdgeParent->childItems().last(), privateTestItem->styleItem);
230
231 QQuickItemcxx . . $ QQuickItem# *dynamicItem = test->cxx . . $ QScopedPointer#`operator->`(34d6acfd341ba7ab).findItemcxx . . $ LomiriTestCase#findItem(f3a17af68b47f04b).<QQuickItemcxx . . $ QQuickItem#*>("dynamicItem"cxx . . $ QString#QString(85c52e162fed56f9).);
232 dynamicItem->setParentItemcxx . . $ QQuickItem#setParentItem(28aa4acb8f529eea).(bottomEdgeParent);
233 // still the last one
234 QCOMPAREcxx . . $ `<external>/8602788698586413231/qtestcase.h:86:9`!(bottomEdgeParent->childItems().last(), privateTestItem->styleItem);
235 }
236
237 void test_commit_when_clickedcxx . . $ tst_BottomEdge#test_commit_when_clicked(49f6e7a06ebc5aa8).()
238 {
239 QScopedPointercxx . . $ QScopedPointer#<BottomEdgeTestCasecxx . . $ BottomEdgeTestCase#> testcxx . . $ QScopedPointer#QScopedPointer(6f97683fca3ece44).(new BottomEdgeTestCasecxx . . $ BottomEdgeTestCase#("BottomEdgeInItem.qml"cxx . . $ QString#QString(85c52e162fed56f9).));
240 test->cxx . . $ QScopedPointer#`operator->`(34d6acfd341ba7ab).testItemcxx . . $ BottomEdgeTestCase#testItem(801721994f3c45c4).()->hintcxx . . $ UCBottomEdge#hint(8de00351da73cb39).()->setStatuscxx . . $ UCBottomEdgeHint#setStatus(9e5e67f3b399fdcc).(UCBottomEdgeHintcxx . . $ UCBottomEdgeHint#::Lockedcxx . . $ UCBottomEdgeHint#Locked.);
241 UCBottomEdgeHintcxx . . $ UCBottomEdgeHint# *hint = test->cxx . . $ QScopedPointer#`operator->`(34d6acfd341ba7ab).testItemcxx . . $ BottomEdgeTestCase#testItem(801721994f3c45c4).()->hintcxx . . $ UCBottomEdge#hint(8de00351da73cb39).();
242 QTestcxx . . $ QTest/::mouseClickcxx . . $ QTest/mouseClick(6597b0dc46846b01).(test->cxx . . $ QScopedPointer#`operator->`(34d6acfd341ba7ab).testItemcxx . . $ BottomEdgeTestCase#testItem(801721994f3c45c4).()->hintcxx . . $ UCBottomEdge#hint(8de00351da73cb39).()->windowcxx . . $ QQuickItem#window(7226278ce62b172a).(), Qtcxx . . $ Qt/::LeftButtoncxx . . $ Qt/LeftButton., Qtcxx . . $ QFlags#QFlags(93d577a3e9528307).::NoModifiercxx . . $ Qt/NoModifier., LomiriTestCasecxx . . $ LomiriTestCase#::centerOfcxx . . $ LomiriTestCase#centerOf(5c5880369c7fe484).(hint, true).toPointcxx . . $ QPointF#toPoint(75d69cfbd3c4b2dd).());
243 QTRY_COMPARE_WITH_TIMEOUTcxx . . $ `<external>/8602788698586413231/qtestcase.h:179:9`!(test->testItem()->status(), UCBottomEdge::Committed, 1000);
244 }
245
246 void test_commit_when_touch_clickedcxx . . $ tst_BottomEdge#test_commit_when_touch_clicked(49f6e7a06ebc5aa8).()
247 {
248 QSKIPcxx . . $ `<external>/8602788698586413231/qtestcase.h:193:9`!("Failing on Qt 5.9");
249
250 QScopedPointercxx . . $ QScopedPointer#<BottomEdgeTestCasecxx . . $ BottomEdgeTestCase#> testcxx . . $ QScopedPointer#QScopedPointer(6f97683fca3ece44).(new BottomEdgeTestCasecxx . . $ BottomEdgeTestCase#("BottomEdgeInItem.qml"cxx . . $ QString#QString(85c52e162fed56f9).));
251 UCBottomEdgeHintcxx . . $ UCBottomEdgeHint# *hint = test->cxx . . $ QScopedPointer#`operator->`(34d6acfd341ba7ab).testItemcxx . . $ BottomEdgeTestCase#testItem(801721994f3c45c4).()->hintcxx . . $ UCBottomEdge#hint(8de00351da73cb39).();
252 // swipe a bit to reveal
253
254 UCTestExtrascxx . . $ UCTestExtras#::touchDragcxx . . $ UCTestExtras#touchDrag(88bc2464b742ca51).(0, hint, QPointcxx . . $ QPoint#QPoint(3e454b8ccf442868).(hint->widthcxx . . $ QQuickItem#width(21b6c25e127938e2).() / 2, hint->heightcxx . . $ QQuickItem#height(21b6c25e127938e2).()), QPointcxx . . $ QPoint#QPoint(3e454b8ccf442868).(0, -hint->heightcxx . . $ QQuickItem#height(21b6c25e127938e2).()));
255 QTRY_COMPARE_WITH_TIMEOUTcxx . . $ `<external>/8602788698586413231/qtestcase.h:179:9`!(hint->status(), UCBottomEdgeHint::Active, 1000);
256
257 UCTestExtrascxx . . $ UCTestExtras#::touchClickcxx . . $ UCTestExtras#touchClick(f997a3282644e7b9).(0, hint, LomiriTestCasecxx . . $ LomiriTestCase#::centerOfcxx . . $ LomiriTestCase#centerOf(5c5880369c7fe484).(hint).toPointcxx . . $ QPointF#toPoint(75d69cfbd3c4b2dd).());
258 QTRY_COMPARE_WITH_TIMEOUTcxx . . $ `<external>/8602788698586413231/qtestcase.h:179:9`!(test->testItem()->status(), UCBottomEdge::Committed, 1000);
259 }
260
261 void test_overridden_triggers_bug1524234cxx . . $ tst_BottomEdge#test_overridden_triggers_bug1524234(49f6e7a06ebc5aa8).()
262 {
263 QScopedPointercxx . . $ QScopedPointer#<BottomEdgeTestCasecxx . . $ BottomEdgeTestCase#> testcxx . . $ QScopedPointer#QScopedPointer(6f97683fca3ece44).(new BottomEdgeTestCasecxx . . $ BottomEdgeTestCase#("OverriddenHintTrigger.qml"cxx . . $ QString#QString(85c52e162fed56f9).));
264 test->cxx . . $ QScopedPointer#`operator->`(34d6acfd341ba7ab).testItemcxx . . $ BottomEdgeTestCase#testItem(801721994f3c45c4).()->hintcxx . . $ UCBottomEdge#hint(8de00351da73cb39).()->setStatuscxx . . $ UCBottomEdgeHint#setStatus(9e5e67f3b399fdcc).(UCBottomEdgeHintcxx . . $ UCBottomEdgeHint#::Lockedcxx . . $ UCBottomEdgeHint#Locked.);
265 UCBottomEdgeHintcxx . . $ UCBottomEdgeHint# *hint = test->cxx . . $ QScopedPointer#`operator->`(34d6acfd341ba7ab).testItemcxx . . $ BottomEdgeTestCase#testItem(801721994f3c45c4).()->hintcxx . . $ UCBottomEdge#hint(8de00351da73cb39).();
266 UCActioncxx . . $ UCAction# *action = hint->actioncxx . . $ UCActionItem#action(5d1c4a3886a97659).();
267 QSignalSpycxx . . $ QSignalSpy# actionSpycxx . . $ QSignalSpy#QSignalSpy(593025bf41bda872).(action, SIGNALcxx . . $ `<external>/1208926524888476972/qobjectdefs.h:271:10`!(triggered(QVariant)));
268 QSignalSpycxx . . $ QSignalSpy# hintSpycxx . . $ QSignalSpy#QSignalSpy(593025bf41bda872).(hint, SIGNALcxx . . $ `<external>/1208926524888476972/qobjectdefs.h:271:10`!(triggered(QVariant)));
269
270 QTestcxx . . $ QTest/::mouseClickcxx . . $ QTest/mouseClick(6597b0dc46846b01).(test->cxx . . $ QScopedPointer#`operator->`(34d6acfd341ba7ab).testItemcxx . . $ BottomEdgeTestCase#testItem(801721994f3c45c4).()->hintcxx . . $ UCBottomEdge#hint(8de00351da73cb39).()->windowcxx . . $ QQuickItem#window(7226278ce62b172a).(), Qtcxx . . $ Qt/::LeftButtoncxx . . $ Qt/LeftButton., Qtcxx . . $ QFlags#QFlags(93d577a3e9528307).::NoModifiercxx . . $ Qt/NoModifier., LomiriTestCasecxx . . $ LomiriTestCase#::centerOfcxx . . $ LomiriTestCase#centerOf(5c5880369c7fe484).(hint, true).toPointcxx . . $ QPointF#toPoint(75d69cfbd3c4b2dd).());
271 QTRY_COMPARE_WITH_TIMEOUTcxx . . $ `<external>/8602788698586413231/qtestcase.h:179:9`!(test->testItem()->status(), UCBottomEdge::Committed, 1000);
272
273 QCOMPAREcxx . . $ `<external>/8602788698586413231/qtestcase.h:86:9`!(actionSpy.count(), 0);
274 QCOMPAREcxx . . $ `<external>/8602788698586413231/qtestcase.h:86:9`!(hintSpy.count(), 1);
275 }
276
277 void test_revealed_when_hint_threshold_passed_datacxx . . $ tst_BottomEdge#test_revealed_when_hint_threshold_passed_data(49f6e7a06ebc5aa8).()
278 {
279 QTestcxx . . $ QTest/::addColumncxx . . $ QTest/addColumn(cfe4d590606f2f46).<bool>("withMouse");
280 QTestcxx . . $ QTest/::addColumncxx . . $ QTest/addColumn(cfe4d590606f2f46).<bool>("lockHint");
281 QTestcxx . . $ QTest/::addColumncxx . . $ QTest/addColumn(cfe4d590606f2f46).<bool>("xfail");
282
283 QTestcxx . . $ QTest/::newRowcxx . . $ QTest/newRow(71534bb7a360de38).("drag with mouse, unlocked hint") <<cxx . . $ `operator<<`(61fb880f51a53ddf). true <<cxx . . $ `operator<<`(61fb880f51a53ddf). false <<cxx . . $ `operator<<`(61fb880f51a53ddf). true;
284 QTestcxx . . $ QTest/::newRowcxx . . $ QTest/newRow(71534bb7a360de38).("drag with mouse, locked hint") <<cxx . . $ `operator<<`(61fb880f51a53ddf). true <<cxx . . $ `operator<<`(61fb880f51a53ddf). true <<cxx . . $ `operator<<`(61fb880f51a53ddf). false;
285 QTestcxx . . $ QTest/::newRowcxx . . $ QTest/newRow(71534bb7a360de38).("drag with touch, unlocked hint") <<cxx . . $ `operator<<`(61fb880f51a53ddf). false <<cxx . . $ `operator<<`(61fb880f51a53ddf). false <<cxx . . $ `operator<<`(61fb880f51a53ddf). false;
286 QTestcxx . . $ QTest/::newRowcxx . . $ QTest/newRow(71534bb7a360de38).("drag with touch, locked hint") <<cxx . . $ `operator<<`(61fb880f51a53ddf). false <<cxx . . $ `operator<<`(61fb880f51a53ddf). true <<cxx . . $ `operator<<`(61fb880f51a53ddf). false;
287 }
288 void test_revealed_when_hint_threshold_passedcxx . . $ tst_BottomEdge#test_revealed_when_hint_threshold_passed(49f6e7a06ebc5aa8).()
289 {
290 QFETCHcxx . . $ `<external>/8602788698586413231/qtestcase.h:201:9`!(bool, withMouse);
291 QFETCHcxx . . $ `<external>/8602788698586413231/qtestcase.h:201:9`!(bool, lockHint);
292 QFETCHcxx . . $ `<external>/8602788698586413231/qtestcase.h:201:9`!(bool, xfail);
293
294 QScopedPointercxx . . $ QScopedPointer#<BottomEdgeTestCasecxx . . $ BottomEdgeTestCase#> testcxx . . $ QScopedPointer#QScopedPointer(6f97683fca3ece44).(new BottomEdgeTestCasecxx . . $ BottomEdgeTestCase#("BottomEdgeInItem.qml"cxx . . $ QString#QString(85c52e162fed56f9).));
295 UCBottomEdgecxx . . $ UCBottomEdge# *bottomEdge = test->cxx . . $ QScopedPointer#`operator->`(34d6acfd341ba7ab).testItemcxx . . $ BottomEdgeTestCase#testItem(801721994f3c45c4).();
296 UCBottomEdgeStylecxx . . $ UCBottomEdgeStyle# *style = UCBottomEdgePrivatecxx . . $ UCBottomEdgePrivate#::getcxx . . $ UCBottomEdgePrivate#get(9a23c5ede8912ed6).(bottomEdge)->bottomPanelcxx . . $ UCBottomEdgePrivate#bottomPanel.;
297 QSignalSpycxx . . $ QSignalSpy# spycxx . . $ QSignalSpy#QSignalSpy(a79b3c88ff1c9981).(bottomEdge, &UCBottomEdgecxx . . $ UCBottomEdge#::statusChangedcxx . . $ UCBottomEdge#statusChanged(7743a5ec4d327be6).);
298
299 // swipe till we reveal it
300 QPointcxx . . $ QPoint# fromcxx . . $ QPoint#QPoint(3e454b8ccf442868).(bottomEdge->widthcxx . . $ QQuickItem#width(21b6c25e127938e2).() / 2.0f, bottomEdge->heightcxx . . $ QQuickItem#height(21b6c25e127938e2).() - 1);
301 QPointcxx . . $ QPoint# deltacxx . . $ QPoint#QPoint(3e454b8ccf442868).(0, -(2 * style->m_revealThresholdcxx . . $ UCBottomEdgeStyle#m_revealThreshold.));
302 if (lockHint) {
303 bottomEdge->hintcxx . . $ UCBottomEdge#hint(8de00351da73cb39).()->setStatuscxx . . $ UCBottomEdgeHint#setStatus(9e5e67f3b399fdcc).(UCBottomEdgeHintcxx . . $ UCBottomEdgeHint#::Lockedcxx . . $ UCBottomEdgeHint#Locked.);
304 }
305 if (withMouse) {
306 UCTestExtrascxx . . $ UCTestExtras#::mouseDragcxx . . $ UCTestExtras#mouseDrag(1e4c55a83d406d6a).(bottomEdge, from, delta, Qtcxx . . $ Qt/::LeftButtoncxx . . $ Qt/LeftButton.);
307 } else {
308 UCTestExtrascxx . . $ UCTestExtras#::touchDragcxx . . $ UCTestExtras#touchDrag(88bc2464b742ca51).(0, bottomEdge, from, delta, 8);
309 }
310 if (xfail) {
311 QEXPECT_FAILcxx . . $ `<external>/8602788698586413231/qtestcase.h:195:9`!(0, "failure expected", Continue);
312 }
313 QVERIFYcxx . . $ `<external>/8602788698586413231/qtestcase.h:63:9`!(spy.wait(500));
314 if (xfail) {
315 QCOMPAREcxx . . $ `<external>/8602788698586413231/qtestcase.h:86:9`!(spy.count(), 0);
316 } else {
317 // there must be two state changes here, one Hidden->Revealed, and one Revealed->Hidden
318 QCOMPAREcxx . . $ `<external>/8602788698586413231/qtestcase.h:86:9`!(spy.count(), 2);
319 QListcxx . . $ QList#<QVariantcxx . . $ QVariant#> state1 = spycxx . . $ QList#QList(3d2301cfd89f773a)..atcxx . . $ QList#at(e2681f9bb6b2f357).(0);
320 QCOMPAREcxx . . $ `<external>/8602788698586413231/qtestcase.h:86:9`!(state1[0].value<UCBottomEdge::Status>(), UCBottomEdge::Revealed);
321 QListcxx . . $ QList#<QVariantcxx . . $ QVariant#> state2 = spycxx . . $ QList#QList(3d2301cfd89f773a)..atcxx . . $ QList#at(e2681f9bb6b2f357).(1);
322 QCOMPAREcxx . . $ `<external>/8602788698586413231/qtestcase.h:86:9`!(state2[0].value<UCBottomEdge::Status>(), UCBottomEdge::Hidden);
323 }
324 }
325
326 void test_commit_when_onethird_passed_datacxx . . $ tst_BottomEdge#test_commit_when_onethird_passed_data(49f6e7a06ebc5aa8).()
327 {
328 QTestcxx . . $ QTest/::addColumncxx . . $ QTest/addColumn(cfe4d590606f2f46).<bool>("withMouse");
329
330 QTestcxx . . $ QTest/::newRowcxx . . $ QTest/newRow(71534bb7a360de38).("with mouse") <<cxx . . $ `operator<<`(61fb880f51a53ddf). true;
331 QTestcxx . . $ QTest/::newRowcxx . . $ QTest/newRow(71534bb7a360de38).("with touch") <<cxx . . $ `operator<<`(61fb880f51a53ddf). false;
332 }
333 void test_commit_when_onethird_passedcxx . . $ tst_BottomEdge#test_commit_when_onethird_passed(49f6e7a06ebc5aa8).()
334 {
335 QFETCHcxx . . $ `<external>/8602788698586413231/qtestcase.h:201:9`!(bool, withMouse);
336
337 QScopedPointercxx . . $ QScopedPointer#<BottomEdgeTestCasecxx . . $ BottomEdgeTestCase#> testcxx . . $ QScopedPointer#QScopedPointer(6f97683fca3ece44).(new BottomEdgeTestCasecxx . . $ BottomEdgeTestCase#("BottomEdgeInItem.qml"cxx . . $ QString#QString(85c52e162fed56f9).));
338 UCBottomEdgecxx . . $ UCBottomEdge# *bottomEdge = test->cxx . . $ QScopedPointer#`operator->`(34d6acfd341ba7ab).testItemcxx . . $ BottomEdgeTestCase#testItem(801721994f3c45c4).();
339
340 QPointcxx . . $ QPoint# fromcxx . . $ QPoint#QPoint(3e454b8ccf442868).(bottomEdge->widthcxx . . $ QQuickItem#width(21b6c25e127938e2).() / 2.0f, bottomEdge->heightcxx . . $ QQuickItem#height(21b6c25e127938e2).() - 1);
341 // add some extra space for the touch
342 QPointcxx . . $ QPoint# deltacxx . . $ QPoint#QPoint(3e454b8ccf442868).(0, -(bottomEdge->heightcxx . . $ QQuickItem#height(21b6c25e127938e2).() / 3 + UCUnitscxx . . $ UCUnits#::instancecxx . . $ UCUnits#instance(30bb1e7b117091bb).()->gucxx . . $ UCUnits#gu(fbcf3211dfe1bfd1).(6)));
343
344 if (withMouse) {
345 bottomEdge->hintcxx . . $ UCBottomEdge#hint(8de00351da73cb39).()->setStatuscxx . . $ UCBottomEdgeHint#setStatus(9e5e67f3b399fdcc).(UCBottomEdgeHintcxx . . $ UCBottomEdgeHint#::Lockedcxx . . $ UCBottomEdgeHint#Locked.);
346 }
347 // we need to do the swipe in more steps
348 if (withMouse) {
349 UCTestExtrascxx . . $ UCTestExtras#::mouseDragcxx . . $ UCTestExtras#mouseDrag(1e4c55a83d406d6a).(bottomEdge, from, delta, Qtcxx . . $ Qt/::LeftButtoncxx . . $ Qt/LeftButton., Qtcxx . . $ QFlags#QFlags(93d577a3e9528307).::NoModifiercxx . . $ Qt/NoModifier., 20);
350 } else {
351 UCTestExtrascxx . . $ UCTestExtras#::touchDragcxx . . $ UCTestExtras#touchDrag(88bc2464b742ca51).(0, bottomEdge, from, delta, 20);
352 }
353 QTRY_COMPARE_WITH_TIMEOUTcxx . . $ `<external>/8602788698586413231/qtestcase.h:179:9`!(bottomEdge->status(), UCBottomEdge::Committed, 1000);
354 }
355
356 void test_collapse_before_onethird_datacxx . . $ tst_BottomEdge#test_collapse_before_onethird_data(49f6e7a06ebc5aa8).()
357 {
358 QTestcxx . . $ QTest/::addColumncxx . . $ QTest/addColumn(cfe4d590606f2f46).<bool>("withMouse");
359
360 QTestcxx . . $ QTest/::newRowcxx . . $ QTest/newRow(71534bb7a360de38).("with mouse") <<cxx . . $ `operator<<`(61fb880f51a53ddf). true;
361 QTestcxx . . $ QTest/::newRowcxx . . $ QTest/newRow(71534bb7a360de38).("with touch") <<cxx . . $ `operator<<`(61fb880f51a53ddf). false;
362 }
363 void test_collapse_before_onethirdcxx . . $ tst_BottomEdge#test_collapse_before_onethird(49f6e7a06ebc5aa8).()
364 {
365 QFETCHcxx . . $ `<external>/8602788698586413231/qtestcase.h:201:9`!(bool, withMouse);
366
367 QScopedPointercxx . . $ QScopedPointer#<BottomEdgeTestCasecxx . . $ BottomEdgeTestCase#> testcxx . . $ QScopedPointer#QScopedPointer(6f97683fca3ece44).(new BottomEdgeTestCasecxx . . $ BottomEdgeTestCase#("BottomEdgeInItem.qml"cxx . . $ QString#QString(85c52e162fed56f9).));
368 UCBottomEdgecxx . . $ UCBottomEdge# *bottomEdge = test->cxx . . $ QScopedPointer#`operator->`(34d6acfd341ba7ab).testItemcxx . . $ BottomEdgeTestCase#testItem(801721994f3c45c4).();
369
370 QPointcxx . . $ QPoint# fromcxx . . $ QPoint#QPoint(3e454b8ccf442868).(bottomEdge->widthcxx . . $ QQuickItem#width(21b6c25e127938e2).() / 2.0f, bottomEdge->heightcxx . . $ QQuickItem#height(21b6c25e127938e2).() - 1);
371 QPointcxx . . $ QPoint# deltacxx . . $ QPoint#QPoint(3e454b8ccf442868).(0, -(bottomEdge->heightcxx . . $ QQuickItem#height(21b6c25e127938e2).() / 4));
372
373 if (withMouse) {
374 bottomEdge->hintcxx . . $ UCBottomEdge#hint(8de00351da73cb39).()->setStatuscxx . . $ UCBottomEdgeHint#setStatus(9e5e67f3b399fdcc).(UCBottomEdgeHintcxx . . $ UCBottomEdgeHint#::Lockedcxx . . $ UCBottomEdgeHint#Locked.);
375 }
376 // we need to do the swipe in more steps
377 if (withMouse) {
378 UCTestExtrascxx . . $ UCTestExtras#::mouseDragcxx . . $ UCTestExtras#mouseDrag(1e4c55a83d406d6a).(bottomEdge, from, delta, Qtcxx . . $ Qt/::LeftButtoncxx . . $ Qt/LeftButton., Qtcxx . . $ QFlags#QFlags(93d577a3e9528307).::NoModifiercxx . . $ Qt/NoModifier., 20);
379 } else {
380 UCTestExtrascxx . . $ UCTestExtras#::touchDragcxx . . $ UCTestExtras#touchDrag(88bc2464b742ca51).(0, bottomEdge, from, delta, 20);
381 }
382 QTRY_COMPARE_WITH_TIMEOUTcxx . . $ `<external>/8602788698586413231/qtestcase.h:179:9`!(bottomEdge->status(), UCBottomEdge::Hidden, 1000);
383 }
384
385 void test_collapse_when_dragged_downwards_datacxx . . $ tst_BottomEdge#test_collapse_when_dragged_downwards_data(49f6e7a06ebc5aa8).()
386 {
387 // when onethird not passed
388 // when onethird was passed
389 QTestcxx . . $ QTest/::addColumncxx . . $ QTest/addColumn(cfe4d590606f2f46).<bool>("withMouse");
390 QTestcxx . . $ QTest/::addColumncxx . . $ QTest/addColumn(cfe4d590606f2f46).< QListcxx . . $ QList#<QPointcxx . . $ QPoint#> >("moves");
391
392 QListcxx . . $ QList#<QPointcxx . . $ QPoint#> shortPathcxx . . $ QList#QList(ced63f7c635d850d)., longPathcxx . . $ QList#QList(ced63f7c635d850d).;
393 // upwards
394 for (int i = 0; i < 10; i++) {
395 shortPath <<cxx . . $ QList#`operator<<`(309d1580d8f5dc58). QPointcxx . . $ QPoint#QPoint(3e454b8ccf442868).(0, -3);
396 longPath <<cxx . . $ QList#`operator<<`(309d1580d8f5dc58). QPointcxx . . $ QPoint#QPoint(3e454b8ccf442868).(0, -7);
397 }
398 // downwards
399 for (int i = 0; i < 5; i++) {
400 shortPath <<cxx . . $ QList#`operator<<`(309d1580d8f5dc58). QPointcxx . . $ QPoint#QPoint(3e454b8ccf442868).(0, 2);
401 longPath <<cxx . . $ QList#`operator<<`(309d1580d8f5dc58). QPointcxx . . $ QPoint#QPoint(3e454b8ccf442868).(0, 2);
402 }
403
404 QTestcxx . . $ QTest/::newRowcxx . . $ QTest/newRow(71534bb7a360de38).("with mouse, onethird not passed")
405 <<cxx . . $ `operator<<`(61fb880f51a53ddf). true <<cxx . . $ `operator<<`(61fb880f51a53ddf). shortPath;
406 QTestcxx . . $ QTest/::newRowcxx . . $ QTest/newRow(71534bb7a360de38).("with touch, onethird not passed")
407 <<cxx . . $ `operator<<`(61fb880f51a53ddf). false <<cxx . . $ `operator<<`(61fb880f51a53ddf). shortPath;
408 QTestcxx . . $ QTest/::newRowcxx . . $ QTest/newRow(71534bb7a360de38).("with mouse, onethird passed")
409 <<cxx . . $ `operator<<`(61fb880f51a53ddf). true <<cxx . . $ `operator<<`(61fb880f51a53ddf). longPath;
410 QTestcxx . . $ QTest/::newRowcxx . . $ QTest/newRow(71534bb7a360de38).("with touch, onethird passed")
411 <<cxx . . $ `operator<<`(61fb880f51a53ddf). false <<cxx . . $ `operator<<`(61fb880f51a53ddf). longPath;
412 }
413 void test_collapse_when_dragged_downwardscxx . . $ tst_BottomEdge#test_collapse_when_dragged_downwards(49f6e7a06ebc5aa8).()
414 {
415 QFETCHcxx . . $ `<external>/8602788698586413231/qtestcase.h:201:9`!(bool, withMouse);
416 QFETCHcxx . . $ `<external>/8602788698586413231/qtestcase.h:201:9`!(QList<QPoint>, moves);
417
418 QScopedPointercxx . . $ QScopedPointer#<BottomEdgeTestCasecxx . . $ BottomEdgeTestCase#> testcxx . . $ QScopedPointer#QScopedPointer(6f97683fca3ece44).(new BottomEdgeTestCasecxx . . $ BottomEdgeTestCase#("BottomEdgeInItem.qml"cxx . . $ QString#QString(85c52e162fed56f9).));
419 UCBottomEdgecxx . . $ UCBottomEdge# *bottomEdge = test->cxx . . $ QScopedPointer#`operator->`(34d6acfd341ba7ab).testItemcxx . . $ BottomEdgeTestCase#testItem(801721994f3c45c4).();
420 test->cxx . . $ QScopedPointer#`operator->`(34d6acfd341ba7ab).guToPointscxx . . $ BottomEdgeTestCase#guToPoints(6c7a99f76219d013).(moves);
421
422 QPointcxx . . $ QPoint# fromcxx . . $ QPoint#QPoint(3e454b8ccf442868).(bottomEdge->widthcxx . . $ QQuickItem#width(21b6c25e127938e2).() / 2.0f, bottomEdge->heightcxx . . $ QQuickItem#height(21b6c25e127938e2).() - 1);
423 moves.prependcxx . . $ QList#prepend(77d9f17553126ecb).(from);
424
425 if (withMouse) {
426 bottomEdge->hintcxx . . $ UCBottomEdge#hint(8de00351da73cb39).()->setStatuscxx . . $ UCBottomEdgeHint#setStatus(9e5e67f3b399fdcc).(UCBottomEdgeHintcxx . . $ UCBottomEdgeHint#::Lockedcxx . . $ UCBottomEdgeHint#Locked.);
427 }
428 if (withMouse) {
429 UCTestExtrascxx . . $ UCTestExtras#::mouseDragWithPointscxx . . $ UCTestExtras#mouseDragWithPoints(4d71ed39bfd9ca48).(bottomEdge, movescxx . . $ QList#QList(3d2301cfd89f773a)., Qtcxx . . $ Qt/::LeftButtoncxx . . $ Qt/LeftButton.);
430 } else {
431 UCTestExtrascxx . . $ UCTestExtras#::touchDragWithPointscxx . . $ UCTestExtras#touchDragWithPoints(c558b5f0c053b694).(0, bottomEdge, movescxx . . $ QList#QList(3d2301cfd89f773a).);
432 }
433 QTRY_COMPARE_WITH_TIMEOUTcxx . . $ `<external>/8602788698586413231/qtestcase.h:179:9`!(bottomEdge->status(), UCBottomEdge::Hidden, 1000);
434 }
435
436 void test_height_less_than_parentcxx . . $ tst_BottomEdge#test_height_less_than_parent(49f6e7a06ebc5aa8).()
437 {
438 QScopedPointercxx . . $ QScopedPointer#<BottomEdgeTestCasecxx . . $ BottomEdgeTestCase#> testcxx . . $ QScopedPointer#QScopedPointer(6f97683fca3ece44).(new BottomEdgeTestCasecxx . . $ BottomEdgeTestCase#("ShorterBottomEdge.qml"cxx . . $ QString#QString(85c52e162fed56f9).));
439 UCBottomEdgecxx . . $ UCBottomEdge# *bottomEdge = test->cxx . . $ QScopedPointer#`operator->`(34d6acfd341ba7ab).testItemcxx . . $ BottomEdgeTestCase#testItem(801721994f3c45c4).();
440 UCBottomEdgeStylecxx . . $ UCBottomEdgeStyle# *style = UCBottomEdgePrivatecxx . . $ UCBottomEdgePrivate#::getcxx . . $ UCBottomEdgePrivate#get(9a23c5ede8912ed6).(bottomEdge)->bottomPanelcxx . . $ UCBottomEdgePrivate#bottomPanel.;
441 bottomEdge->commitcxx . . $ UCBottomEdge#commit(49f6e7a06ebc5aa8).();
442 QTRY_COMPARE_WITH_TIMEOUTcxx . . $ `<external>/8602788698586413231/qtestcase.h:179:9`!(bottomEdge->status(), UCBottomEdge::Committed, 1000);
443 QCOMPAREcxx . . $ `<external>/8602788698586413231/qtestcase.h:86:9`!(style->m_panel->y(), bottomEdge->y());
444 }
445
446 void test_do_not_overshoot_datacxx . . $ tst_BottomEdge#test_do_not_overshoot_data(49f6e7a06ebc5aa8).()
447 {
448 QTestcxx . . $ QTest/::addColumncxx . . $ QTest/addColumn(cfe4d590606f2f46).<bool>("withMouse");
449
450 QTestcxx . . $ QTest/::newRowcxx . . $ QTest/newRow(71534bb7a360de38).("with touch") <<cxx . . $ `operator<<`(61fb880f51a53ddf). false;
451 QTestcxx . . $ QTest/::newRowcxx . . $ QTest/newRow(71534bb7a360de38).("with mouse") <<cxx . . $ `operator<<`(61fb880f51a53ddf). true;
452 }
453 void test_do_not_overshootcxx . . $ tst_BottomEdge#test_do_not_overshoot(49f6e7a06ebc5aa8).()
454 {
455 QFETCHcxx . . $ `<external>/8602788698586413231/qtestcase.h:201:9`!(bool, withMouse);
456
457 QScopedPointercxx . . $ QScopedPointer#<BottomEdgeTestCasecxx . . $ BottomEdgeTestCase#> testcxx . . $ QScopedPointer#QScopedPointer(6f97683fca3ece44).(new BottomEdgeTestCasecxx . . $ BottomEdgeTestCase#("ShorterBottomEdge.qml"cxx . . $ QString#QString(85c52e162fed56f9).));
458 UCBottomEdgecxx . . $ UCBottomEdge# *bottomEdge = test->cxx . . $ QScopedPointer#`operator->`(34d6acfd341ba7ab).testItemcxx . . $ BottomEdgeTestCase#testItem(801721994f3c45c4).();
459 UCBottomEdgeStylecxx . . $ UCBottomEdgeStyle# *style = UCBottomEdgePrivatecxx . . $ UCBottomEdgePrivate#::getcxx . . $ UCBottomEdgePrivate#get(9a23c5ede8912ed6).(bottomEdge)->bottomPanelcxx . . $ UCBottomEdgePrivate#bottomPanel.;
460
461 QPointcxx . . $ QPoint# fromcxx . . $ QPoint#QPoint(3e454b8ccf442868).(bottomEdge->widthcxx . . $ QQuickItem#width(21b6c25e127938e2).() / 2.0f, bottomEdge->heightcxx . . $ QQuickItem#height(21b6c25e127938e2).() - 1);
462 QPointcxx . . $ QPoint# to = from +cxx . . $ operator+(e1fd31f94663a124). QPointcxx . . $ QPoint#QPoint(3e454b8ccf442868).(0, -(bottomEdge->parentItemcxx . . $ QQuickItem#parentItem(e7eee0192cff5fb0).()->heightcxx . . $ QQuickItem#height(21b6c25e127938e2).() - 1));
463
464 if (withMouse) {
465 bottomEdge->hintcxx . . $ UCBottomEdge#hint(8de00351da73cb39).()->setStatuscxx . . $ UCBottomEdgeHint#setStatus(9e5e67f3b399fdcc).(UCBottomEdgeHintcxx . . $ UCBottomEdgeHint#::Lockedcxx . . $ UCBottomEdgeHint#Locked.);
466 from =cxx . . $ QPoint#`operator=`(2950c70ea382b4e5). bottomEdge->mapToScenecxx . . $ QQuickItem#mapToScene(d99487573c8c6d6c).(fromcxx . . $ QPointF#QPointF(4f9e9534be445c03).).toPointcxx . . $ QPointF#toPoint(75d69cfbd3c4b2dd).();
467 to =cxx . . $ QPoint#`operator=`(2950c70ea382b4e5). bottomEdge->mapToScenecxx . . $ QQuickItem#mapToScene(d99487573c8c6d6c).(tocxx . . $ QPointF#QPointF(4f9e9534be445c03).).toPointcxx . . $ QPointF#toPoint(75d69cfbd3c4b2dd).();
468 QTestcxx . . $ QTest/::mousePresscxx . . $ QTest/mousePress(6597b0dc46846b01).(bottomEdge->windowcxx . . $ QQuickItem#window(7226278ce62b172a).(), Qtcxx . . $ Qt/::LeftButtoncxx . . $ Qt/LeftButton., Qtcxx . . $ QFlags#QFlags(93d577a3e9528307).::NoModifiercxx . . $ Qt/NoModifier., from, 20);
469 QPointcxx . . $ QPoint# movePos(from);
470 while (movePos.ycxx . . $ QPoint#y(455f465bc33b4cdf).() > to.ycxx . . $ QPoint#y(455f465bc33b4cdf).()) {
471 QTestcxx . . $ QTest/::mouseMovecxx . . $ QTest/mouseMove(4e5a021139bdcb14).(bottomEdge->windowcxx . . $ QQuickItem#window(7226278ce62b172a).(), movePos, 20);
472 movePos +=cxx . . $ QPoint#`operator+=`(838c0f16ae3b9ee0). QPointcxx . . $ QPoint#QPoint(3e454b8ccf442868).(0, -10);
473 QVERIFYcxx . . $ `<external>/8602788698586413231/qtestcase.h:63:9`!(style->m_panel->y() >= bottomEdge->y());
474 }
475 QTestcxx . . $ QTest/::mouseReleasecxx . . $ QTest/mouseRelease(6597b0dc46846b01).(bottomEdge->windowcxx . . $ QQuickItem#window(7226278ce62b172a).(), Qtcxx . . $ Qt/::LeftButtoncxx . . $ Qt/LeftButton., Qtcxx . . $ QFlags#QFlags(93d577a3e9528307).::NoModifiercxx . . $ Qt/NoModifier., movePos, 20);
476 } else {
477 UCTestExtrascxx . . $ UCTestExtras#::touchPresscxx . . $ UCTestExtras#touchPress(f997a3282644e7b9).(0, bottomEdge, from);
478 QPointcxx . . $ QPoint# movePos(from);
479 while (movePos.ycxx . . $ QPoint#y(455f465bc33b4cdf).() > to.ycxx . . $ QPoint#y(455f465bc33b4cdf).()) {
480 QTestcxx . . $ QTest/::qWaitcxx . . $ QTest/qWait(d4f767463ce0a6b3).(20);
481 UCTestExtrascxx . . $ UCTestExtras#::touchMovecxx . . $ UCTestExtras#touchMove(f997a3282644e7b9).(0, bottomEdge, movePos);
482 movePos +=cxx . . $ QPoint#`operator+=`(838c0f16ae3b9ee0). QPointcxx . . $ QPoint#QPoint(3e454b8ccf442868).(0, -10);
483 QVERIFYcxx . . $ `<external>/8602788698586413231/qtestcase.h:63:9`!(style->m_panel->y() >= bottomEdge->y());
484 }
485 QTestcxx . . $ QTest/::qWaitcxx . . $ QTest/qWait(d4f767463ce0a6b3).(20);
486 UCTestExtrascxx . . $ UCTestExtras#::touchReleasecxx . . $ UCTestExtras#touchRelease(f997a3282644e7b9).(0, bottomEdge, movePos);
487 }
488 }
489
490 void test_commitStarted_commitCompleted_emittedcxx . . $ tst_BottomEdge#test_commitStarted_commitCompleted_emitted(49f6e7a06ebc5aa8).()
491 {
492 QScopedPointercxx . . $ QScopedPointer#<BottomEdgeTestCasecxx . . $ BottomEdgeTestCase#> testcxx . . $ QScopedPointer#QScopedPointer(6f97683fca3ece44).(new BottomEdgeTestCasecxx . . $ BottomEdgeTestCase#("BottomEdgeInItem.qml"cxx . . $ QString#QString(85c52e162fed56f9).));
493 UCBottomEdgecxx . . $ UCBottomEdge# *bottomEdge = test->cxx . . $ QScopedPointer#`operator->`(34d6acfd341ba7ab).testItemcxx . . $ BottomEdgeTestCase#testItem(801721994f3c45c4).();
494
495 QSignalSpycxx . . $ QSignalSpy# commitStartedSpycxx . . $ QSignalSpy#QSignalSpy(593025bf41bda872).(bottomEdge, SIGNALcxx . . $ `<external>/1208926524888476972/qobjectdefs.h:271:10`!(commitStarted()));
496 QSignalSpycxx . . $ QSignalSpy# commitCompletedSpycxx . . $ QSignalSpy#QSignalSpy(593025bf41bda872).(bottomEdge, SIGNALcxx . . $ `<external>/1208926524888476972/qobjectdefs.h:271:10`!(commitCompleted()));
497 bottomEdge->commitcxx . . $ UCBottomEdge#commit(49f6e7a06ebc5aa8).();
498 QTRY_COMPARE_WITH_TIMEOUTcxx . . $ `<external>/8602788698586413231/qtestcase.h:179:9`!(commitStartedSpy.count(), 1, 1000);
499 QTRY_COMPARE_WITH_TIMEOUTcxx . . $ `<external>/8602788698586413231/qtestcase.h:179:9`!(commitCompletedSpy.count(), 1, 1000);
500 }
501
502 void test_collapseStarted_collapseCompleted_emittedcxx . . $ tst_BottomEdge#test_collapseStarted_collapseCompleted_emitted(49f6e7a06ebc5aa8).()
503 {
504 QScopedPointercxx . . $ QScopedPointer#<BottomEdgeTestCasecxx . . $ BottomEdgeTestCase#> testcxx . . $ QScopedPointer#QScopedPointer(6f97683fca3ece44).(new BottomEdgeTestCasecxx . . $ BottomEdgeTestCase#("BottomEdgeInItem.qml"cxx . . $ QString#QString(85c52e162fed56f9).));
505 UCBottomEdgecxx . . $ UCBottomEdge# *bottomEdge = test->cxx . . $ QScopedPointer#`operator->`(34d6acfd341ba7ab).testItemcxx . . $ BottomEdgeTestCase#testItem(801721994f3c45c4).();
506 bottomEdge->commitcxx . . $ UCBottomEdge#commit(49f6e7a06ebc5aa8).();
507 QTRY_COMPARE_WITH_TIMEOUTcxx . . $ `<external>/8602788698586413231/qtestcase.h:179:9`!(bottomEdge->status(), UCBottomEdge::Committed, 1000);
508 // wait few milliseconds before we initiate collapse
509 QTestcxx . . $ QTest/::qWaitcxx . . $ QTest/qWait(d4f767463ce0a6b3).(200);
510
511 QSignalSpycxx . . $ QSignalSpy# collapseStartedSpycxx . . $ QSignalSpy#QSignalSpy(593025bf41bda872).(bottomEdge, SIGNALcxx . . $ `<external>/1208926524888476972/qobjectdefs.h:271:10`!(collapseStarted()));
512 QSignalSpycxx . . $ QSignalSpy# collapseCompletedSpycxx . . $ QSignalSpy#QSignalSpy(593025bf41bda872).(bottomEdge, SIGNALcxx . . $ `<external>/1208926524888476972/qobjectdefs.h:271:10`!(collapseCompleted()));
513 bottomEdge->collapsecxx . . $ UCBottomEdge#collapse(49f6e7a06ebc5aa8).();
514 QTRY_COMPARE_WITH_TIMEOUTcxx . . $ `<external>/8602788698586413231/qtestcase.h:179:9`!(collapseStartedSpy.count(), 1, 1000);
515 QTRY_COMPARE_WITH_TIMEOUTcxx . . $ `<external>/8602788698586413231/qtestcase.h:179:9`!(collapseCompletedSpy.count(), 1, 1000);
516 }
517
518 void test_collapse_during_commitcxx . . $ tst_BottomEdge#test_collapse_during_commit(49f6e7a06ebc5aa8).()
519 {
520 QScopedPointercxx . . $ QScopedPointer#<BottomEdgeTestCasecxx . . $ BottomEdgeTestCase#> testcxx . . $ QScopedPointer#QScopedPointer(6f97683fca3ece44).(new BottomEdgeTestCasecxx . . $ BottomEdgeTestCase#("BottomEdgeInItem.qml"cxx . . $ QString#QString(85c52e162fed56f9).));
521 UCBottomEdgecxx . . $ UCBottomEdge# *bottomEdge = test->cxx . . $ QScopedPointer#`operator->`(34d6acfd341ba7ab).testItemcxx . . $ BottomEdgeTestCase#testItem(801721994f3c45c4).();
522
523 QSignalSpycxx . . $ QSignalSpy# commitStartedSpycxx . . $ QSignalSpy#QSignalSpy(593025bf41bda872).(bottomEdge, SIGNALcxx . . $ `<external>/1208926524888476972/qobjectdefs.h:271:10`!(commitStarted()));
524 QSignalSpycxx . . $ QSignalSpy# commitCompletedSpycxx . . $ QSignalSpy#QSignalSpy(593025bf41bda872).(bottomEdge, SIGNALcxx . . $ `<external>/1208926524888476972/qobjectdefs.h:271:10`!(commitCompleted()));
525 QSignalSpycxx . . $ QSignalSpy# collapseStartedSpycxx . . $ QSignalSpy#QSignalSpy(593025bf41bda872).(bottomEdge, SIGNALcxx . . $ `<external>/1208926524888476972/qobjectdefs.h:271:10`!(collapseStarted()));
526 QSignalSpycxx . . $ QSignalSpy# collapseCompletedSpycxx . . $ QSignalSpy#QSignalSpy(593025bf41bda872).(bottomEdge, SIGNALcxx . . $ `<external>/1208926524888476972/qobjectdefs.h:271:10`!(collapseCompleted()));
527
528 connectcxx . . $ QObject#connect(158df1d9a01a3410).(bottomEdge, SIGNALcxx . . $ `<external>/1208926524888476972/qobjectdefs.h:271:10`!(commitStarted()), bottomEdge, SLOTcxx . . $ `<external>/1208926524888476972/qobjectdefs.h:270:10`!(collapse()), Qtcxx . . $ Qt/::QueuedConnectioncxx . . $ Qt/QueuedConnection.);
529
530 bottomEdge->commitcxx . . $ UCBottomEdge#commit(49f6e7a06ebc5aa8).();
531
532 QTRY_COMPARE_WITH_TIMEOUTcxx . . $ `<external>/8602788698586413231/qtestcase.h:179:9`!(commitStartedSpy.count(), 1, 1000);
533 QTRY_COMPARE_WITH_TIMEOUTcxx . . $ `<external>/8602788698586413231/qtestcase.h:179:9`!(commitCompletedSpy.count(), 0, 1000);
534 QTRY_COMPARE_WITH_TIMEOUTcxx . . $ `<external>/8602788698586413231/qtestcase.h:179:9`!(collapseStartedSpy.count(), 1, 1000);
535 QTRY_COMPARE_WITH_TIMEOUTcxx . . $ `<external>/8602788698586413231/qtestcase.h:179:9`!(collapseCompletedSpy.count(), 1, 1000);
536 }
537
538 void test_commit_during_collapsecxx . . $ tst_BottomEdge#test_commit_during_collapse(49f6e7a06ebc5aa8).()
539 {
540 QScopedPointercxx . . $ QScopedPointer#<BottomEdgeTestCasecxx . . $ BottomEdgeTestCase#> testcxx . . $ QScopedPointer#QScopedPointer(6f97683fca3ece44).(new BottomEdgeTestCasecxx . . $ BottomEdgeTestCase#("BottomEdgeInItem.qml"cxx . . $ QString#QString(85c52e162fed56f9).));
541 UCBottomEdgecxx . . $ UCBottomEdge# *bottomEdge = test->cxx . . $ QScopedPointer#`operator->`(34d6acfd341ba7ab).testItemcxx . . $ BottomEdgeTestCase#testItem(801721994f3c45c4).();
542 bottomEdge->commitcxx . . $ UCBottomEdge#commit(49f6e7a06ebc5aa8).();
543
544 QSignalSpycxx . . $ QSignalSpy# commitStartedSpycxx . . $ QSignalSpy#QSignalSpy(593025bf41bda872).(bottomEdge, SIGNALcxx . . $ `<external>/1208926524888476972/qobjectdefs.h:271:10`!(commitStarted()));
545 QSignalSpycxx . . $ QSignalSpy# commitCompletedSpycxx . . $ QSignalSpy#QSignalSpy(593025bf41bda872).(bottomEdge, SIGNALcxx . . $ `<external>/1208926524888476972/qobjectdefs.h:271:10`!(commitCompleted()));
546 QSignalSpycxx . . $ QSignalSpy# collapseStartedSpycxx . . $ QSignalSpy#QSignalSpy(593025bf41bda872).(bottomEdge, SIGNALcxx . . $ `<external>/1208926524888476972/qobjectdefs.h:271:10`!(collapseStarted()));
547 QSignalSpycxx . . $ QSignalSpy# collapseCompletedSpycxx . . $ QSignalSpy#QSignalSpy(593025bf41bda872).(bottomEdge, SIGNALcxx . . $ `<external>/1208926524888476972/qobjectdefs.h:271:10`!(collapseCompleted()));
548
549 connectcxx . . $ QObject#connect(158df1d9a01a3410).(bottomEdge, SIGNALcxx . . $ `<external>/1208926524888476972/qobjectdefs.h:271:10`!(collapseStarted()), bottomEdge, SLOTcxx . . $ `<external>/1208926524888476972/qobjectdefs.h:270:10`!(commit()), Qtcxx . . $ Qt/::QueuedConnectioncxx . . $ Qt/QueuedConnection.);
550
551 bottomEdge->collapsecxx . . $ UCBottomEdge#collapse(49f6e7a06ebc5aa8).();
552 QTRY_COMPARE_WITH_TIMEOUTcxx . . $ `<external>/8602788698586413231/qtestcase.h:179:9`!(collapseStartedSpy.count(), 1, 1000);
553 QTRY_COMPARE_WITH_TIMEOUTcxx . . $ `<external>/8602788698586413231/qtestcase.h:179:9`!(collapseCompletedSpy.count(), 0, 1000);
554 QTRY_COMPARE_WITH_TIMEOUTcxx . . $ `<external>/8602788698586413231/qtestcase.h:179:9`!(commitStartedSpy.count(), 1, 1000);
555 QTRY_COMPARE_WITH_TIMEOUTcxx . . $ `<external>/8602788698586413231/qtestcase.h:179:9`!(commitCompletedSpy.count(), 1, 1000);
556 }
557
558 // region tests
559
560 void test_region_operations_datacxx . . $ tst_BottomEdge#test_region_operations_data(49f6e7a06ebc5aa8).()
561 {
562 QTestcxx . . $ QTest/::addColumncxx . . $ QTest/addColumn(cfe4d590606f2f46).<QStringcxx . . $ QString#>("document");
563 QTestcxx . . $ QTest/::addColumncxx . . $ QTest/addColumn(cfe4d590606f2f46).<QStringcxx . . $ QString#>("warning");
564 QTestcxx . . $ QTest/::addColumncxx . . $ QTest/addColumn(cfe4d590606f2f46).<qrealcxx . . $ qreal#>("xFrom");
565 QTestcxx . . $ QTest/::addColumncxx . . $ QTest/addColumn(cfe4d590606f2f46).<qrealcxx . . $ qreal#>("xTo");
566 QTestcxx . . $ QTest/::addColumncxx . . $ QTest/addColumn(cfe4d590606f2f46).<QStringcxx . . $ QString#>("xName");
567
568 QTestcxx . . $ QTest/::newRowcxx . . $ QTest/newRow(71534bb7a360de38).("add through regions property")
569 <<cxx . . $ `operator<<`(1c43a92f59c6a770). "AddCustomRegionUsingRegionsProperty.qml"
570 <<cxx . . $ `operator<<`(61fb880f51a53ddf). QStringcxx . . $ QString#QString(ced63f7c635d850d).()
571 <<cxx . . $ `operator<<`(61fb880f51a53ddf). 0.0 <<cxx . . $ `operator<<`(61fb880f51a53ddf). 1.0 <<cxx . . $ `operator<<`(61fb880f51a53ddf). QStringcxx . . $ QString#QString(85c52e162fed56f9).("customRegion");
572 QTestcxx . . $ QTest/::newRowcxx . . $ QTest/newRow(71534bb7a360de38).("add through data property")
573 <<cxx . . $ `operator<<`(1c43a92f59c6a770). "AddCustomRegionUsingDataProperty.qml"
574 <<cxx . . $ `operator<<`(61fb880f51a53ddf). QStringcxx . . $ QString#QString(ced63f7c635d850d).()
575 <<cxx . . $ `operator<<`(61fb880f51a53ddf). 0.0 <<cxx . . $ `operator<<`(61fb880f51a53ddf). 1.0 <<cxx . . $ `operator<<`(61fb880f51a53ddf). QStringcxx . . $ QString#QString(85c52e162fed56f9).("customRegion");
576 QTestcxx . . $ QTest/::newRowcxx . . $ QTest/newRow(71534bb7a360de38).("add through Component.onCompleted")
577 <<cxx . . $ `operator<<`(1c43a92f59c6a770). "AddCustomRegionOnCompleted.qml"
578 <<cxx . . $ `operator<<`(61fb880f51a53ddf). QStringcxx . . $ QString#QString(ced63f7c635d850d).()
579 <<cxx . . $ `operator<<`(61fb880f51a53ddf). 0.0 <<cxx . . $ `operator<<`(61fb880f51a53ddf). 1.0 <<cxx . . $ `operator<<`(61fb880f51a53ddf). QStringcxx . . $ QString#QString(85c52e162fed56f9).("customRegion");
580 QTestcxx . . $ QTest/::newRowcxx . . $ QTest/newRow(71534bb7a360de38).("add owned by other BottomEdge")
581 <<cxx . . $ `operator<<`(1c43a92f59c6a770). "AddCustomRegionOwnedByOtherBottomEdge.qml"
582 <<cxx . . $ `operator<<`(1c43a92f59c6a770). "QML BottomEdge: Cannot reuse region owned by other BottomEdge components"
583 // we should have the default region still
584 <<cxx . . $ `operator<<`(61fb880f51a53ddf). 0.0 <<cxx . . $ `operator<<`(61fb880f51a53ddf). 1.0 <<cxx . . $ `operator<<`(1c43a92f59c6a770). "default_BottomEdgeRegion";
585 QTestcxx . . $ QTest/::newRowcxx . . $ QTest/newRow(71534bb7a360de38).("clear")
586 <<cxx . . $ `operator<<`(1c43a92f59c6a770). "ClearCustomRegions.qml"
587 <<cxx . . $ `operator<<`(61fb880f51a53ddf). QStringcxx . . $ QString#QString(ced63f7c635d850d).()
588 // we should have the default region back
589 <<cxx . . $ `operator<<`(61fb880f51a53ddf). 0.0 <<cxx . . $ `operator<<`(61fb880f51a53ddf). 1.0 <<cxx . . $ `operator<<`(1c43a92f59c6a770). "default_BottomEdgeRegion";
590 }
591
592 void test_region_operationscxx . . $ tst_BottomEdge#test_region_operations(49f6e7a06ebc5aa8).()
593 {
594 QFETCHcxx . . $ `<external>/8602788698586413231/qtestcase.h:201:9`!(QString, document);
595 QFETCHcxx . . $ `<external>/8602788698586413231/qtestcase.h:201:9`!(QString, warning);
596 QFETCHcxx . . $ `<external>/8602788698586413231/qtestcase.h:201:9`!(qreal, xFrom);
597 QFETCHcxx . . $ `<external>/8602788698586413231/qtestcase.h:201:9`!(qreal, xTo);
598 QFETCHcxx . . $ `<external>/8602788698586413231/qtestcase.h:201:9`!(QString, xName);
599
600 if (!warning.isEmptycxx . . $ QString#isEmpty(50ce9a9e25b4a850).()) {
601 LomiriTestCasecxx . . $ LomiriTestCase#::ignoreWarningcxx . . $ LomiriTestCase#ignoreWarning(b4044705ef85da45).(document, 26, 5, warning, 1);
602 }
603 QScopedPointercxx . . $ QScopedPointer#<BottomEdgeTestCasecxx . . $ BottomEdgeTestCase#> testcxx . . $ QScopedPointer#QScopedPointer(6f97683fca3ece44).(new BottomEdgeTestCasecxx . . $ BottomEdgeTestCase#(document));
604 UCBottomEdgecxx . . $ UCBottomEdge# *bottomEdge = test->cxx . . $ QScopedPointer#`operator->`(34d6acfd341ba7ab).testItemcxx . . $ BottomEdgeTestCase#testItem(801721994f3c45c4).();
605 UCBottomEdgePrivatecxx . . $ UCBottomEdgePrivate# *privateBottomEdge = UCBottomEdgePrivatecxx . . $ UCBottomEdgePrivate#::getcxx . . $ UCBottomEdgePrivate#get(9a23c5ede8912ed6).(bottomEdge);
606
607 // the regions has the custom one
608 QCOMPAREcxx . . $ `<external>/8602788698586413231/qtestcase.h:86:9`!(privateBottomEdge->regions.size(), 1);
609 UCBottomEdgeRegioncxx . . $ UCBottomEdgeRegion# *region = privateBottomEdge->regionscxx . . $ UCBottomEdgePrivate#regions.[cxx . . $ QList#`operator[]`(7a0ef1c7079e8533).0];
610 QVERIFYcxx . . $ `<external>/8602788698586413231/qtestcase.h:63:9`!(region);
611 QCOMPAREcxx . . $ `<external>/8602788698586413231/qtestcase.h:86:9`!(UCBottomEdgeRegionPrivate::get(region)->from, xFrom);
612 QCOMPAREcxx . . $ `<external>/8602788698586413231/qtestcase.h:86:9`!(UCBottomEdgeRegionPrivate::get(region)->to, xTo);
613 QCOMPAREcxx . . $ `<external>/8602788698586413231/qtestcase.h:86:9`!(region->objectName(), xName);
614 }
615
616 void test_active_region_changescxx . . $ tst_BottomEdge#test_active_region_changes(49f6e7a06ebc5aa8).()
617 {
618 QScopedPointercxx . . $ QScopedPointer#<BottomEdgeTestCasecxx . . $ BottomEdgeTestCase#> testcxx . . $ QScopedPointer#QScopedPointer(6f97683fca3ece44).(new BottomEdgeTestCasecxx . . $ BottomEdgeTestCase#("LeanActiveRegionChange.qml"cxx . . $ QString#QString(85c52e162fed56f9).));
619 UCBottomEdgecxx . . $ UCBottomEdge# *bottomEdge = test->cxx . . $ QScopedPointer#`operator->`(34d6acfd341ba7ab).testItemcxx . . $ BottomEdgeTestCase#testItem(801721994f3c45c4).();
620
621 QPointcxx . . $ QPoint# fromcxx . . $ QPoint#QPoint(3e454b8ccf442868).(bottomEdge->widthcxx . . $ QQuickItem#width(21b6c25e127938e2).() / 2.0f, bottomEdge->heightcxx . . $ QQuickItem#height(21b6c25e127938e2).() - 5);
622 QPointcxx . . $ QPoint# to = from +cxx . . $ operator+(e1fd31f94663a124). QPointcxx . . $ QPoint#QPoint(3e454b8ccf442868).(0, -(bottomEdge->parentItemcxx . . $ QQuickItem#parentItem(e7eee0192cff5fb0).()->heightcxx . . $ QQuickItem#height(21b6c25e127938e2).() - 1));
623 QSignalSpycxx . . $ QSignalSpy# spycxx . . $ QSignalSpy#QSignalSpy(a79b3c88ff1c9981).(bottomEdge, &UCBottomEdgecxx . . $ UCBottomEdge#::activeRegionChangedcxx . . $ UCBottomEdge#activeRegionChanged(68594c0fd6b7508a).);
624
625 UCTestExtrascxx . . $ UCTestExtras#::touchPresscxx . . $ UCTestExtras#touchPress(f997a3282644e7b9).(0, bottomEdge, from);
626 QPointcxx . . $ QPoint# movePos(from);
627 while (movePos.ycxx . . $ QPoint#y(455f465bc33b4cdf).() > to.ycxx . . $ QPoint#y(455f465bc33b4cdf).()) {
628 QTestcxx . . $ QTest/::qWaitcxx . . $ QTest/qWait(d4f767463ce0a6b3).(20);
629 UCTestExtrascxx . . $ UCTestExtras#::touchMovecxx . . $ UCTestExtras#touchMove(f997a3282644e7b9).(0, bottomEdge, movePos);
630 movePos +=cxx . . $ QPoint#`operator+=`(838c0f16ae3b9ee0). QPointcxx . . $ QPoint#QPoint(3e454b8ccf442868).(0, -10);
631 }
632 QTestcxx . . $ QTest/::qWaitcxx . . $ QTest/qWait(d4f767463ce0a6b3).(20);
633 UCTestExtrascxx . . $ UCTestExtras#::touchReleasecxx . . $ UCTestExtras#touchRelease(f997a3282644e7b9).(0, bottomEdge, movePos);
634 // we should have had 4 active region changes by now
635 // null -> defaultRegion -> region #0 -> region #1 -> defaultRegion
636 QCOMPAREcxx . . $ `<external>/8602788698586413231/qtestcase.h:86:9`!(spy.count(), 4);
637 }
638
639 void test_region_signals_emitted_datacxx . . $ tst_BottomEdge#test_region_signals_emitted_data(49f6e7a06ebc5aa8).()
640 {
641 QTestcxx . . $ QTest/::addColumncxx . . $ QTest/addColumn(cfe4d590606f2f46).<bool>("withMouse");
642
643 QTestcxx . . $ QTest/::newRowcxx . . $ QTest/newRow(71534bb7a360de38).("with mouse") <<cxx . . $ `operator<<`(61fb880f51a53ddf). true;
644 QTestcxx . . $ QTest/::newRowcxx . . $ QTest/newRow(71534bb7a360de38).("with touch") <<cxx . . $ `operator<<`(61fb880f51a53ddf). false;
645 }
646 void test_region_signals_emittedcxx . . $ tst_BottomEdge#test_region_signals_emitted(49f6e7a06ebc5aa8).()
647 {
648 QFETCHcxx . . $ `<external>/8602788698586413231/qtestcase.h:201:9`!(bool, withMouse);
649
650 QScopedPointercxx . . $ QScopedPointer#<BottomEdgeTestCasecxx . . $ BottomEdgeTestCase#> testcxx . . $ QScopedPointer#QScopedPointer(6f97683fca3ece44).(new BottomEdgeTestCasecxx . . $ BottomEdgeTestCase#("BottomEdgeInItem.qml"cxx . . $ QString#QString(85c52e162fed56f9).));
651 UCBottomEdgecxx . . $ UCBottomEdge# *bottomEdge = test->cxx . . $ QScopedPointer#`operator->`(34d6acfd341ba7ab).testItemcxx . . $ BottomEdgeTestCase#testItem(801721994f3c45c4).();
652 UCBottomEdgePrivatecxx . . $ UCBottomEdgePrivate# *privateBottomEdge = UCBottomEdgePrivatecxx . . $ UCBottomEdgePrivate#::getcxx . . $ UCBottomEdgePrivate#get(9a23c5ede8912ed6).(bottomEdge);
653 UCBottomEdgeRegioncxx . . $ UCBottomEdgeRegion# *region = privateBottomEdge->regionscxx . . $ UCBottomEdgePrivate#regions.[cxx . . $ QList#`operator[]`(7a0ef1c7079e8533).0];
654
655 // change the region so we can get the signals while dragged
656 UCBottomEdgeRegionPrivatecxx . . $ UCBottomEdgeRegionPrivate#::getcxx . . $ UCBottomEdgeRegionPrivate#get(cef217ac64f6a4af).(region)->fromcxx . . $ UCBottomEdgeRegionPrivate#from. = 0.1;
657 UCBottomEdgeRegionPrivatecxx . . $ UCBottomEdgeRegionPrivate#::getcxx . . $ UCBottomEdgeRegionPrivate#get(cef217ac64f6a4af).(region)->tocxx . . $ UCBottomEdgeRegionPrivate#to. = 0.2;
658
659 QPointcxx . . $ QPoint# fromcxx . . $ QPoint#QPoint(3e454b8ccf442868).(bottomEdge->widthcxx . . $ QQuickItem#width(21b6c25e127938e2).() / 2.0f, bottomEdge->heightcxx . . $ QQuickItem#height(21b6c25e127938e2).() - 5);
660 QPointcxx . . $ QPoint# deltacxx . . $ QPoint#QPoint(3e454b8ccf442868).(0, -(bottomEdge->heightcxx . . $ QQuickItem#height(21b6c25e127938e2).() / 3 + UCUnitscxx . . $ UCUnits#::instancecxx . . $ UCUnits#instance(30bb1e7b117091bb).()->gucxx . . $ UCUnits#gu(fbcf3211dfe1bfd1).(6)));
661 QSignalSpycxx . . $ QSignalSpy# enteredcxx . . $ QSignalSpy#QSignalSpy(593025bf41bda872).(region, SIGNALcxx . . $ `<external>/1208926524888476972/qobjectdefs.h:271:10`!(entered()));
662 QSignalSpycxx . . $ QSignalSpy# exitedcxx . . $ QSignalSpy#QSignalSpy(593025bf41bda872).(region, SIGNALcxx . . $ `<external>/1208926524888476972/qobjectdefs.h:271:10`!(exited()));
663
664 if (withMouse) {
665 bottomEdge->hintcxx . . $ UCBottomEdge#hint(8de00351da73cb39).()->setStatuscxx . . $ UCBottomEdgeHint#setStatus(9e5e67f3b399fdcc).(UCBottomEdgeHintcxx . . $ UCBottomEdgeHint#::Lockedcxx . . $ UCBottomEdgeHint#Locked.);
666 }
667 if (withMouse) {
668 UCTestExtrascxx . . $ UCTestExtras#::mouseDragcxx . . $ UCTestExtras#mouseDrag(1e4c55a83d406d6a).(bottomEdge, from, delta, Qtcxx . . $ Qt/::LeftButtoncxx . . $ Qt/LeftButton., Qtcxx . . $ QFlags#QFlags(93d577a3e9528307).::NoModifiercxx . . $ Qt/NoModifier.);
669 } else {
670 UCTestExtrascxx . . $ UCTestExtras#::touchDragcxx . . $ UCTestExtras#touchDrag(88bc2464b742ca51).(0, bottomEdge, from, delta);
671 }
672 QTRY_COMPARE_WITH_TIMEOUTcxx . . $ `<external>/8602788698586413231/qtestcase.h:179:9`!(entered.count(), 1, 500);
673 // exit should not be emitted as the region is not left when committed
674 QTRY_COMPARE_WITH_TIMEOUTcxx . . $ `<external>/8602788698586413231/qtestcase.h:179:9`!(exited.count(), 0, 500);
675 }
676
677 void test_region_dragEnded_emitted_datacxx . . $ tst_BottomEdge#test_region_dragEnded_emitted_data(49f6e7a06ebc5aa8).()
678 {
679 QTestcxx . . $ QTest/::addColumncxx . . $ QTest/addColumn(cfe4d590606f2f46).<bool>("withMouse");
680
681 QTestcxx . . $ QTest/::newRowcxx . . $ QTest/newRow(71534bb7a360de38).("with mouse") <<cxx . . $ `operator<<`(61fb880f51a53ddf). true;
682 QTestcxx . . $ QTest/::newRowcxx . . $ QTest/newRow(71534bb7a360de38).("with touch") <<cxx . . $ `operator<<`(61fb880f51a53ddf). false;
683 }
684 void test_region_dragEnded_emittedcxx . . $ tst_BottomEdge#test_region_dragEnded_emitted(49f6e7a06ebc5aa8).()
685 {
686 QFETCHcxx . . $ `<external>/8602788698586413231/qtestcase.h:201:9`!(bool, withMouse);
687
688 QScopedPointercxx . . $ QScopedPointer#<BottomEdgeTestCasecxx . . $ BottomEdgeTestCase#> testcxx . . $ QScopedPointer#QScopedPointer(6f97683fca3ece44).(new BottomEdgeTestCasecxx . . $ BottomEdgeTestCase#("BottomEdgeInItem.qml"cxx . . $ QString#QString(85c52e162fed56f9).));
689 UCBottomEdgecxx . . $ UCBottomEdge# *bottomEdge = test->cxx . . $ QScopedPointer#`operator->`(34d6acfd341ba7ab).testItemcxx . . $ BottomEdgeTestCase#testItem(801721994f3c45c4).();
690 UCBottomEdgePrivatecxx . . $ UCBottomEdgePrivate# *privateBottomEdge = UCBottomEdgePrivatecxx . . $ UCBottomEdgePrivate#::getcxx . . $ UCBottomEdgePrivate#get(9a23c5ede8912ed6).(bottomEdge);
691 UCBottomEdgeRegioncxx . . $ UCBottomEdgeRegion# *region = privateBottomEdge->regionscxx . . $ UCBottomEdgePrivate#regions.[cxx . . $ QList#`operator[]`(7a0ef1c7079e8533).0];
692
693 QSignalSpycxx . . $ QSignalSpy# dragEndedcxx . . $ QSignalSpy#QSignalSpy(593025bf41bda872).(region, SIGNALcxx . . $ `<external>/1208926524888476972/qobjectdefs.h:271:10`!(dragEnded()));
694 QPointcxx . . $ QPoint# fromcxx . . $ QPoint#QPoint(3e454b8ccf442868).(bottomEdge->widthcxx . . $ QQuickItem#width(21b6c25e127938e2).() / 2.0f, bottomEdge->heightcxx . . $ QQuickItem#height(21b6c25e127938e2).() - 5);
695 QPointcxx . . $ QPoint# deltacxx . . $ QPoint#QPoint(3e454b8ccf442868).(0, -(bottomEdge->heightcxx . . $ QQuickItem#height(21b6c25e127938e2).() / 2.0f));
696 if (withMouse) {
697 bottomEdge->hintcxx . . $ UCBottomEdge#hint(8de00351da73cb39).()->setStatuscxx . . $ UCBottomEdgeHint#setStatus(9e5e67f3b399fdcc).(UCBottomEdgeHintcxx . . $ UCBottomEdgeHint#::Lockedcxx . . $ UCBottomEdgeHint#Locked.);
698 UCTestExtrascxx . . $ UCTestExtras#::mouseDragcxx . . $ UCTestExtras#mouseDrag(1e4c55a83d406d6a).(bottomEdge, from, delta, Qtcxx . . $ Qt/::LeftButtoncxx . . $ Qt/LeftButton., Qtcxx . . $ QFlags#QFlags(93d577a3e9528307).::NoModifiercxx . . $ Qt/NoModifier.);
699 } else {
700 UCTestExtrascxx . . $ UCTestExtras#::touchDragcxx . . $ UCTestExtras#touchDrag(88bc2464b742ca51).(0, bottomEdge, from, delta);
701 }
702 LomiriTestCasecxx . . $ LomiriTestCase#::waitForSignalcxx . . $ LomiriTestCase#waitForSignal(fa74d1cf20e4f830).(&dragEnded);
703 }
704
705 void test_alternative_content_for_default_commit_regioncxx . . $ tst_BottomEdge#test_alternative_content_for_default_commit_region(49f6e7a06ebc5aa8).()
706 {
707 QScopedPointercxx . . $ QScopedPointer#<BottomEdgeTestCasecxx . . $ BottomEdgeTestCase#> testcxx . . $ QScopedPointer#QScopedPointer(6f97683fca3ece44).(new BottomEdgeTestCasecxx . . $ BottomEdgeTestCase#("AlternateDefaultRegionContent.qml"cxx . . $ QString#QString(85c52e162fed56f9).));
708 UCBottomEdgecxx . . $ UCBottomEdge# *bottomEdge = test->cxx . . $ QScopedPointer#`operator->`(34d6acfd341ba7ab).testItemcxx . . $ BottomEdgeTestCase#testItem(801721994f3c45c4).();
709
710 QPointcxx . . $ QPoint# fromcxx . . $ QPoint#QPoint(3e454b8ccf442868).(bottomEdge->widthcxx . . $ QQuickItem#width(21b6c25e127938e2).() / 2.0f, bottomEdge->heightcxx . . $ QQuickItem#height(21b6c25e127938e2).() - 5);
711 QPointcxx . . $ QPoint# deltacxx . . $ QPoint#QPoint(3e454b8ccf442868).(0, -(bottomEdge->heightcxx . . $ QQuickItem#height(21b6c25e127938e2).() / 2));
712
713 UCTestExtrascxx . . $ UCTestExtras#::touchDragcxx . . $ UCTestExtras#touchDrag(88bc2464b742ca51).(0, bottomEdge, from, delta, 20);
714 QTRY_COMPARE_WITH_TIMEOUTcxx . . $ `<external>/8602788698586413231/qtestcase.h:179:9`!(bottomEdge->status(), UCBottomEdge::Committed, 1000);
715 QCOMPAREcxx . . $ `<external>/8602788698586413231/qtestcase.h:86:9`!(bottomEdge->contentItem()->objectName(), QString("regionContent"));
716 }
717
718 void test_end_drag_in_region_commits_to_the_region_datacxx . . $ tst_BottomEdge#test_end_drag_in_region_commits_to_the_region_data(49f6e7a06ebc5aa8).()
719 {
720 QTestcxx . . $ QTest/::addColumncxx . . $ QTest/addColumn(cfe4d590606f2f46).<bool>("withMouse");
721
722 QTestcxx . . $ QTest/::newRowcxx . . $ QTest/newRow(71534bb7a360de38).("with mouse") <<cxx . . $ `operator<<`(61fb880f51a53ddf). true;
723 QTestcxx . . $ QTest/::newRowcxx . . $ QTest/newRow(71534bb7a360de38).("with touch") <<cxx . . $ `operator<<`(61fb880f51a53ddf). false;
724 }
725 void test_end_drag_in_region_commits_to_the_regioncxx . . $ tst_BottomEdge#test_end_drag_in_region_commits_to_the_region(49f6e7a06ebc5aa8).()
726 {
727 QFETCHcxx . . $ `<external>/8602788698586413231/qtestcase.h:201:9`!(bool, withMouse);
728
729 QScopedPointercxx . . $ QScopedPointer#<BottomEdgeTestCasecxx . . $ BottomEdgeTestCase#> testcxx . . $ QScopedPointer#QScopedPointer(6f97683fca3ece44).(new BottomEdgeTestCasecxx . . $ BottomEdgeTestCase#("AlternateDefaultRegionContent.qml"cxx . . $ QString#QString(85c52e162fed56f9).));
730 UCBottomEdgecxx . . $ UCBottomEdge# *bottomEdge = test->cxx . . $ QScopedPointer#`operator->`(34d6acfd341ba7ab).testItemcxx . . $ BottomEdgeTestCase#testItem(801721994f3c45c4).();
731 UCBottomEdgePrivatecxx . . $ UCBottomEdgePrivate# *privateBottomEdge = UCBottomEdgePrivatecxx . . $ UCBottomEdgePrivate#::getcxx . . $ UCBottomEdgePrivate#get(9a23c5ede8912ed6).(bottomEdge);
732 UCBottomEdgeRegioncxx . . $ UCBottomEdgeRegion# *region = privateBottomEdge->regionscxx . . $ UCBottomEdgePrivate#regions.[cxx . . $ QList#`operator[]`(7a0ef1c7079e8533).0];
733 UCBottomEdgeStylecxx . . $ UCBottomEdgeStyle# *style = UCBottomEdgePrivatecxx . . $ UCBottomEdgePrivate#::getcxx . . $ UCBottomEdgePrivate#get(9a23c5ede8912ed6).(bottomEdge)->bottomPanelcxx . . $ UCBottomEdgePrivate#bottomPanel.;
734
735 // alter default region for testing
736 UCBottomEdgeRegionPrivatecxx . . $ UCBottomEdgeRegionPrivate#::getcxx . . $ UCBottomEdgeRegionPrivate#get(cef217ac64f6a4af).(region)->tocxx . . $ UCBottomEdgeRegionPrivate#to. = 0.6;
737
738 QPointcxx . . $ QPoint# fromcxx . . $ QPoint#QPoint(3e454b8ccf442868).(bottomEdge->widthcxx . . $ QQuickItem#width(21b6c25e127938e2).() / 2.0f, bottomEdge->heightcxx . . $ QQuickItem#height(21b6c25e127938e2).() - 5);
739 QPointcxx . . $ QPoint# deltacxx . . $ QPoint#QPoint(3e454b8ccf442868).(0, -(bottomEdge->heightcxx . . $ QQuickItem#height(21b6c25e127938e2).() / 2));
740
741 if (withMouse) {
742 bottomEdge->hintcxx . . $ UCBottomEdge#hint(8de00351da73cb39).()->setStatuscxx . . $ UCBottomEdgeHint#setStatus(9e5e67f3b399fdcc).(UCBottomEdgeHintcxx . . $ UCBottomEdgeHint#::Lockedcxx . . $ UCBottomEdgeHint#Locked.);
743 UCTestExtrascxx . . $ UCTestExtras#::mouseDragcxx . . $ UCTestExtras#mouseDrag(1e4c55a83d406d6a).(bottomEdge, from, delta, Qtcxx . . $ Qt/::LeftButtoncxx . . $ Qt/LeftButton., Qtcxx . . $ QFlags#QFlags(93d577a3e9528307).::NoModifiercxx . . $ Qt/NoModifier.);
744 } else {
745 UCTestExtrascxx . . $ UCTestExtras#::touchDragcxx . . $ UCTestExtras#touchDrag(88bc2464b742ca51).(0, bottomEdge, from, delta, 20);
746 }
747
748 QTRY_COMPARE_WITH_TIMEOUTcxx . . $ `<external>/8602788698586413231/qtestcase.h:179:9`!(bottomEdge->status(), UCBottomEdge::Committed, 1000);
749 QCOMPAREcxx . . $ `<external>/8602788698586413231/qtestcase.h:86:9`!(bottomEdge->activeRegion(), region);
750 // the top of the committed content should not be the top of the bottom edge
751 QVERIFYcxx . . $ `<external>/8602788698586413231/qtestcase.h:63:9`!(style->m_panel->y() > bottomEdge->y());
752 }
753
754 void test_drag_ends_in_uncovered_region_collapses_datacxx . . $ tst_BottomEdge#test_drag_ends_in_uncovered_region_collapses_data(49f6e7a06ebc5aa8).()
755 {
756 QTestcxx . . $ QTest/::addColumncxx . . $ QTest/addColumn(cfe4d590606f2f46).<bool>("withMouse");
757
758 QTestcxx . . $ QTest/::newRowcxx . . $ QTest/newRow(71534bb7a360de38).("with mouse") <<cxx . . $ `operator<<`(61fb880f51a53ddf). true;
759 QTestcxx . . $ QTest/::newRowcxx . . $ QTest/newRow(71534bb7a360de38).("with touch") <<cxx . . $ `operator<<`(61fb880f51a53ddf). false;
760 }
761 void test_drag_ends_in_uncovered_region_collapsescxx . . $ tst_BottomEdge#test_drag_ends_in_uncovered_region_collapses(49f6e7a06ebc5aa8).()
762 {
763 QFETCHcxx . . $ `<external>/8602788698586413231/qtestcase.h:201:9`!(bool, withMouse);
764
765 QScopedPointercxx . . $ QScopedPointer#<BottomEdgeTestCasecxx . . $ BottomEdgeTestCase#> testcxx . . $ QScopedPointer#QScopedPointer(6f97683fca3ece44).(new BottomEdgeTestCasecxx . . $ BottomEdgeTestCase#("UncoveredByRegion.qml"cxx . . $ QString#QString(85c52e162fed56f9).));
766 UCBottomEdgecxx . . $ UCBottomEdge# *bottomEdge = test->cxx . . $ QScopedPointer#`operator->`(34d6acfd341ba7ab).testItemcxx . . $ BottomEdgeTestCase#testItem(801721994f3c45c4).();
767 UCBottomEdgePrivatecxx . . $ UCBottomEdgePrivate# *privateBottomEdge = UCBottomEdgePrivatecxx . . $ UCBottomEdgePrivate#::getcxx . . $ UCBottomEdgePrivate#get(9a23c5ede8912ed6).(bottomEdge);
768 UCBottomEdgeRegioncxx . . $ UCBottomEdgeRegion# *region = privateBottomEdge->regionscxx . . $ UCBottomEdgePrivate#regions.[cxx . . $ QList#`operator[]`(7a0ef1c7079e8533).0];
769
770 QPointcxx . . $ QPoint# fromcxx . . $ QPoint#QPoint(3e454b8ccf442868).(bottomEdge->widthcxx . . $ QQuickItem#width(21b6c25e127938e2).() / 2.0f, bottomEdge->heightcxx . . $ QQuickItem#height(21b6c25e127938e2).() - 1);
771 QPointcxx . . $ QPoint# to = from +cxx . . $ operator+(e1fd31f94663a124). QPointcxx . . $ QPoint#QPoint(3e454b8ccf442868).(0, -(bottomEdge->parentItemcxx . . $ QQuickItem#parentItem(e7eee0192cff5fb0).()->heightcxx . . $ QQuickItem#height(21b6c25e127938e2).() - UCUnitscxx . . $ UCUnits#::instancecxx . . $ UCUnits#instance(30bb1e7b117091bb).()->gucxx . . $ UCUnits#gu(fbcf3211dfe1bfd1).(10)));
772 // let us know when we are out of the region
773 QSignalSpycxx . . $ QSignalSpy# exitRegioncxx . . $ QSignalSpy#QSignalSpy(593025bf41bda872).(region, SIGNALcxx . . $ `<external>/1208926524888476972/qobjectdefs.h:271:10`!(exited()));
774
775 if (withMouse) {
776 bottomEdge->hintcxx . . $ UCBottomEdge#hint(8de00351da73cb39).()->setStatuscxx . . $ UCBottomEdgeHint#setStatus(9e5e67f3b399fdcc).(UCBottomEdgeHintcxx . . $ UCBottomEdgeHint#::Lockedcxx . . $ UCBottomEdgeHint#Locked.);
777 from =cxx . . $ QPoint#`operator=`(2950c70ea382b4e5). bottomEdge->mapToScenecxx . . $ QQuickItem#mapToScene(d99487573c8c6d6c).(fromcxx . . $ QPointF#QPointF(4f9e9534be445c03).).toPointcxx . . $ QPointF#toPoint(75d69cfbd3c4b2dd).();
778 to =cxx . . $ QPoint#`operator=`(2950c70ea382b4e5). bottomEdge->mapToScenecxx . . $ QQuickItem#mapToScene(d99487573c8c6d6c).(tocxx . . $ QPointF#QPointF(4f9e9534be445c03).).toPointcxx . . $ QPointF#toPoint(75d69cfbd3c4b2dd).();
779 QTestcxx . . $ QTest/::mousePresscxx . . $ QTest/mousePress(6597b0dc46846b01).(bottomEdge->windowcxx . . $ QQuickItem#window(7226278ce62b172a).(), Qtcxx . . $ Qt/::LeftButtoncxx . . $ Qt/LeftButton., Qtcxx . . $ QFlags#QFlags(93d577a3e9528307).::NoModifiercxx . . $ Qt/NoModifier., from, 20);
780 QPointcxx . . $ QPoint# movePos(from);
781 while (movePos.ycxx . . $ QPoint#y(455f465bc33b4cdf).() > to.ycxx . . $ QPoint#y(455f465bc33b4cdf).()) {
782 QTestcxx . . $ QTest/::mouseMovecxx . . $ QTest/mouseMove(4e5a021139bdcb14).(bottomEdge->windowcxx . . $ QQuickItem#window(7226278ce62b172a).(), movePos, 20);
783 movePos +=cxx . . $ QPoint#`operator+=`(838c0f16ae3b9ee0). QPointcxx . . $ QPoint#QPoint(3e454b8ccf442868).(0, -20);
784 }
785 movePos -=cxx . . $ QPoint#`operator-=`(838c0f16ae3b9ee0). QPointcxx . . $ QPoint#QPoint(3e454b8ccf442868).(0, -20);
786 QTestcxx . . $ QTest/::mouseReleasecxx . . $ QTest/mouseRelease(6597b0dc46846b01).(bottomEdge->windowcxx . . $ QQuickItem#window(7226278ce62b172a).(), Qtcxx . . $ Qt/::LeftButtoncxx . . $ Qt/LeftButton., Qtcxx . . $ QFlags#QFlags(93d577a3e9528307).::NoModifiercxx . . $ Qt/NoModifier., movePos, 20);
787 } else {
788 UCTestExtrascxx . . $ UCTestExtras#::touchPresscxx . . $ UCTestExtras#touchPress(f997a3282644e7b9).(0, bottomEdge, from);
789 QPointcxx . . $ QPoint# movePos(from);
790 while (movePos.ycxx . . $ QPoint#y(455f465bc33b4cdf).() > to.ycxx . . $ QPoint#y(455f465bc33b4cdf).()) {
791 QTestcxx . . $ QTest/::qWaitcxx . . $ QTest/qWait(d4f767463ce0a6b3).(20);
792 UCTestExtrascxx . . $ UCTestExtras#::touchMovecxx . . $ UCTestExtras#touchMove(f997a3282644e7b9).(0, bottomEdge, movePos);
793 movePos +=cxx . . $ QPoint#`operator+=`(838c0f16ae3b9ee0). QPointcxx . . $ QPoint#QPoint(3e454b8ccf442868).(0, -20);
794 }
795 movePos -=cxx . . $ QPoint#`operator-=`(838c0f16ae3b9ee0). QPointcxx . . $ QPoint#QPoint(3e454b8ccf442868).(0, -20);
796 QTestcxx . . $ QTest/::qWaitcxx . . $ QTest/qWait(d4f767463ce0a6b3).(20);
797 UCTestExtrascxx . . $ UCTestExtras#::touchReleasecxx . . $ UCTestExtras#touchRelease(f997a3282644e7b9).(0, bottomEdge, movePos);
798 }
799
800 // we should be collapsing!
801 QTRY_COMPARE_WITH_TIMEOUTcxx . . $ `<external>/8602788698586413231/qtestcase.h:179:9`!(bottomEdge->status(), UCBottomEdge::Committed, 1000);
802 }
803
804 void test_commit_region_content_datacxx . . $ tst_BottomEdge#test_commit_region_content_data(49f6e7a06ebc5aa8).()
805 {
806 QTestcxx . . $ QTest/::addColumncxx . . $ QTest/addColumn(cfe4d590606f2f46).<bool>("withMouse");
807
808 QTestcxx . . $ QTest/::newRowcxx . . $ QTest/newRow(71534bb7a360de38).("with mouse") <<cxx . . $ `operator<<`(61fb880f51a53ddf). true;
809 QTestcxx . . $ QTest/::newRowcxx . . $ QTest/newRow(71534bb7a360de38).("with touch") <<cxx . . $ `operator<<`(61fb880f51a53ddf). false;
810 }
811 void test_commit_region_contentcxx . . $ tst_BottomEdge#test_commit_region_content(49f6e7a06ebc5aa8).()
812 {
813 QFETCHcxx . . $ `<external>/8602788698586413231/qtestcase.h:201:9`!(bool, withMouse);
814
815 QScopedPointercxx . . $ QScopedPointer#<BottomEdgeTestCasecxx . . $ BottomEdgeTestCase#> testcxx . . $ QScopedPointer#QScopedPointer(6f97683fca3ece44).(new BottomEdgeTestCasecxx . . $ BottomEdgeTestCase#("AlternateRegionContent.qml"cxx . . $ QString#QString(85c52e162fed56f9).));
816 UCBottomEdgecxx . . $ UCBottomEdge# *bottomEdge = test->cxx . . $ QScopedPointer#`operator->`(34d6acfd341ba7ab).testItemcxx . . $ BottomEdgeTestCase#testItem(801721994f3c45c4).();
817 UCBottomEdgePrivatecxx . . $ UCBottomEdgePrivate# *privateBottomEdge = UCBottomEdgePrivatecxx . . $ UCBottomEdgePrivate#::getcxx . . $ UCBottomEdgePrivate#get(9a23c5ede8912ed6).(bottomEdge);
818 UCBottomEdgeRegioncxx . . $ UCBottomEdgeRegion# *region = privateBottomEdge->regionscxx . . $ UCBottomEdgePrivate#regions.[cxx . . $ QList#`operator[]`(7a0ef1c7079e8533).0];
819
820 // alter region for testing
821 UCBottomEdgeRegionPrivatecxx . . $ UCBottomEdgeRegionPrivate#::getcxx . . $ UCBottomEdgeRegionPrivate#get(cef217ac64f6a4af).(region)->fromcxx . . $ UCBottomEdgeRegionPrivate#from. = 0.1;
822 UCBottomEdgeRegionPrivatecxx . . $ UCBottomEdgeRegionPrivate#::getcxx . . $ UCBottomEdgeRegionPrivate#get(cef217ac64f6a4af).(region)->tocxx . . $ UCBottomEdgeRegionPrivate#to. = 0.8;
823 // and connect commit to dragEnded
824 connectcxx . . $ QObject#connect(835f87066c895669).(region, &UCBottomEdgeRegioncxx . . $ UCBottomEdgeRegion#::dragEndedcxx . . $ UCBottomEdgeRegion#dragEnded(49f6e7a06ebc5aa8)., bottomEdge, &UCBottomEdgecxx . . $ UCBottomEdge#::commitcxx . . $ UCBottomEdge#commit(49f6e7a06ebc5aa8).);
825
826 QPointcxx . . $ QPoint# fromcxx . . $ QPoint#QPoint(3e454b8ccf442868).(bottomEdge->widthcxx . . $ QQuickItem#width(21b6c25e127938e2).() / 2.0f, bottomEdge->heightcxx . . $ QQuickItem#height(21b6c25e127938e2).() - 5);
827 QPointcxx . . $ QPoint# to = from +cxx . . $ operator+(e1fd31f94663a124). QPointcxx . . $ QPoint#QPoint(3e454b8ccf442868).(0, -(bottomEdge->parentItemcxx . . $ QQuickItem#parentItem(e7eee0192cff5fb0).()->heightcxx . . $ QQuickItem#height(21b6c25e127938e2).() - 1));
828
829 if (withMouse) {
830 bottomEdge->hintcxx . . $ UCBottomEdge#hint(8de00351da73cb39).()->setStatuscxx . . $ UCBottomEdgeHint#setStatus(9e5e67f3b399fdcc).(UCBottomEdgeHintcxx . . $ UCBottomEdgeHint#::Lockedcxx . . $ UCBottomEdgeHint#Locked.);
831 from =cxx . . $ QPoint#`operator=`(2950c70ea382b4e5). bottomEdge->mapToScenecxx . . $ QQuickItem#mapToScene(d99487573c8c6d6c).(fromcxx . . $ QPointF#QPointF(4f9e9534be445c03).).toPointcxx . . $ QPointF#toPoint(75d69cfbd3c4b2dd).();
832 to =cxx . . $ QPoint#`operator=`(2950c70ea382b4e5). bottomEdge->mapToScenecxx . . $ QQuickItem#mapToScene(d99487573c8c6d6c).(tocxx . . $ QPointF#QPointF(4f9e9534be445c03).).toPointcxx . . $ QPointF#toPoint(75d69cfbd3c4b2dd).();
833 QTestcxx . . $ QTest/::mousePresscxx . . $ QTest/mousePress(6597b0dc46846b01).(bottomEdge->windowcxx . . $ QQuickItem#window(7226278ce62b172a).(), Qtcxx . . $ Qt/::LeftButtoncxx . . $ Qt/LeftButton., Qtcxx . . $ QFlags#QFlags(93d577a3e9528307).::NoModifiercxx . . $ Qt/NoModifier., from, 20);
834 QPointcxx . . $ QPoint# movePos(from);
835 while (movePos.ycxx . . $ QPoint#y(455f465bc33b4cdf).() > to.ycxx . . $ QPoint#y(455f465bc33b4cdf).() && (bottomEdge->activeRegioncxx . . $ UCBottomEdge#activeRegion(572f663247c2acb9).() != region)) {
836 QTestcxx . . $ QTest/::mouseMovecxx . . $ QTest/mouseMove(4e5a021139bdcb14).(bottomEdge->windowcxx . . $ QQuickItem#window(7226278ce62b172a).(), movePos, 20);
837 movePos +=cxx . . $ QPoint#`operator+=`(838c0f16ae3b9ee0). QPointcxx . . $ QPoint#QPoint(3e454b8ccf442868).(0, -10);
838 }
839 QTestcxx . . $ QTest/::mouseReleasecxx . . $ QTest/mouseRelease(6597b0dc46846b01).(bottomEdge->windowcxx . . $ QQuickItem#window(7226278ce62b172a).(), Qtcxx . . $ Qt/::LeftButtoncxx . . $ Qt/LeftButton., Qtcxx . . $ QFlags#QFlags(93d577a3e9528307).::NoModifiercxx . . $ Qt/NoModifier., movePos, 20);
840 } else {
841 UCTestExtrascxx . . $ UCTestExtras#::touchPresscxx . . $ UCTestExtras#touchPress(f997a3282644e7b9).(0, bottomEdge, from);
842 QPointcxx . . $ QPoint# movePos(from);
843 while (movePos.ycxx . . $ QPoint#y(455f465bc33b4cdf).() > to.ycxx . . $ QPoint#y(455f465bc33b4cdf).() && (bottomEdge->activeRegioncxx . . $ UCBottomEdge#activeRegion(572f663247c2acb9).() != region)) {
844 QTestcxx . . $ QTest/::qWaitcxx . . $ QTest/qWait(d4f767463ce0a6b3).(20);
845 UCTestExtrascxx . . $ UCTestExtras#::touchMovecxx . . $ UCTestExtras#touchMove(f997a3282644e7b9).(0, bottomEdge, movePos);
846 movePos +=cxx . . $ QPoint#`operator+=`(838c0f16ae3b9ee0). QPointcxx . . $ QPoint#QPoint(3e454b8ccf442868).(0, -10);
847 }
848 QTestcxx . . $ QTest/::qWaitcxx . . $ QTest/qWait(d4f767463ce0a6b3).(20);
849 UCTestExtrascxx . . $ UCTestExtras#::touchReleasecxx . . $ UCTestExtras#touchRelease(f997a3282644e7b9).(0, bottomEdge, movePos);
850 }
851 QTRY_COMPARE_WITH_TIMEOUTcxx . . $ `<external>/8602788698586413231/qtestcase.h:179:9`!(bottomEdge->status(), UCBottomEdge::Committed, 1000);
852 QCOMPAREcxx . . $ `<external>/8602788698586413231/qtestcase.h:86:9`!(bottomEdge->contentItem()->objectName(), QString("regionContent"));
853 }
854
855 void test_overlapping_regionscxx . . $ tst_BottomEdge#test_overlapping_regions(49f6e7a06ebc5aa8).()
856 {
857 QStringcxx . . $ QString# documentcxx . . $ QString#QString(85c52e162fed56f9).("OverlappingRegions.qml");
858 LomiriTestCasecxx . . $ LomiriTestCase#::ignoreWarningcxx . . $ LomiriTestCase#ignoreWarning(b4044705ef85da45).(document, 34, 9, "QML BottomEdgeRegion: Region intersects the one from index 0 having from: 0.2 and to: 0.5"cxx . . $ QString#QString(85c52e162fed56f9)., 1);
859 LomiriTestCasecxx . . $ LomiriTestCase#::ignoreWarningcxx . . $ LomiriTestCase#ignoreWarning(b4044705ef85da45).(document, 37, 9, "QML BottomEdgeRegion: Region intersects the one from index 0 having from: 0.2 and to: 0.5"cxx . . $ QString#QString(85c52e162fed56f9)., 1);
860 LomiriTestCasecxx . . $ LomiriTestCase#::ignoreWarningcxx . . $ LomiriTestCase#ignoreWarning(b4044705ef85da45).(document, 37, 9, "QML BottomEdgeRegion: Region at index 1 contains this region. This region will never activate."cxx . . $ QString#QString(85c52e162fed56f9)., 1);
861 LomiriTestCasecxx . . $ LomiriTestCase#::ignoreWarningcxx . . $ LomiriTestCase#ignoreWarning(b4044705ef85da45).(document, 41, 9, "QML BottomEdgeRegion: Region at index 1 contains this region. This region will never activate."cxx . . $ QString#QString(85c52e162fed56f9)., 1);
862 QScopedPointercxx . . $ QScopedPointer#<BottomEdgeTestCasecxx . . $ BottomEdgeTestCase#> testcxx . . $ QScopedPointer#QScopedPointer(6f97683fca3ece44).(new BottomEdgeTestCasecxx . . $ BottomEdgeTestCase#(document));
863 }
864
865 void test_region_does_not_activate_when_from_greater_than_to_datacxx . . $ tst_BottomEdge#test_region_does_not_activate_when_from_greater_than_to_data(49f6e7a06ebc5aa8).()
866 {
867 QTestcxx . . $ QTest/::addColumncxx . . $ QTest/addColumn(cfe4d590606f2f46).<bool>("withMouse");
868
869 QTestcxx . . $ QTest/::newRowcxx . . $ QTest/newRow(71534bb7a360de38).("with mouse") <<cxx . . $ `operator<<`(61fb880f51a53ddf). true;
870 QTestcxx . . $ QTest/::newRowcxx . . $ QTest/newRow(71534bb7a360de38).("with touch") <<cxx . . $ `operator<<`(61fb880f51a53ddf). false;
871 }
872 void test_region_does_not_activate_when_from_greater_than_tocxx . . $ tst_BottomEdge#test_region_does_not_activate_when_from_greater_than_to(49f6e7a06ebc5aa8).()
873 {
874 QFETCHcxx . . $ `<external>/8602788698586413231/qtestcase.h:201:9`!(bool, withMouse);
875
876 QScopedPointercxx . . $ QScopedPointer#<BottomEdgeTestCasecxx . . $ BottomEdgeTestCase#> testcxx . . $ QScopedPointer#QScopedPointer(6f97683fca3ece44).(new BottomEdgeTestCasecxx . . $ BottomEdgeTestCase#("AlternateRegionContent.qml"cxx . . $ QString#QString(85c52e162fed56f9).));
877 UCBottomEdgecxx . . $ UCBottomEdge# *bottomEdge = test->cxx . . $ QScopedPointer#`operator->`(34d6acfd341ba7ab).testItemcxx . . $ BottomEdgeTestCase#testItem(801721994f3c45c4).();
878 UCBottomEdgePrivatecxx . . $ UCBottomEdgePrivate# *privateBottomEdge = UCBottomEdgePrivatecxx . . $ UCBottomEdgePrivate#::getcxx . . $ UCBottomEdgePrivate#get(9a23c5ede8912ed6).(bottomEdge);
879 UCBottomEdgeRegioncxx . . $ UCBottomEdgeRegion# *region = privateBottomEdge->regionscxx . . $ UCBottomEdgePrivate#regions.[cxx . . $ QList#`operator[]`(7a0ef1c7079e8533).0];
880
881 // adjust region data for the test
882 UCBottomEdgeRegionPrivatecxx . . $ UCBottomEdgeRegionPrivate#::getcxx . . $ UCBottomEdgeRegionPrivate#get(cef217ac64f6a4af).(region)->fromcxx . . $ UCBottomEdgeRegionPrivate#from. = 0.4;
883 UCBottomEdgeRegionPrivatecxx . . $ UCBottomEdgeRegionPrivate#::getcxx . . $ UCBottomEdgeRegionPrivate#get(cef217ac64f6a4af).(region)->tocxx . . $ UCBottomEdgeRegionPrivate#to. = 0.2;
884 QPointcxx . . $ QPoint# fromcxx . . $ QPoint#QPoint(3e454b8ccf442868).(bottomEdge->widthcxx . . $ QQuickItem#width(21b6c25e127938e2).() / 2.0f, bottomEdge->heightcxx . . $ QQuickItem#height(21b6c25e127938e2).() - 5);
885 QPointcxx . . $ QPoint# deltacxx . . $ QPoint#QPoint(3e454b8ccf442868).(0, -(bottomEdge->heightcxx . . $ QQuickItem#height(21b6c25e127938e2).() / 2.0f));
886 QSignalSpycxx . . $ QSignalSpy# activeRegioncxx . . $ QSignalSpy#QSignalSpy(a79b3c88ff1c9981).(bottomEdge, &UCBottomEdgecxx . . $ UCBottomEdge#::activeRegionChangedcxx . . $ UCBottomEdge#activeRegionChanged(68594c0fd6b7508a).);
887 if (withMouse) {
888 bottomEdge->hintcxx . . $ UCBottomEdge#hint(8de00351da73cb39).()->setStatuscxx . . $ UCBottomEdgeHint#setStatus(9e5e67f3b399fdcc).(UCBottomEdgeHintcxx . . $ UCBottomEdgeHint#::Lockedcxx . . $ UCBottomEdgeHint#Locked.);
889 UCTestExtrascxx . . $ UCTestExtras#::mouseDragcxx . . $ UCTestExtras#mouseDrag(1e4c55a83d406d6a).(bottomEdge, from, delta, Qtcxx . . $ Qt/::LeftButtoncxx . . $ Qt/LeftButton., Qtcxx . . $ QFlags#QFlags(93d577a3e9528307).::NoModifiercxx . . $ Qt/NoModifier., 10);
890 } else {
891 UCTestExtrascxx . . $ UCTestExtras#::touchDragcxx . . $ UCTestExtras#touchDrag(88bc2464b742ca51).(0, bottomEdge, from, delta, 10);
892 }
893 QEXPECT_FAILcxx . . $ `<external>/8602788698586413231/qtestcase.h:195:9`!(0, "region should not activate", Continue);
894 QVERIFYcxx . . $ `<external>/8602788698586413231/qtestcase.h:63:9`!(activeRegion.wait(400));
895 }
896
897 void test_autocollapse_navigation_action_on_commit_completed_datacxx . . $ tst_BottomEdge#test_autocollapse_navigation_action_on_commit_completed_data(49f6e7a06ebc5aa8).()
898 {
899 QTestcxx . . $ QTest/::addColumncxx . . $ QTest/addColumn(cfe4d590606f2f46).<QStringcxx . . $ QString#>("document");
900
901 QTestcxx . . $ QTest/::newRowcxx . . $ QTest/newRow(71534bb7a360de38).("content has PageHeader") <<cxx . . $ `operator<<`(1c43a92f59c6a770). "AutoCollapseInPageHeader.qml";
902 QTestcxx . . $ QTest/::newRowcxx . . $ QTest/newRow(71534bb7a360de38).("content is Page with PageHeader") <<cxx . . $ `operator<<`(1c43a92f59c6a770). "AutoCollapseInPageWithPageHeader.qml";
903 }
904 void test_autocollapse_navigation_action_on_commit_completedcxx . . $ tst_BottomEdge#test_autocollapse_navigation_action_on_commit_completed(49f6e7a06ebc5aa8).()
905 {
906 QFETCHcxx . . $ `<external>/8602788698586413231/qtestcase.h:201:9`!(QString, document);
907
908 QScopedPointercxx . . $ QScopedPointer#<BottomEdgeTestCasecxx . . $ BottomEdgeTestCase#> testcxx . . $ QScopedPointer#QScopedPointer(6f97683fca3ece44).(new BottomEdgeTestCasecxx . . $ BottomEdgeTestCase#(document));
909 UCBottomEdgecxx . . $ UCBottomEdge# *bottomEdge = test->cxx . . $ QScopedPointer#`operator->`(34d6acfd341ba7ab).testItemcxx . . $ BottomEdgeTestCase#testItem(801721994f3c45c4).();
910
911 BottomEdgeTestCasecxx . . $ BottomEdgeTestCase# *testCase = test.datacxx . . $ QScopedPointer#data(34d6acfd341ba7ab).();
912 connectcxx . . $ QObject#connect(799f219bacec96aa).(bottomEdge, &UCBottomEdgecxx . . $ UCBottomEdge#::contentItemChangedcxx . . $ UCBottomEdge#contentItemChanged(49f6e7a06ebc5aa8)., [=]() {
913 QVERIFYcxx . . $ `<external>/8602788698586413231/qtestcase.h:63:9`!(!testCase->hasContentAutoCollapse());
914 });
915 connectcxx . . $ QObject#connect(799f219bacec96aa).(bottomEdge, &UCBottomEdgecxx . . $ UCBottomEdge#::commitCompletedcxx . . $ UCBottomEdge#commitCompleted(49f6e7a06ebc5aa8)., [=]() {
916 QVERIFYcxx . . $ `<external>/8602788698586413231/qtestcase.h:63:9`!(testCase->hasContentAutoCollapse());
917 });
918 // drag slowly
919 QPointcxx . . $ QPoint# fromcxx . . $ QPoint#QPoint(3e454b8ccf442868).(bottomEdge->widthcxx . . $ QQuickItem#width(21b6c25e127938e2).() / 2.0f, bottomEdge->heightcxx . . $ QQuickItem#height(21b6c25e127938e2).() - 5);
920 QPointcxx . . $ QPoint# deltacxx . . $ QPoint#QPoint(3e454b8ccf442868).(0, -bottomEdge->heightcxx . . $ QQuickItem#height(21b6c25e127938e2).());
921 UCTestExtrascxx . . $ UCTestExtras#::touchDragcxx . . $ UCTestExtras#touchDrag(88bc2464b742ca51).(0, bottomEdge, from, delta, 20);
922 }
923
924 void test_bottomedge_hint_enabledcxx . . $ tst_BottomEdge#test_bottomedge_hint_enabled(49f6e7a06ebc5aa8).() {
925 QScopedPointercxx . . $ QScopedPointer#<BottomEdgeTestCasecxx . . $ BottomEdgeTestCase#> viewcxx . . $ QScopedPointer#QScopedPointer(6f97683fca3ece44).(new BottomEdgeTestCasecxx . . $ BottomEdgeTestCase#("Defaults.qml"cxx . . $ QString#QString(85c52e162fed56f9).));
926 UCBottomEdgecxx . . $ UCBottomEdge# *bottomEdge = view->cxx . . $ QScopedPointer#`operator->`(34d6acfd341ba7ab).testItemcxx . . $ BottomEdgeTestCase#testItem(801721994f3c45c4).();
927 QCOMPAREcxx . . $ `<external>/8602788698586413231/qtestcase.h:86:9`!(bottomEdge->isEnabled(), bottomEdge->hint()->isEnabled());
928 bottomEdge->setEnabledcxx . . $ QQuickItem#setEnabled(b45ddcbc8423892c).(!bottomEdge->isEnabledcxx . . $ QQuickItem#isEnabled(50ce9a9e25b4a850).());
929 QCOMPAREcxx . . $ `<external>/8602788698586413231/qtestcase.h:86:9`!(bottomEdge->isEnabled(), bottomEdge->hint()->isEnabled());
930 }
931
932 void test_collapse_by_keyboard_datacxx . . $ tst_BottomEdge#test_collapse_by_keyboard_data(49f6e7a06ebc5aa8).()
933 {
934 QTestcxx . . $ QTest/::addColumncxx . . $ QTest/addColumn(cfe4d590606f2f46).<Qtcxx . . $ Qt/::Keycxx . . $ Qt/Key#>("key");
935
936 QTestcxx . . $ QTest/::newRowcxx . . $ QTest/newRow(71534bb7a360de38).("space") <<cxx . . $ `operator<<`(61fb880f51a53ddf). Qtcxx . . $ Qt/::Key_Spacecxx . . $ Qt/Key_Space.;
937 QTestcxx . . $ QTest/::newRowcxx . . $ QTest/newRow(71534bb7a360de38).("enter") <<cxx . . $ `operator<<`(61fb880f51a53ddf). Qtcxx . . $ Qt/::Key_Entercxx . . $ Qt/Key_Enter.;
938 QTestcxx . . $ QTest/::newRowcxx . . $ QTest/newRow(71534bb7a360de38).("return") <<cxx . . $ `operator<<`(61fb880f51a53ddf). Qtcxx . . $ Qt/::Key_Returncxx . . $ Qt/Key_Return.;
939 }
940 void test_collapse_by_keyboardcxx . . $ tst_BottomEdge#test_collapse_by_keyboard(49f6e7a06ebc5aa8).() {
941 QFETCHcxx . . $ `<external>/8602788698586413231/qtestcase.h:201:9`!(Qt::Key, key);
942
943 QScopedPointercxx . . $ QScopedPointer#<BottomEdgeTestCasecxx . . $ BottomEdgeTestCase#> viewcxx . . $ QScopedPointer#QScopedPointer(6f97683fca3ece44).(new BottomEdgeTestCasecxx . . $ BottomEdgeTestCase#("Defaults.qml"cxx . . $ QString#QString(85c52e162fed56f9).));
944 view->cxx . . $ QScopedPointer#`operator->`(34d6acfd341ba7ab).rootObjectcxx . . $ QQuickView#rootObject(e7eee0192cff5fb0).()->forceActiveFocuscxx . . $ QQuickItem#forceActiveFocus(49f6e7a06ebc5aa8).();
945 QTRY_COMPARE_WITH_TIMEOUTcxx . . $ `<external>/8602788698586413231/qtestcase.h:179:9`!(view->rootObject()->property("activeFocus").toBool(), true, 1000);
946 UCBottomEdgecxx . . $ UCBottomEdge# *bottomEdge = view->cxx . . $ QScopedPointer#`operator->`(34d6acfd341ba7ab).testItemcxx . . $ BottomEdgeTestCase#testItem(801721994f3c45c4).();
947 QTestcxx . . $ QTest/::keyClickcxx . . $ QTest/keyClick(ca1d662676a3034d).(bottomEdge->hintcxx . . $ UCBottomEdge#hint(8de00351da73cb39).()->windowcxx . . $ QQuickItem#window(7226278ce62b172a).(), Qtcxx . . $ Qt/::Key_Tabcxx . . $ Qt/Key_Tab.);
948 QTRY_COMPARE_WITH_TIMEOUTcxx . . $ `<external>/8602788698586413231/qtestcase.h:179:9`!(bottomEdge->hint()->property("activeFocus").toBool(), true, 1000);
949 QTRY_COMPARE_WITH_TIMEOUTcxx . . $ `<external>/8602788698586413231/qtestcase.h:179:9`!(bottomEdge->hint()->property("keyNavigationFocus").toBool(), true, 1000);
950 QTestcxx . . $ QTest/::keyClickcxx . . $ QTest/keyClick(ca1d662676a3034d).(bottomEdge->hintcxx . . $ UCBottomEdge#hint(8de00351da73cb39).()->windowcxx . . $ QQuickItem#window(7226278ce62b172a).(), key);
951 QSignalSpycxx . . $ QSignalSpy# commitCompletedSpycxx . . $ QSignalSpy#QSignalSpy(593025bf41bda872).(bottomEdge, SIGNALcxx . . $ `<external>/1208926524888476972/qobjectdefs.h:271:10`!(commitCompleted()));
952 QTRY_COMPARE_WITH_TIMEOUTcxx . . $ `<external>/8602788698586413231/qtestcase.h:179:9`!(commitCompletedSpy.count(), 1, 1000);
953 QTestcxx . . $ QTest/::keyClickcxx . . $ QTest/keyClick(ca1d662676a3034d).(bottomEdge->hintcxx . . $ UCBottomEdge#hint(8de00351da73cb39).()->windowcxx . . $ QQuickItem#window(7226278ce62b172a).(), Qtcxx . . $ Qt/::Key_Escapecxx . . $ Qt/Key_Escape.);
954 QSignalSpycxx . . $ QSignalSpy# collapseCompletedSpycxx . . $ QSignalSpy#QSignalSpy(593025bf41bda872).(bottomEdge, SIGNALcxx . . $ `<external>/1208926524888476972/qobjectdefs.h:271:10`!(collapseCompleted()));
955 QTRY_COMPARE_WITH_TIMEOUTcxx . . $ `<external>/8602788698586413231/qtestcase.h:179:9`!(collapseCompletedSpy.count(), 1, 1000);
956 }
957
958 void test_preload_contentcxx . . $ tst_BottomEdge#test_preload_content(49f6e7a06ebc5aa8).()
959 {
960 QScopedPointercxx . . $ QScopedPointer#<BottomEdgeTestCasecxx . . $ BottomEdgeTestCase#> testcxx . . $ QScopedPointer#QScopedPointer(6f97683fca3ece44).(new BottomEdgeTestCasecxx . . $ BottomEdgeTestCase#("PreloadedContent.qml"cxx . . $ QString#QString(85c52e162fed56f9).));
961 UCBottomEdgecxx . . $ UCBottomEdge# *bottomEdge = test->cxx . . $ QScopedPointer#`operator->`(34d6acfd341ba7ab).testItemcxx . . $ BottomEdgeTestCase#testItem(801721994f3c45c4).();
962
963 QPointcxx . . $ QPoint# fromcxx . . $ QPoint#QPoint(3e454b8ccf442868).(bottomEdge->widthcxx . . $ QQuickItem#width(21b6c25e127938e2).() / 2.0f, bottomEdge->heightcxx . . $ QQuickItem#height(21b6c25e127938e2).() - 5);
964 QPointcxx . . $ QPoint# to = from +cxx . . $ operator+(e1fd31f94663a124). QPointcxx . . $ QPoint#QPoint(3e454b8ccf442868).(0, -(bottomEdge->parentItemcxx . . $ QQuickItem#parentItem(e7eee0192cff5fb0).()->heightcxx . . $ QQuickItem#height(21b6c25e127938e2).() - 1));
965 QSignalSpycxx . . $ QSignalSpy# spycxx . . $ QSignalSpy#QSignalSpy(a79b3c88ff1c9981).(bottomEdge, &UCBottomEdgecxx . . $ UCBottomEdge#::activeRegionChangedcxx . . $ UCBottomEdge#activeRegionChanged(68594c0fd6b7508a).);
966
967 connectcxx . . $ QObject#connect(799f219bacec96aa).(bottomEdge, &UCBottomEdgecxx . . $ UCBottomEdge#::contentItemChangedcxx . . $ UCBottomEdge#contentItemChanged(49f6e7a06ebc5aa8)., [=]() {
968 regionObjectscxx . . $ tst_BottomEdge#regionObjects..appendcxx . . $ QList#append(77d9f17553126ecb).(bottomEdge->contentItemcxx . . $ UCBottomEdge#contentItem(e7eee0192cff5fb0).()
969 ? bottomEdge->contentItemcxx . . $ UCBottomEdge#contentItem(e7eee0192cff5fb0).()->objectNamecxx . . $ QObject#objectName(6ef7b6c27b00b43d).()
970 : "NULL"cxx . . $ QString#QString(85c52e162fed56f9).);
971 });
972
973 UCTestExtrascxx . . $ UCTestExtras#::touchPresscxx . . $ UCTestExtras#touchPress(f997a3282644e7b9).(0, bottomEdge, from);
974 QPointcxx . . $ QPoint# movePos(from);
975 while (movePos.ycxx . . $ QPoint#y(455f465bc33b4cdf).() > to.ycxx . . $ QPoint#y(455f465bc33b4cdf).()) {
976 QTestcxx . . $ QTest/::qWaitcxx . . $ QTest/qWait(d4f767463ce0a6b3).(20);
977 UCTestExtrascxx . . $ UCTestExtras#::touchMovecxx . . $ UCTestExtras#touchMove(f997a3282644e7b9).(0, bottomEdge, movePos);
978 movePos +=cxx . . $ QPoint#`operator+=`(838c0f16ae3b9ee0). QPointcxx . . $ QPoint#QPoint(3e454b8ccf442868).(0, -10);
979 }
980 QTestcxx . . $ QTest/::qWaitcxx . . $ QTest/qWait(d4f767463ce0a6b3).(20);
981 UCTestExtrascxx . . $ UCTestExtras#::touchReleasecxx . . $ UCTestExtras#touchRelease(f997a3282644e7b9).(0, bottomEdge, movePos);
982 // we should have had 4 active region changes by now
983 // null -> defaultRegion -> region #0 -> region #1 -> null
984 QCOMPAREcxx . . $ `<external>/8602788698586413231/qtestcase.h:86:9`!(spy.count(), 4);
985 QCOMPAREcxx . . $ `<external>/8602788698586413231/qtestcase.h:86:9`!(regionObjects.size(), 6);
986 // the first two regions content is the same
987 int i = 0;
988 QCOMPAREcxx . . $ `<external>/8602788698586413231/qtestcase.h:86:9`!(regionObjects[i++], QString("default"));
989 QCOMPAREcxx . . $ `<external>/8602788698586413231/qtestcase.h:86:9`!(regionObjects[i++], QString("default"));
990 QCOMPAREcxx . . $ `<external>/8602788698586413231/qtestcase.h:86:9`!(regionObjects[i++], QString("region1"));
991 QCOMPAREcxx . . $ `<external>/8602788698586413231/qtestcase.h:86:9`!(regionObjects[i++], QString("default"));
992 QCOMPAREcxx . . $ `<external>/8602788698586413231/qtestcase.h:86:9`!(regionObjects[i++], QString("region2"));
993 QCOMPAREcxx . . $ `<external>/8602788698586413231/qtestcase.h:86:9`!(regionObjects[i++], QString("default"));
994 }
995
996 void test_preload_content_urlcxx . . $ tst_BottomEdge#test_preload_content_url(49f6e7a06ebc5aa8).()
997 {
998 QScopedPointercxx . . $ QScopedPointer#<BottomEdgeTestCasecxx . . $ BottomEdgeTestCase#> testcxx . . $ QScopedPointer#QScopedPointer(6f97683fca3ece44).(new BottomEdgeTestCasecxx . . $ BottomEdgeTestCase#("PreloadContentUrl.qml"cxx . . $ QString#QString(85c52e162fed56f9).));
999 UCBottomEdgecxx . . $ UCBottomEdge# *bottomEdge = test->cxx . . $ QScopedPointer#`operator->`(34d6acfd341ba7ab).testItemcxx . . $ BottomEdgeTestCase#testItem(801721994f3c45c4).();
1000
1001 // commit so the contentItem is set
1002 bottomEdge->commitcxx . . $ UCBottomEdge#commit(49f6e7a06ebc5aa8).();
1003 QTRY_VERIFYcxx . . $ `<external>/8602788698586413231/qtestcase.h:167:9`!(bottomEdge->contentItem());
1004 }
1005
1006 void test_reset_preload_contentcxx . . $ tst_BottomEdge#test_reset_preload_content(49f6e7a06ebc5aa8).()
1007 {
1008 QScopedPointercxx . . $ QScopedPointer#<BottomEdgeTestCasecxx . . $ BottomEdgeTestCase#> testcxx . . $ QScopedPointer#QScopedPointer(6f97683fca3ece44).(new BottomEdgeTestCasecxx . . $ BottomEdgeTestCase#("PreloadedContent.qml"cxx . . $ QString#QString(85c52e162fed56f9).));
1009 UCBottomEdgecxx . . $ UCBottomEdge# *bottomEdge = test->cxx . . $ QScopedPointer#`operator->`(34d6acfd341ba7ab).testItemcxx . . $ BottomEdgeTestCase#testItem(801721994f3c45c4).();
1010
1011 UCBottomEdgePrivatecxx . . $ UCBottomEdgePrivate# *d = UCBottomEdgePrivatecxx . . $ UCBottomEdgePrivate#::getcxx . . $ UCBottomEdgePrivate#get(9a23c5ede8912ed6).(bottomEdge);
1012 for (int i = 0; i < d->regionscxx . . $ UCBottomEdgePrivate#regions..sizecxx . . $ QList#size(ea6fe5115c70a13f).(); i++) {
1013 QTRY_VERIFYcxx . . $ `<external>/8602788698586413231/qtestcase.h:167:9`!(UCBottomEdgeRegionPrivate::get(d->regions[i])->contentItem);
1014 }
1015
1016 // set preloadContent: false
1017 bottomEdge->setPreloadContentcxx . . $ UCBottomEdge#setPreloadContent(b45ddcbc8423892c).(false);
1018 for (int i = 0; i < d->regionscxx . . $ UCBottomEdgePrivate#regions..sizecxx . . $ QList#size(ea6fe5115c70a13f).(); i++) {
1019 QVERIFYcxx . . $ `<external>/8602788698586413231/qtestcase.h:63:9`!(!UCBottomEdgeRegionPrivate::get(d->regions[i])->contentItem);
1020 }
1021 }
1022
1023 void test_disabled_content_unloadscxx . . $ tst_BottomEdge#test_disabled_content_unloads(49f6e7a06ebc5aa8).()
1024 {
1025 QScopedPointercxx . . $ QScopedPointer#<BottomEdgeTestCasecxx . . $ BottomEdgeTestCase#> testcxx . . $ QScopedPointer#QScopedPointer(6f97683fca3ece44).(new BottomEdgeTestCasecxx . . $ BottomEdgeTestCase#("PreloadedContent.qml"cxx . . $ QString#QString(85c52e162fed56f9).));
1026 UCBottomEdgecxx . . $ UCBottomEdge# *bottomEdge = test->cxx . . $ QScopedPointer#`operator->`(34d6acfd341ba7ab).testItemcxx . . $ BottomEdgeTestCase#testItem(801721994f3c45c4).();
1027
1028 UCBottomEdgePrivatecxx . . $ UCBottomEdgePrivate# *d = UCBottomEdgePrivatecxx . . $ UCBottomEdgePrivate#::getcxx . . $ UCBottomEdgePrivate#get(9a23c5ede8912ed6).(bottomEdge);
1029 // disable a region
1030 d->regionscxx . . $ UCBottomEdgePrivate#regions.[cxx . . $ QList#`operator[]`(7a0ef1c7079e8533).0]->setEnabledcxx . . $ UCBottomEdgeRegion#setEnabled(b45ddcbc8423892c).(false);
1031 QVERIFYcxx . . $ `<external>/8602788698586413231/qtestcase.h:63:9`!(!UCBottomEdgeRegionPrivate::get(d->regions[0])->contentItem);
1032
1033 // enable it
1034 d->regionscxx . . $ UCBottomEdgePrivate#regions.[cxx . . $ QList#`operator[]`(7a0ef1c7079e8533).0]->setEnabledcxx . . $ UCBottomEdgeRegion#setEnabled(b45ddcbc8423892c).(true);
1035 QTRY_VERIFY_WITH_TIMEOUTcxx . . $ `<external>/8602788698586413231/qtestcase.h:161:9`!(UCBottomEdgeRegionPrivate::get(d->regions[0])->contentItem != nullptr, 1000);
1036 }
1037
1038 void test_action_triggered_commitscxx . . $ tst_BottomEdge#test_action_triggered_commits(49f6e7a06ebc5aa8).()
1039 {
1040 QScopedPointercxx . . $ QScopedPointer#<BottomEdgeTestCasecxx . . $ BottomEdgeTestCase#> testcxx . . $ QScopedPointer#QScopedPointer(6f97683fca3ece44).(new BottomEdgeTestCasecxx . . $ BottomEdgeTestCase#("BottomEdgeWithAction.qml"cxx . . $ QString#QString(85c52e162fed56f9).));
1041 UCBottomEdgecxx . . $ UCBottomEdge# *bottomEdge = test->cxx . . $ QScopedPointer#`operator->`(34d6acfd341ba7ab).testItemcxx . . $ BottomEdgeTestCase#testItem(801721994f3c45c4).();
1042 UCActioncxx . . $ UCAction# *action = bottomEdge->hintcxx . . $ UCBottomEdge#hint(8de00351da73cb39).()->actioncxx . . $ UCActionItem#action(5d1c4a3886a97659).();
1043 QVERIFYcxx . . $ `<external>/8602788698586413231/qtestcase.h:63:9`!(action);
1044
1045 // trigger action
1046 action->triggercxx . . $ UCAction#trigger(244511558b20107a).();
1047 QTRY_COMPARE_WITH_TIMEOUTcxx . . $ `<external>/8602788698586413231/qtestcase.h:179:9`!(bottomEdge->status(), UCBottomEdge::Committed, 2000);
1048 QVERIFYcxx . . $ `<external>/8602788698586413231/qtestcase.h:63:9`!(bottomEdge->contentItem());
1049 }
1050 };
1051
1052 QTEST_MAINcxx . . $ `<external>/4204159469433502174/qtest.h:508:9`!(tst_BottomEdge)
1053
1054 #include "tst_bottomedge.moc"cxx . . $ `<file>/tests/unit/bottomedge13/.moc/tst_bottomedge.moc`/