summaryrefslogtreecommitdiff
path: root/src/plugins/git/settingspage.cpp
diff options
context:
space:
mode:
authorFriedemann Kleint <Friedemann.Kleint@nokia.com>2009-11-24 15:05:02 +0100
committerFriedemann Kleint <Friedemann.Kleint@nokia.com>2009-11-24 15:05:02 +0100
commit65e11062bb1671328e16736db9f2668ba87e5edb (patch)
treebd364c5c34790d52bdbf77a5950542ca522223f0 /src/plugins/git/settingspage.cpp
parentc49bed119986350efa577876efc855d6d5f0d293 (diff)
downloadqt-creator-65e11062bb1671328e16736db9f2668ba87e5edb.tar.gz
Polish the settings dialog.
Add a title label to the pages. Use QGroupBoxes throughout. Extend SavedAction to work with checkable QGroupBoxes. Polish UI files, use common layout for VCS plugins. Performance: Apply only visited settings pages. Add search keywords. Task-number: QTCREATOR-26
Diffstat (limited to 'src/plugins/git/settingspage.cpp')
-rw-r--r--src/plugins/git/settingspage.cpp24
1 files changed, 23 insertions, 1 deletions
diff --git a/src/plugins/git/settingspage.cpp b/src/plugins/git/settingspage.cpp
index 9060bdd762..56094f3994 100644
--- a/src/plugins/git/settingspage.cpp
+++ b/src/plugins/git/settingspage.cpp
@@ -36,6 +36,7 @@
#include <QtCore/QCoreApplication>
#include <QtCore/QFileInfo>
#include <QtCore/QDebug>
+#include <QtCore/QTextStream>
#include <QtGui/QMessageBox>
namespace Git {
@@ -75,8 +76,21 @@ void SettingsPageWidget::setSystemPath()
m_ui.pathLineEdit->setText(QLatin1String(qgetenv("PATH")));
}
+QString SettingsPageWidget::searchKeywords() const
+{
+ QString rc;
+ QTextStream(&rc) << ' ' << m_ui.pathlabel->text() << ' ' << m_ui.logCountLabel->text()
+ << ' ' << m_ui.timeoutLabel->text()
+ << ' ' << m_ui.promptToSubmitCheckBox->text()
+ << ' ' << m_ui.omitAnnotationDataCheckBox->text()
+ << ' ' << m_ui.environmentGroupBox->title();
+ rc.remove(QLatin1Char('&'));
+ return rc;
+}
+
// -------- SettingsPage
-SettingsPage::SettingsPage()
+SettingsPage::SettingsPage() :
+ m_widget(0)
{
}
@@ -104,6 +118,8 @@ QWidget *SettingsPage::createPage(QWidget *parent)
{
m_widget = new SettingsPageWidget(parent);
m_widget->setSettings(GitPlugin::instance()->settings());
+ if (m_searchKeywords.isEmpty())
+ m_searchKeywords = m_widget->searchKeywords();
return m_widget;
}
@@ -121,5 +137,11 @@ void SettingsPage::apply()
GitPlugin::instance()->setSettings(newSettings);
}
+
+bool SettingsPage::matches(const QString &s) const
+{
+ return m_searchKeywords.contains(s, Qt::CaseInsensitive);
+}
+
}
}