diff options
author | Gunnar Sletta <gunnar@trolltech.com> | 2009-12-01 11:43:43 (GMT) |
---|---|---|
committer | Gunnar Sletta <gunnar@trolltech.com> | 2009-12-01 11:43:43 (GMT) |
commit | 309a91a6f734ffaf9c5168eca1285ec236fc3235 (patch) | |
tree | 940e4838e23376a807fbaed98225270b62657c78 /tests | |
parent | dbfdfdb1bc37dd18dd1b723b5d5b0b65c37f3f41 (diff) | |
parent | f63fdc09fcaf5258694e9c2f21a5cd22c6677a17 (diff) | |
download | Qt-309a91a6f734ffaf9c5168eca1285ec236fc3235.zip Qt-309a91a6f734ffaf9c5168eca1285ec236fc3235.tar.gz Qt-309a91a6f734ffaf9c5168eca1285ec236fc3235.tar.bz2 |
Merge branch '4.6' of scm.dev.nokia.troll.no:qt/oslo-staging-2 into 4.6
Diffstat (limited to 'tests')
-rw-r--r-- | tests/auto/qfontcombobox/tst_qfontcombobox.cpp | 6 | ||||
-rw-r--r-- | tests/auto/qlistview/tst_qlistview.cpp | 10 |
2 files changed, 13 insertions, 3 deletions
diff --git a/tests/auto/qfontcombobox/tst_qfontcombobox.cpp b/tests/auto/qfontcombobox/tst_qfontcombobox.cpp index b974ecab..657be06 100644 --- a/tests/auto/qfontcombobox/tst_qfontcombobox.cpp +++ b/tests/auto/qfontcombobox/tst_qfontcombobox.cpp @@ -144,9 +144,11 @@ void tst_QFontComboBox::currentFont() QFont oldCurrentFont = box.currentFont(); box.setCurrentFont(currentFont); - QCOMPARE(box.currentFont(), currentFont); - QString boxFontFamily = QFontInfo(box.currentFont()).family(); QRegExp foundry(" \\[.*\\]"); + if (!box.currentFont().family().contains(foundry)) { + QCOMPARE(box.currentFont(), currentFont); + } + QString boxFontFamily = QFontInfo(box.currentFont()).family(); if (!currentFont.family().contains(foundry)) boxFontFamily.remove(foundry); QCOMPARE(boxFontFamily, currentFont.family()); diff --git a/tests/auto/qlistview/tst_qlistview.cpp b/tests/auto/qlistview/tst_qlistview.cpp index 602da61..24a553f 100644 --- a/tests/auto/qlistview/tst_qlistview.cpp +++ b/tests/auto/qlistview/tst_qlistview.cpp @@ -586,7 +586,15 @@ void tst_QListView::indexAt() index = view.indexAt(QPoint(20,2 * sz.height())); QVERIFY(!index.isValid()); - + // Check when peeking out of the viewport bounds + index = view.indexAt(QPoint(view.viewport()->rect().width(), 0)); + QVERIFY(!index.isValid()); + index = view.indexAt(QPoint(-1, 0)); + QVERIFY(!index.isValid()); + index = view.indexAt(QPoint(20, view.viewport()->rect().height())); + QVERIFY(!index.isValid()); + index = view.indexAt(QPoint(20, -1)); + QVERIFY(!index.isValid()); model.rCount = 30; QListViewShowEventListener view2; |