Help plugin: Fix possible crash on documentation update.

We must not call updateFilterPage() when the "Options" dialog
is not currently open.
Without this patch, Creator will crash on a documentation update
if that dialog has been opened at least once and is currently closed.

Reviewed-by: kh1
Reviewed-by: con
This commit is contained in:
Christian Kandeler
2010-11-15 11:44:21 +01:00
parent e35c53e7f8
commit 5aedcb78a8
2 changed files with 7 additions and 1 deletions

View File

@@ -247,6 +247,12 @@ void FilterSettingsPage::apply()
}
}
void FilterSettingsPage::finish()
{
disconnect(Core::HelpManager::instance(), SIGNAL(documentationChanged()),
this, SLOT(updateFilterPage()));
}
bool FilterSettingsPage::matches(const QString &s) const
{
return m_searchKeywords.contains(s, Qt::CaseInsensitive);

View File

@@ -52,7 +52,7 @@ public:
QWidget *createPage(QWidget *parent);
void apply();
void finish() {}
void finish();
virtual bool matches(const QString &s) const;
signals: