| 201 | } |
| 202 | |
| 203 | void TestQtHelpPlugin::testRemoveOneProvider() |
| 204 | { |
| 205 | QStringList path, name, icon, ghns; |
| 206 | path << VALID1 << VALID2; |
| 207 | name << QStringLiteral("file1") << QStringLiteral("file2"); |
| 208 | icon << QStringLiteral("myIcon") << QStringLiteral("myIcon"); |
| 209 | ghns << QStringLiteral("0") << QStringLiteral("0"); |
| 210 | |
| 211 | auto plugin = makePlugin(m_testCore, [&]() { |
| 212 | qtHelpWriteConfig(icon, name, path, ghns, QString(), true); |
| 213 | }); |
| 214 | RETURN_IF_TEST_FAILED(); |
| 215 | |
| 216 | QCOMPARE(plugin->qtHelpProviderLoaded().size(), 2); |
| 217 | // we remove the second provider |
| 218 | QtHelpProvider* provider = plugin->qtHelpProviderLoaded().at(0); |
| 219 | path.removeAt(1); |
| 220 | name.removeAt(1); |
| 221 | icon.removeAt(1); |
| 222 | ghns.removeAt(1); |
| 223 | qtHelpWriteConfig(icon, name, path, ghns, QString(), true); |
| 224 | plugin->readConfig(); |
| 225 | |
| 226 | QCOMPARE(plugin->qtHelpProviderLoaded().size(), 1); |
| 227 | QCOMPARE(plugin->qtHelpProviderLoaded().at(0), provider); |
| 228 | } |
| 229 | |
| 230 | void TestQtHelpPlugin::testDeclarationLookup_data() |
| 231 | { |
nothing calls this directly
no test coverage detected