Remove old Qt Creator documentation.

This commit is contained in:
con
2009-09-15 17:26:44 +02:00
parent 29ecb23342
commit 119bb180ed

View File

@@ -573,14 +573,26 @@ void HelpPlugin::extensionsInitialized()
bool needsSetup = false;
bool assistantInternalDocRegistered = false;
QStringList documentationToRemove;
const QString &docInternal = QString("com.nokia.qtcreator.%1%2")
.arg(IDE_VERSION_MAJOR).arg(IDE_VERSION_MINOR);
const QString &docInternal = QString("com.nokia.qtcreator.%1%2%3")
.arg(IDE_VERSION_MAJOR).arg(IDE_VERSION_MINOR).arg(IDE_VERSION_RELEASE);
const QStringList &docs = m_helpEngine->registeredDocumentations();
foreach (const QString &ns, docs) {
if (ns == docInternal) {
assistantInternalDocRegistered = true;
break;
} else if (ns.startsWith("com.nokia.qtcreator.")) {
documentationToRemove << ns;
}
}
//remove any qtcreator documentation that doesn't belong to current version
if (!documentationToRemove.isEmpty()) {
QHelpEngineCore hc(m_helpEngine->collectionFile());
hc.setupData();
foreach (const QString &ns, documentationToRemove) {
if (hc.unregisterDocumentation(ns))
needsSetup = true;
}
}