diff options
author | Aaron McCarthy <aaron.mccarthy@nokia.com> | 2010-07-16 00:57:01 (GMT) |
---|---|---|
committer | Aaron McCarthy <aaron.mccarthy@nokia.com> | 2010-07-16 00:57:01 (GMT) |
commit | 17e7b024ba01aba0e525f7fd03b9c5c0ed34e7c8 (patch) | |
tree | 54d169f5970ae2ec8b4aab796cc75fbfb04f9ed4 /tests | |
parent | 062a504010534d5e899f042b27c8ace82b556426 (diff) | |
parent | 6e2c3e7306883cd4618742e37861e326e9c91895 (diff) | |
download | Qt-17e7b024ba01aba0e525f7fd03b9c5c0ed34e7c8.zip Qt-17e7b024ba01aba0e525f7fd03b9c5c0ed34e7c8.tar.gz Qt-17e7b024ba01aba0e525f7fd03b9c5c0ed34e7c8.tar.bz2 |
Merge remote branch 'origin/4.7' into oslo-staging-1
Conflicts:
tools/qdoc3/htmlgenerator.cpp
Diffstat (limited to 'tests')
3 files changed, 36 insertions, 0 deletions
diff --git a/tests/auto/qfiledialog2/tst_qfiledialog2.cpp b/tests/auto/qfiledialog2/tst_qfiledialog2.cpp index eee495f..6299c24 100644 --- a/tests/auto/qfiledialog2/tst_qfiledialog2.cpp +++ b/tests/auto/qfiledialog2/tst_qfiledialog2.cpp @@ -140,6 +140,7 @@ private slots: void QTBUG4419_lineEditSelectAll(); void QTBUG6558_showDirsOnly(); void QTBUG4842_selectFilterWithHideNameFilterDetails(); + void dontShowCompleterOnRoot(); private: QByteArray userSettings; @@ -1194,5 +1195,26 @@ void tst_QFileDialog2::QTBUG4842_selectFilterWithHideNameFilterDetails() } +void tst_QFileDialog2::dontShowCompleterOnRoot() +{ + QNonNativeFileDialog fd(0, "TestFileDialog"); + fd.setAcceptMode(QFileDialog::AcceptSave); + fd.show(); + + QApplication::setActiveWindow(&fd); + QTest::qWaitForWindowShown(&fd); + QTRY_COMPARE(fd.isVisible(), true); + QTRY_COMPARE(QApplication::activeWindow(), static_cast<QWidget*>(&fd)); + + fd.setDirectory(""); + QLineEdit *lineEdit = qFindChild<QLineEdit*>(&fd, "fileNameEdit"); + QTRY_VERIFY(lineEdit->text().isEmpty()); + + //The gatherer thread will then return the result + QApplication::processEvents(); + + QTRY_VERIFY(lineEdit->completer()->popup()->isHidden()); +} + QTEST_MAIN(tst_QFileDialog2) #include "tst_qfiledialog2.moc" diff --git a/tests/auto/qgraphicsgridlayout/tst_qgraphicsgridlayout.cpp b/tests/auto/qgraphicsgridlayout/tst_qgraphicsgridlayout.cpp index b9a5c66..d1d6860 100644 --- a/tests/auto/qgraphicsgridlayout/tst_qgraphicsgridlayout.cpp +++ b/tests/auto/qgraphicsgridlayout/tst_qgraphicsgridlayout.cpp @@ -105,6 +105,7 @@ private slots: void geometries_data(); void geometries(); void avoidRecursionInInsertItem(); + void styleInfoLeak(); void task236367_maxSizeHint(); }; @@ -2196,6 +2197,12 @@ void tst_QGraphicsGridLayout::avoidRecursionInInsertItem() QCOMPARE(layout->count(), 0); } +void tst_QGraphicsGridLayout::styleInfoLeak() +{ + QGraphicsGridLayout grid; + grid.horizontalSpacing(); +} + void tst_QGraphicsGridLayout::task236367_maxSizeHint() { QGraphicsWidget *widget = new QGraphicsWidget; diff --git a/tests/auto/qgraphicslinearlayout/tst_qgraphicslinearlayout.cpp b/tests/auto/qgraphicslinearlayout/tst_qgraphicslinearlayout.cpp index c26e5d4..6107fa1 100644 --- a/tests/auto/qgraphicslinearlayout/tst_qgraphicslinearlayout.cpp +++ b/tests/auto/qgraphicslinearlayout/tst_qgraphicslinearlayout.cpp @@ -102,6 +102,7 @@ private slots: void layoutDirection(); void removeLayout(); void avoidRecursionInInsertItem(); + void styleInfoLeak(); // Task specific tests void task218400_insertStretchCrash(); @@ -1443,6 +1444,12 @@ void tst_QGraphicsLinearLayout::avoidRecursionInInsertItem() QCOMPARE(layout->count(), 0); } +void tst_QGraphicsLinearLayout::styleInfoLeak() +{ + QGraphicsLinearLayout layout; + layout.spacing(); +} + void tst_QGraphicsLinearLayout::task218400_insertStretchCrash() { QGraphicsScene *scene = new QGraphicsScene; |