summaryrefslogtreecommitdiff
path: root/src/plugins/debugger/commonoptionspage.h
diff options
context:
space:
mode:
authorEike Ziller <eike.ziller@digia.com>2013-12-03 14:17:03 +0100
committerEike Ziller <eike.ziller@digia.com>2013-12-10 13:31:48 +0100
commitdeb43b4c8a261855252aeee09fd6df283576932e (patch)
treea844379f47974fd681b86aa2187735e03639b567 /src/plugins/debugger/commonoptionspage.h
parentea1a92484ac99057b06130a012164bf9788650e9 (diff)
downloadqt-creator-deb43b4c8a261855252aeee09fd6df283576932e.tar.gz
Preferences: Add default implementation for filtering
The default "matches" method now takes the widget and looks for all child labels, checkboxes, push buttons and group boxes. Because of that, the former "createWidget" method can be called multiple times without creating a new widget (-->widget()), and the "finished" method must ensure that the created widget gets deleted, since not all widgets that were created are added to the UI anymore. Change-Id: Ia231c7c78dd8819146668e6447d36d22e7836904 Reviewed-by: Eike Ziller <eike.ziller@digia.com>
Diffstat (limited to 'src/plugins/debugger/commonoptionspage.h')
-rw-r--r--src/plugins/debugger/commonoptionspage.h10
1 files changed, 3 insertions, 7 deletions
diff --git a/src/plugins/debugger/commonoptionspage.h b/src/plugins/debugger/commonoptionspage.h
index c09d1ccde4..bb5464abf3 100644
--- a/src/plugins/debugger/commonoptionspage.h
+++ b/src/plugins/debugger/commonoptionspage.h
@@ -60,7 +60,6 @@ class CommonOptionsPageWidget : public QWidget
public:
explicit CommonOptionsPageWidget(const QSharedPointer<Utils::SavedActionSet> &group, QWidget *parent = 0);
- QString searchKeyWords() const;
GlobalDebuggerOptions globalOptions() const;
void setGlobalOptions(const GlobalDebuggerOptions &go);
@@ -94,10 +93,9 @@ public:
~CommonOptionsPage();
// IOptionsPage
- QWidget *createPage(QWidget *parent);
+ QWidget *widget();
void apply();
void finish();
- bool matches(const QString &s) const;
static QString msgSetBreakpointAtFunction(const char *function);
static QString msgSetBreakpointAtFunctionToolTip(const char *function,
@@ -106,7 +104,6 @@ public:
private:
const QSharedPointer<GlobalDebuggerOptions> m_options;
QSharedPointer<Utils::SavedActionSet> m_group;
- QString m_searchKeywords;
QPointer<CommonOptionsPageWidget> m_widget;
};
@@ -123,15 +120,14 @@ public:
LocalsAndExpressionsOptionsPage();
// IOptionsPage
- QWidget *createPage(QWidget *parent);
+ QWidget *widget();
void apply();
void finish();
- bool matches(const QString &s) const;
private:
+ QPointer<QWidget> m_widget;
Ui::DebuggingHelperOptionPage m_ui;
Utils::SavedActionSet m_group;
- QString m_searchKeywords;
};
} // namespace Internal