Rewrite of the whole help modul initialization.

We now do as much as possible lazy initialisation, e.g only start the
full text search indexer if we really access the search widget. Also
moved the QFutur progress into the search widget. Changed all ctors to
be called without an argument, since we share the help engines from
help manager all over the place. Make use of the fact that we only need
to call setupData on the gui engine if we access the help mode, otherwise
all data is fetched thru the core engine whichs setupData is really fast.
This commit is contained in:
kh1
2010-03-23 18:11:43 +01:00
parent c3326eb627
commit 6ac6be5db2
19 changed files with 415 additions and 615 deletions

View File

@@ -125,8 +125,14 @@ void DocSettingsPage::removeDocumentation()
void DocSettingsPage::apply()
{
emit dialogAccepted();
emit documentationChanged();
HelpManager* manager = &HelpManager::instance();
manager->unregisterDocumentation(m_filesToUnregister.keys());
manager->registerDocumentation(m_filesToRegister.values());
if (manager->guiEngineNeedsUpdate()) {
// emit this signal to the help plugin, since we don't want
// to force gui help engine setup if we are not in help mode
emit documentationChanged();
}
m_filesToRegister.clear();
m_filesToUnregister.clear();
@@ -137,16 +143,6 @@ bool DocSettingsPage::matches(const QString &s) const
return m_searchKeywords.contains(s, Qt::CaseInsensitive);
}
QStringList DocSettingsPage::docsToRegister() const
{
return m_filesToRegister.values();
}
QStringList DocSettingsPage::docsToUnregister() const
{
return m_filesToUnregister.keys();
}
bool DocSettingsPage::eventFilter(QObject *object, QEvent *event)
{
if (object != m_ui.docsListWidget)