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/qt/docqtplugin.cpp | 12 +++++++++++- 1 file changed, 11 insertions(+), 1 deletion(-) (limited to 'parts/documentation/plugins/qt/docqtplugin.cpp') diff --git a/parts/documentation/plugins/qt/docqtplugin.cpp b/parts/documentation/plugins/qt/docqtplugin.cpp index 2a7ddae8..47d0baff 100644 --- a/parts/documentation/plugins/qt/docqtplugin.cpp +++ b/parts/documentation/plugins/qt/docqtplugin.cpp @@ -137,6 +137,14 @@ void DocQtPlugin::createTOC(DocumentationCatalogItem *item) void DocQtPlugin::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(); + TQString qtDocDir(QT_DOCDIR); qtDocDir = URLUtil::envExpand(qtDocDir); if (qtDocDir.isEmpty()) @@ -144,7 +152,7 @@ void DocQtPlugin::autoSetupPlugin() qtDocDir = getenv("QTDIR"); } if (!qtDocDir.isEmpty()) - { + { config->setGroup("Search Settings"); config->writeEntry("TQt Reference Documentation", true); config->setGroup("Index Settings"); @@ -156,6 +164,8 @@ void DocQtPlugin::autoSetupPlugin() config->writePathEntry("Guide to the TQt Translation Tools", qtDocDir + TQString("/linguist.dcf")); config->writePathEntry("qmake User Guide", qtDocDir + TQString("/qmake.dcf")); } + + config->sync(); } void DocQtPlugin::setCatalogURL(DocumentationCatalogItem *item) -- cgit v1.2.1