diff options
author | Qt Continuous Integration System <qt-info@nokia.com> | 2011-04-08 19:13:07 (GMT) |
---|---|---|
committer | Qt Continuous Integration System <qt-info@nokia.com> | 2011-04-08 19:13:07 (GMT) |
commit | 622f3c791b979864ad540e3c4c92b78b226edc08 (patch) | |
tree | e4a5a16b659caeea8cf0355dbc39c99f9a4a4381 /tests | |
parent | 02fcd5e346da13cbb65523de2348880cf7d7a073 (diff) | |
parent | f6f2d03b2d74b236d33a5ca32a49f138bf521c13 (diff) | |
download | Qt-622f3c791b979864ad540e3c4c92b78b226edc08.zip Qt-622f3c791b979864ad540e3c4c92b78b226edc08.tar.gz Qt-622f3c791b979864ad540e3c4c92b78b226edc08.tar.bz2 |
Merge branch 'qt-master-from-4.7' of scm.dev.nokia.troll.no:qt/qt-integration into master-integration
* 'qt-master-from-4.7' of scm.dev.nokia.troll.no:qt/qt-integration:
Cocoa: p1 bug fix: fix auto test regressions
Ensure shared network session deleted from correct thread
Revert "Remove SIGBUS emission from QNetworkSession destruction."
Image w/ PreserveAspectFit has its width changed once more than needed.
Cocoa: p1 bug fix: revert use of subWindowStacking
Diffstat (limited to 'tests')
3 files changed, 20 insertions, 2 deletions
diff --git a/tests/auto/declarative/qdeclarativeimage/data/aspectratio.qml b/tests/auto/declarative/qdeclarativeimage/data/aspectratio.qml index 739299d..cd092bc 100644 --- a/tests/auto/declarative/qdeclarativeimage/data/aspectratio.qml +++ b/tests/auto/declarative/qdeclarativeimage/data/aspectratio.qml @@ -1,6 +1,10 @@ import QtQuick 1.0 Image { + property int widthChange: 0 + property int heightChange: 0 source: "heart.png" fillMode: Image.PreserveAspectFit; + onWidthChanged: widthChange += 1 + onHeightChanged: heightChange += 1 } diff --git a/tests/auto/declarative/qdeclarativeimage/tst_qdeclarativeimage.cpp b/tests/auto/declarative/qdeclarativeimage/tst_qdeclarativeimage.cpp index c5a3d14..87e3347 100644 --- a/tests/auto/declarative/qdeclarativeimage/tst_qdeclarativeimage.cpp +++ b/tests/auto/declarative/qdeclarativeimage/tst_qdeclarativeimage.cpp @@ -248,14 +248,22 @@ void tst_qdeclarativeimage::preserveAspectRatio() canvas->setSource(QUrl::fromLocalFile(SRCDIR "/data/aspectratio.qml")); QDeclarativeImage *image = qobject_cast<QDeclarativeImage*>(canvas->rootObject()); QVERIFY(image != 0); + QCOMPARE(image->property("widthChange").toInt(), 1); + QCOMPARE(image->property("heightChange").toInt(), 1); image->setWidth(80.0); + QCOMPARE(image->property("widthChange").toInt(), 2); + QCOMPARE(image->property("heightChange").toInt(), 2); QCOMPARE(image->width(), 80.); QCOMPARE(image->height(), 80.); canvas->setSource(QUrl::fromLocalFile(SRCDIR "/data/aspectratio.qml")); image = qobject_cast<QDeclarativeImage*>(canvas->rootObject()); - image->setHeight(60.0); QVERIFY(image != 0); + QCOMPARE(image->property("widthChange").toInt(), 1); + QCOMPARE(image->property("heightChange").toInt(), 1); + image->setHeight(60.0); + QCOMPARE(image->property("widthChange").toInt(), 2); + QCOMPARE(image->property("heightChange").toInt(), 2); QCOMPARE(image->height(), 60.); QCOMPARE(image->width(), 60.); delete canvas; diff --git a/tests/auto/macnativeevents/tst_macnativeevents.cpp b/tests/auto/macnativeevents/tst_macnativeevents.cpp index 3dc0506..9c18a3c 100644 --- a/tests/auto/macnativeevents/tst_macnativeevents.cpp +++ b/tests/auto/macnativeevents/tst_macnativeevents.cpp @@ -69,7 +69,7 @@ private slots: void testMouseEnter(); void testChildDialogInFrontOfModalParent(); #ifdef QT_MAC_USE_COCOA - void testChildWindowInFrontOfParentWindow(); +// void testChildWindowInFrontOfParentWindow(); // void testChildToolWindowInFrontOfChildNormalWindow(); void testChildWindowInFrontOfStaysOnTopParentWindow(); #endif @@ -319,6 +319,11 @@ void tst_MacNativeEvents::testChildDialogInFrontOfModalParent() } #ifdef QT_MAC_USE_COCOA +#if 0 +// This test is disabled as of Qt-4.7.4 because we cannot do it +// unless we use the Cocoa sub window API. But using that opens up +// a world of side effects that we cannot live with. So we rather +// not support child-on-top-of-parent instead. void tst_MacNativeEvents::testChildWindowInFrontOfParentWindow() { // Test that a child window always stacks in front of its parent window. @@ -343,6 +348,7 @@ void tst_MacNativeEvents::testChildWindowInFrontOfParentWindow() QTest::qWait(100); QVERIFY(!child.isVisible()); } +#endif /* This test can be enabled once setStackingOrder has been fixed in qwidget_mac.mm void tst_MacNativeEvents::testChildToolWindowInFrontOfChildNormalWindow() |