diff options
author | Janne Anttila <janne.anttila@digia.com> | 2009-09-30 13:01:05 (GMT) |
---|---|---|
committer | Janne Anttila <janne.anttila@digia.com> | 2009-09-30 13:01:05 (GMT) |
commit | c3ef2d3a6d9a6e35b05cbd8f370630d5dd85415e (patch) | |
tree | b11aaa1acca5ffe30cbfe2ce42a00d3597fa6c45 /tests | |
parent | af1e344ac6046640ddb728f6017b3181469c241d (diff) | |
parent | 1a902e6dba504b4a25a218555bb326772b5b77a6 (diff) | |
download | Qt-c3ef2d3a6d9a6e35b05cbd8f370630d5dd85415e.zip Qt-c3ef2d3a6d9a6e35b05cbd8f370630d5dd85415e.tar.gz Qt-c3ef2d3a6d9a6e35b05cbd8f370630d5dd85415e.tar.bz2 |
Merge branch '4.6' of git@scm.dev.troll.no:qt/qt into 4.6
Diffstat (limited to 'tests')
-rw-r--r-- | tests/auto/qdom/tst_qdom.cpp | 3 | ||||
-rw-r--r-- | tests/auto/qfiledialog/tst_qfiledialog.cpp | 29 | ||||
-rw-r--r-- | tests/auto/qlistview/tst_qlistview.cpp | 2 |
3 files changed, 33 insertions, 1 deletions
diff --git a/tests/auto/qdom/tst_qdom.cpp b/tests/auto/qdom/tst_qdom.cpp index 6637202..6987186 100644 --- a/tests/auto/qdom/tst_qdom.cpp +++ b/tests/auto/qdom/tst_qdom.cpp @@ -1908,7 +1908,8 @@ void tst_QDom::taskQTBUG4595_dontAssertWhenDocumentSpecifiesUnknownEncoding() co QDomDocument d; QVERIFY(d.setContent(xmlWithUnknownEncoding)); - QString dontAssert = d.toString(); // this should not assert + //QString dontAssert = d.toString(); // this should not assert + QVERIFY2(false, "Line above crashes but we still want to run all tests."); QVERIFY(true); } diff --git a/tests/auto/qfiledialog/tst_qfiledialog.cpp b/tests/auto/qfiledialog/tst_qfiledialog.cpp index 1aa5ee1..f6b082f 100644 --- a/tests/auto/qfiledialog/tst_qfiledialog.cpp +++ b/tests/auto/qfiledialog/tst_qfiledialog.cpp @@ -169,6 +169,8 @@ private slots: void task257579_sideBarWithNonCleanUrls(); void task259105_filtersCornerCases(); + void QTBUG4419_lineEditSelectAll(); + private: QByteArray userSettings; }; @@ -2153,5 +2155,32 @@ void tst_QFiledialog::task259105_filtersCornerCases() filters->setCurrentIndex(1); QCOMPARE(filters->currentText(), QLatin1String("Text Files")); } + +void tst_QFiledialog::QTBUG4419_lineEditSelectAll() +{ + QString tempPath = QDir::tempPath(); + QTemporaryFile *t; + t = new QTemporaryFile; + t->open(); + QNonNativeFileDialog fd(0, "TestFileDialog", t->fileName()); + + fd.setDirectory(tempPath); + fd.setViewMode(QFileDialog::List); + fd.setAcceptMode(QFileDialog::AcceptSave); + fd.setFileMode(QFileDialog::AnyFile); + + fd.show(); + QApplication::setActiveWindow(&fd); + QTest::qWaitForWindowShown(&fd); + QTRY_COMPARE(fd.isVisible(), true); + QTRY_COMPARE(QApplication::activeWindow(), static_cast<QWidget*>(&fd)); + + QTest::qWait(250); + QLineEdit *lineEdit = qFindChild<QLineEdit*>(&fd, "fileNameEdit"); + + QCOMPARE(tempPath + QChar('/') + lineEdit->text(), t->fileName()); + QCOMPARE(tempPath + QChar('/') + lineEdit->selectedText(), t->fileName()); +} + QTEST_MAIN(tst_QFiledialog) #include "tst_qfiledialog.moc" diff --git a/tests/auto/qlistview/tst_qlistview.cpp b/tests/auto/qlistview/tst_qlistview.cpp index 499fb0b..d9cab02 100644 --- a/tests/auto/qlistview/tst_qlistview.cpp +++ b/tests/auto/qlistview/tst_qlistview.cpp @@ -59,6 +59,8 @@ #include <windows.h> #endif +#include "../../shared/util.h" + //TESTED_CLASS= //TESTED_FILES= |