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/documentation_part.cpp | 18 +++++++++++++++--- 1 file changed, 15 insertions(+), 3 deletions(-) (limited to 'parts/documentation/documentation_part.cpp') diff --git a/parts/documentation/documentation_part.cpp b/parts/documentation/documentation_part.cpp index c68add0e..b0d59e24 100644 --- a/parts/documentation/documentation_part.cpp +++ b/parts/documentation/documentation_part.cpp @@ -93,7 +93,7 @@ DocumentationPart::DocumentationPart(TQObject *parent, const char *name, const T connect(core(), TQT_SIGNAL(projectClosed()), this, TQT_SLOT(projectClosed())); m_widget = new DocumentationWidget(this); - m_widget->setIcon(SmallIcon( info()->icon() )); + m_widget->setIcon(SmallIcon(info()->icon())); m_widget->setCaption(i18n("Documentation")); TQWhatsThis::add(m_widget, i18n("Documentation browser

" @@ -151,6 +151,18 @@ void DocumentationPart::loadDocumentationPlugins() } } +void DocumentationPart::reloadDocumentationPlugins() +{ + TQValueList::iterator it; + for (it = m_plugins.begin(); it != m_plugins.end(); ++it) + { + DocumentationPlugin *plugin=*it; + plugin->clear(); + plugin->autoSetupPlugin(); + plugin->reinit(m_widget->contents(), m_widget->index(), TQStringList()); + } +} + void DocumentationPart::emitIndexSelected(IndexBox *indexBox) { if (!m_hasIndex) @@ -322,7 +334,7 @@ void DocumentationPart::manPage() void DocumentationPart::infoPage() { - TQString word = KDevEditorUtil::currentWord( dynamic_cast( partController()->activePart() ) ); + TQString word = KDevEditorUtil::currentWord( dynamic_cast( partController()->activePart() ) ); if ( isAssistantUsed() ) { @@ -573,7 +585,7 @@ void DocumentationPart::projectOpened() it != m_plugins.constEnd(); ++it) { if ((*it)->hasCapability(DocumentationPlugin::ProjectDocumentation) && - ((*it)->pluginName() == projectDocSystem)) + ((*it)->pluginName() == projectDocSystem)) m_projectDocumentationPlugin = (*it)->projectDocumentationPlugin(DocumentationPlugin::APIDocs); if ((*it)->hasCapability(DocumentationPlugin::ProjectUserManual)) { -- cgit v1.2.1