diff options
author | Qt Continuous Integration System <qt-info@nokia.com> | 2010-06-04 19:57:44 (GMT) |
---|---|---|
committer | Qt Continuous Integration System <qt-info@nokia.com> | 2010-06-04 19:57:44 (GMT) |
commit | fa8612b3ff33ecd4477776829990da137bd52065 (patch) | |
tree | cceb86770fc0da25ab4b9be5e4c433bbb0fb813f /tests | |
parent | e3ee3780777b07e6283a8b33cd4f7e1d56241d1c (diff) | |
parent | 65c063a531810f5a21c00a0afb81cdd68d0d6961 (diff) | |
download | Qt-fa8612b3ff33ecd4477776829990da137bd52065.zip Qt-fa8612b3ff33ecd4477776829990da137bd52065.tar.gz Qt-fa8612b3ff33ecd4477776829990da137bd52065.tar.bz2 |
Merge branch '4.7' of scm.dev.nokia.troll.no:qt/qt-qml into 4.7-integration
* '4.7' of scm.dev.nokia.troll.no:qt/qt-qml:
Move QListModelInterface into util.
Ensure ParticleMotionGravity always pulls in the right direction.
Remove version ifdefs from Particles; only 4.7 is supported.
Update docs for the runtime.orientation values
Revert to Portrait/Landscape terminology for Orientation enum, with
Add more Q_AUTOTEST_EXPORTs
Improve input panel handling in declarative demos and examples
Always integer align anchor center points
Add header and footer to GridView
Diffstat (limited to 'tests')
4 files changed, 23 insertions, 22 deletions
diff --git a/tests/auto/declarative/qdeclarativegridview/tst_qdeclarativegridview.cpp b/tests/auto/declarative/qdeclarativegridview/tst_qdeclarativegridview.cpp index 2db3ee6..fb09d39 100644 --- a/tests/auto/declarative/qdeclarativegridview/tst_qdeclarativegridview.cpp +++ b/tests/auto/declarative/qdeclarativegridview/tst_qdeclarativegridview.cpp @@ -833,21 +833,34 @@ void tst_QDeclarativeGridView::componentChanges() QSignalSpy highlightSpy(gridView, SIGNAL(highlightChanged())); QSignalSpy delegateSpy(gridView, SIGNAL(delegateChanged())); + QSignalSpy headerSpy(gridView, SIGNAL(headerChanged())); + QSignalSpy footerSpy(gridView, SIGNAL(footerChanged())); gridView->setHighlight(&component); gridView->setDelegate(&delegateComponent); + gridView->setHeader(&component); + gridView->setFooter(&component); QTRY_COMPARE(gridView->highlight(), &component); QTRY_COMPARE(gridView->delegate(), &delegateComponent); + QTRY_COMPARE(gridView->header(), &component); + QTRY_COMPARE(gridView->footer(), &component); QTRY_COMPARE(highlightSpy.count(),1); QTRY_COMPARE(delegateSpy.count(),1); + QTRY_COMPARE(headerSpy.count(),1); + QTRY_COMPARE(footerSpy.count(),1); gridView->setHighlight(&component); gridView->setDelegate(&delegateComponent); + gridView->setHeader(&component); + gridView->setFooter(&component); QTRY_COMPARE(highlightSpy.count(),1); QTRY_COMPARE(delegateSpy.count(),1); + QTRY_COMPARE(headerSpy.count(),1); + QTRY_COMPARE(footerSpy.count(),1); + delete canvas; } diff --git a/tests/auto/declarative/qdeclarativetextedit/tst_qdeclarativetextedit.cpp b/tests/auto/declarative/qdeclarativetextedit/tst_qdeclarativetextedit.cpp index fbab30e..474eb3f 100644 --- a/tests/auto/declarative/qdeclarativetextedit/tst_qdeclarativetextedit.cpp +++ b/tests/auto/declarative/qdeclarativetextedit/tst_qdeclarativetextedit.cpp @@ -956,12 +956,6 @@ void tst_qdeclarativetextedit::openInputPanelOnFocus() edit.setFocusOnPress(true); QCOMPARE(focusOnPressSpy.count(),2); - // active window focus reason should not cause input panel to open - QGraphicsObject * editObject = qobject_cast<QGraphicsObject*>(&edit); - editObject->setFocus(Qt::ActiveWindowFocusReason); - QCOMPARE(ic.openInputPanelReceived, false); - QCOMPARE(ic.closeInputPanelReceived, false); - // and input panel should not open if focus has already been set edit.setFocus(true); QCOMPARE(ic.openInputPanelReceived, false); diff --git a/tests/auto/declarative/qdeclarativetextinput/tst_qdeclarativetextinput.cpp b/tests/auto/declarative/qdeclarativetextinput/tst_qdeclarativetextinput.cpp index 3cb4da0..c1c6634 100644 --- a/tests/auto/declarative/qdeclarativetextinput/tst_qdeclarativetextinput.cpp +++ b/tests/auto/declarative/qdeclarativetextinput/tst_qdeclarativetextinput.cpp @@ -902,12 +902,6 @@ void tst_qdeclarativetextinput::openInputPanelOnFocus() input.setFocusOnPress(true); QCOMPARE(focusOnPressSpy.count(),2); - // active window focus reason should not cause input panel to open - QGraphicsObject * inputObject = qobject_cast<QGraphicsObject*>(&input); - inputObject->setFocus(Qt::ActiveWindowFocusReason); - QCOMPARE(ic.openInputPanelReceived, false); - QCOMPARE(ic.closeInputPanelReceived, false); - // and input panel should not open if focus has already been set input.setFocus(true); QCOMPARE(ic.openInputPanelReceived, false); diff --git a/tests/auto/declarative/qdeclarativeviewer/data/orientation.qml b/tests/auto/declarative/qdeclarativeviewer/data/orientation.qml index be911a3..57db82d 100644 --- a/tests/auto/declarative/qdeclarativeviewer/data/orientation.qml +++ b/tests/auto/declarative/qdeclarativeviewer/data/orientation.qml @@ -1,18 +1,18 @@ import Qt 4.7 Rectangle { color: "black" - width: (runtime.orientation == Orientation.RightUp || runtime.orientation == Orientation.LeftUp) ? 300 : 200 - height: (runtime.orientation == Orientation.RightUp || runtime.orientation == Orientation.LeftUp) ? 200 : 300 + width: (runtime.orientation == Orientation.Landscape || runtime.orientation == Orientation.LandscapeInverted) ? 300 : 200 + height: (runtime.orientation == Orientation.Landscape || runtime.orientation == Orientation.LandscapeInverted) ? 200 : 300 Text { text: { - if (runtime.orientation == Orientation.TopUp) - return "TopUp" - if (runtime.orientation == Orientation.TopDown) - return "TopDown" - if (runtime.orientation == Orientation.LeftUp) - return "LeftUp" - if (runtime.orientation == Orientation.RightUp) - return "RightUp" + if (runtime.orientation == Orientation.Portrait) + return "Portrait" + if (runtime.orientation == Orientation.PortraitInverted) + return "PortraitInverted" + if (runtime.orientation == Orientation.Landscape) + return "Landscape" + if (runtime.orientation == Orientation.LandscapeInverted) + return "LandscapeInverted" } color: "white" } |