diff options
author | kh1 <qt-info@nokia.com> | 2010-03-23 18:11:43 +0100 |
---|---|---|
committer | kh1 <qt-info@nokia.com> | 2010-03-23 18:13:12 +0100 |
commit | 6ac6be5db223d6c6b302c34a7e65b129605fb343 (patch) | |
tree | 567d43e0cfb3c310ff496e1323b571fb50498c41 /src/plugins/help/docsettingspage.cpp | |
parent | c3326eb627a11ca13d0ff2b8d131daa3ca457afd (diff) | |
download | qt-creator-6ac6be5db223d6c6b302c34a7e65b129605fb343.tar.gz |
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.
Diffstat (limited to 'src/plugins/help/docsettingspage.cpp')
-rw-r--r-- | src/plugins/help/docsettingspage.cpp | 20 |
1 files changed, 8 insertions, 12 deletions
diff --git a/src/plugins/help/docsettingspage.cpp b/src/plugins/help/docsettingspage.cpp index 0a5a603c03..5f1938bc80 100644 --- a/src/plugins/help/docsettingspage.cpp +++ b/src/plugins/help/docsettingspage.cpp @@ -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) |