summaryrefslogtreecommitdiff
path: root/src/plugins/subversion/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/subversion/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/subversion/settingspage.cpp')
-rw-r--r--src/plugins/subversion/settingspage.cpp22
1 files changed, 21 insertions, 1 deletions
diff --git a/src/plugins/subversion/settingspage.cpp b/src/plugins/subversion/settingspage.cpp
index 93b9ef0a1e..85ed2e7bfb 100644
--- a/src/plugins/subversion/settingspage.cpp
+++ b/src/plugins/subversion/settingspage.cpp
@@ -37,6 +37,7 @@
#include <utils/pathchooser.h>
#include <QtCore/QCoreApplication>
+#include <QtCore/QTextStream>
#include <QtGui/QFileDialog>
using namespace Subversion::Internal;
@@ -72,7 +73,19 @@ void SettingsPageWidget::setSettings(const SubversionSettings &s)
m_ui.promptToSubmitCheckBox->setChecked(s.promptToSubmit);
}
-SettingsPage::SettingsPage()
+QString SettingsPageWidget::searchKeywords() const
+{
+ QString rc;
+ QTextStream(&rc) << m_ui.commandLabel->text()
+ << ' ' << m_ui.usernameLabel->text()
+ << ' ' << m_ui.passwordLabel->text()
+ << ' ' << m_ui.userGroupBox->title();
+ rc.remove(QLatin1Char('&'));
+ return rc;
+}
+
+SettingsPage::SettingsPage() :
+ m_widget(0)
{
}
@@ -100,6 +113,8 @@ QWidget *SettingsPage::createPage(QWidget *parent)
{
m_widget = new SettingsPageWidget(parent);
m_widget->setSettings(SubversionPlugin::subversionPluginInstance()->settings());
+ if (m_searchKeywords.isEmpty())
+ m_searchKeywords = m_widget->searchKeywords();
return m_widget;
}
@@ -107,3 +122,8 @@ void SettingsPage::apply()
{
SubversionPlugin::subversionPluginInstance()->setSettings(m_widget->settings());
}
+
+bool SettingsPage::matches(const QString &s) const
+{
+ return m_searchKeywords.contains(s, Qt::CaseInsensitive);
+}