diff options
Diffstat (limited to 'tests/auto/qhelpindexmodel/tst_qhelpindexmodel.cpp')
-rw-r--r-- | tests/auto/qhelpindexmodel/tst_qhelpindexmodel.cpp | 46 |
1 files changed, 0 insertions, 46 deletions
diff --git a/tests/auto/qhelpindexmodel/tst_qhelpindexmodel.cpp b/tests/auto/qhelpindexmodel/tst_qhelpindexmodel.cpp index d304c3f3b..358be9956 100644 --- a/tests/auto/qhelpindexmodel/tst_qhelpindexmodel.cpp +++ b/tests/auto/qhelpindexmodel/tst_qhelpindexmodel.cpp @@ -76,7 +76,6 @@ private slots: void setupIndex(); void filter(); - void linksForIndex(); private: QString m_colFile; @@ -152,50 +151,5 @@ void tst_QHelpIndexModel::filter() QCOMPARE(m->stringList().count(), 11); } -void tst_QHelpIndexModel::linksForIndex() -{ - QHelpEngine h(m_colFile, 0); - QHelpIndexModel *m = h.indexModel(); - SignalWaiter w; - connect(m, SIGNAL(indexCreated()), - &w, SLOT(stopWaiting())); - w.start(); - h.setupData(); - int i = 0; - while (w.isRunning() && i++ < 10) - QTest::qWait(500); - - QCOMPARE(h.currentFilter(), QString("unfiltered")); - QMap<QString, QUrl> map; - map = m->linksForKeyword("foo"); - QCOMPARE(map.count(), 2); - QCOMPARE(map.contains("Test Manual"), true); - QCOMPARE(map.value("Test Manual"), - QUrl("qthelp://trolltech.com.1-0-0.test/testFolder/test.html#foo")); - - QCOMPARE(map.contains("Fancy"), true); - QCOMPARE(map.value("Fancy"), - QUrl("qthelp://trolltech.com.1-0-0.test/testFolder/fancy.html#foo")); - - map = m->linksForKeyword("foobar"); - QCOMPARE(map.count(), 1); - QCOMPARE(map.contains("Fancy"), true); - - map = m->linksForKeyword("notexisting"); - QCOMPARE(map.count(), 0); - - w.start(); - h.setCurrentFilter("Custom Filter 1"); - i = 0; - while (w.isRunning() && i++ < 10) - QTest::qWait(500); - - map = m->linksForKeyword("foo"); - QCOMPARE(map.count(), 1); - QCOMPARE(map.contains("Test Manual"), true); - QCOMPARE(map.value("Test Manual"), - QUrl("qthelp://trolltech.com.1-0-0.test/testFolder/test.html#foo")); -} - QTEST_MAIN(tst_QHelpIndexModel) #include "tst_qhelpindexmodel.moc" |