diff options
author | Michele Calgaro <michele.calgaro@yahoo.it> | 2014-10-30 14:50:07 +0900 |
---|---|---|
committer | Michele Calgaro <michele.calgaro@yahoo.it> | 2014-10-30 14:50:07 +0900 |
commit | d676f93b5f3a7481fc0588f087bef418879e6f78 (patch) | |
tree | 8bcbe99d2f62e6216afa3bd9b56c99a2eb163d07 /parts/documentation/documentation_part.cpp | |
parent | 565f0ae626aeff1ec26ce379abe2c3838b54cdf6 (diff) | |
download | tdevelop-d676f93b5f3a7481fc0588f087bef418879e6f78.tar.gz tdevelop-d676f93b5f3a7481fc0588f087bef418879e6f78.zip |
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 <michele.calgaro@yahoo.it>
Diffstat (limited to 'parts/documentation/documentation_part.cpp')
-rw-r--r-- | parts/documentation/documentation_part.cpp | 18 |
1 files changed, 15 insertions, 3 deletions
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("<b>Documentation browser</b><p>" @@ -151,6 +151,18 @@ void DocumentationPart::loadDocumentationPlugins() } } +void DocumentationPart::reloadDocumentationPlugins() +{ + TQValueList<DocumentationPlugin*>::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<KTextEditor::Document*>( partController()->activePart() ) ); + TQString word = KDevEditorUtil::currentWord( dynamic_cast<KTextEditor::Document*>( 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)) { |