OSDN Git Service

Help plugin: Fix possible crash on documentation update.
authorChristian Kandeler <christian.kandeler@nokia.com>
Mon, 15 Nov 2010 10:44:21 +0000 (11:44 +0100)
committerChristian Kandeler <christian.kandeler@nokia.com>
Mon, 15 Nov 2010 11:12:09 +0000 (12:12 +0100)
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
src/plugins/help/filtersettingspage.cpp
src/plugins/help/filtersettingspage.h

index faf02d9..f114b6f 100644 (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);
index 1af5549..0968b1d 100644 (file)
@@ -52,7 +52,7 @@ public:
 
     QWidget *createPage(QWidget *parent);
     void apply();
-    void finish() {}
+    void finish();
     virtual bool matches(const QString &s) const;
 
 signals: