forked from qt-creator/qt-creator
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:
@@ -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)
|
||||
|
||||
Reference in New Issue
Block a user