From d676f93b5f3a7481fc0588f087bef418879e6f78 Mon Sep 17 00:00:00 2001 From: Michele Calgaro Date: Thu, 30 Oct 2014 14:50:07 +0900 Subject: Added backend logic for allowing the user to manually update the Documentation Plugin lists. GUI part still to be done. In the process, fixed some bugs related to deallocation and reinitialization of documentation catalogs and project catalogs. This relates to bug 1859. Signed-off-by: Michele Calgaro --- parts/documentation/plugins/kdevtoc/dockdevtocplugin.cpp | 9 +++++++++ 1 file changed, 9 insertions(+) (limited to 'parts/documentation/plugins/kdevtoc/dockdevtocplugin.cpp') diff --git a/parts/documentation/plugins/kdevtoc/dockdevtocplugin.cpp b/parts/documentation/plugins/kdevtoc/dockdevtocplugin.cpp index 10fe853d..d0a00eb6 100644 --- a/parts/documentation/plugins/kdevtoc/dockdevtocplugin.cpp +++ b/parts/documentation/plugins/kdevtoc/dockdevtocplugin.cpp @@ -123,6 +123,14 @@ bool DocKDevTOCPlugin::needRefreshIndex(DocumentationCatalogItem* /*item*/) void DocKDevTOCPlugin::autoSetupPlugin() { + // Clear groups, to allow for re-autosetup calls + config->deleteGroup("Index"); + config->deleteGroup("Index Settings"); + config->deleteGroup("Locations"); + config->deleteGroup("Search Settings"); + config->deleteGroup("TOC Settings"); + config->sync(); + TQStringList tocsDir = DocKDevTOCPluginFactory::instance()->dirs()->findAllResources("data", "kdevdocumentation/tocs/*.toc"); for (TQStringList::const_iterator it = tocsDir.begin(); it != tocsDir.end(); ++it) @@ -130,6 +138,7 @@ void DocKDevTOCPlugin::autoSetupPlugin() config->setGroup("Locations"); config->writePathEntry(catalogTitle(*it), *it); } + config->sync(); } void DocKDevTOCPlugin::createIndex(IndexBox* index, DocumentationCatalogItem* item) -- cgit v1.2.3