Commit c598118d authored by con's avatar con
Browse files

Update the filter matches for the settings dialog.

Task-number: QTCREATORBUG-2936
parent e650076f
...@@ -167,9 +167,15 @@ QWidget *GeneralSettings::createPage(QWidget *parent) ...@@ -167,9 +167,15 @@ QWidget *GeneralSettings::createPage(QWidget *parent)
#endif #endif
if (m_searchKeywords.isEmpty()) { if (m_searchKeywords.isEmpty()) {
QTextStream(&m_searchKeywords) << m_page->colorLabel->text() << ' ' QLatin1Char sep(' ');
<< m_page->terminalLabel->text() << ' ' << m_page->editorLabel->text() QTextStream(&m_searchKeywords)
<< ' '<< m_page->modifiedLabel->text(); << m_page->interfaceBox->title() << sep
<< m_page->colorLabel->text() << sep
<< m_page->languageLabel->text() << sep
<< m_page->systemBox->title() << sep
<< m_page->terminalLabel->text() << sep
<< m_page->editorLabel->text() << sep
<< m_page->modifiedLabel->text();
m_searchKeywords.remove(QLatin1Char('&')); m_searchKeywords.remove(QLatin1Char('&'));
} }
return w; return w;
......
...@@ -12,7 +12,7 @@ ...@@ -12,7 +12,7 @@
</property> </property>
<layout class="QVBoxLayout" name="verticalLayout"> <layout class="QVBoxLayout" name="verticalLayout">
<item> <item>
<widget class="QGroupBox" name="groupBox_2"> <widget class="QGroupBox" name="interfaceBox">
<property name="title"> <property name="title">
<string>User Interface</string> <string>User Interface</string>
</property> </property>
...@@ -115,7 +115,7 @@ ...@@ -115,7 +115,7 @@
</widget> </widget>
</item> </item>
<item> <item>
<widget class="QGroupBox" name="groupBox"> <widget class="QGroupBox" name="systemBox">
<property name="title"> <property name="title">
<string>System</string> <string>System</string>
</property> </property>
......
...@@ -76,10 +76,17 @@ void SettingsPageWidget::setSettings(const CVSSettings &s) ...@@ -76,10 +76,17 @@ void SettingsPageWidget::setSettings(const CVSSettings &s)
QString SettingsPageWidget::searchKeywords() const QString SettingsPageWidget::searchKeywords() const
{ {
QString rc; QString rc;
QTextStream(&rc) << m_ui.promptToSubmitCheckBox->text() QLatin1Char sep(' ');
<< ' ' << m_ui.describeByCommitIdCheckBox->text() QTextStream(&rc)
<< ' ' << m_ui.commandLabel->text() << sep << m_ui.configGroupBox->title()
<< ' ' << m_ui.rootLabel->text() << ' ' << m_ui.diffOptionsLabel->text(); << sep << m_ui.commandLabel->text()
<< sep << m_ui.rootLabel->text()
<< sep << m_ui.miscGroupBox->title()
<< sep << m_ui.timeOutLabel->text()
<< sep << m_ui.diffOptionsLabel->text()
<< sep << m_ui.promptToSubmitCheckBox->text()
<< sep << m_ui.describeByCommitIdCheckBox->text()
;
rc.remove(QLatin1Char('&')); rc.remove(QLatin1Char('&'));
return rc; return rc;
} }
......
...@@ -12,7 +12,7 @@ ...@@ -12,7 +12,7 @@
</property> </property>
<layout class="QVBoxLayout" name="verticalLayout"> <layout class="QVBoxLayout" name="verticalLayout">
<item> <item>
<widget class="QGroupBox" name="miscGroupBox"> <widget class="QGroupBox" name="configGroupBox">
<property name="title"> <property name="title">
<string>Configuration</string> <string>Configuration</string>
</property> </property>
...@@ -25,7 +25,7 @@ ...@@ -25,7 +25,7 @@
</widget> </widget>
</item> </item>
<item row="0" column="1"> <item row="0" column="1">
<widget class="Utils::PathChooser" name="commandPathChooser"/> <widget class="Utils::PathChooser" name="commandPathChooser" native="true"/>
</item> </item>
<item row="1" column="0"> <item row="1" column="0">
<widget class="QLabel" name="rootLabel"> <widget class="QLabel" name="rootLabel">
...@@ -41,7 +41,7 @@ ...@@ -41,7 +41,7 @@
</widget> </widget>
</item> </item>
<item> <item>
<widget class="QGroupBox" name="miscGroupBox_2"> <widget class="QGroupBox" name="miscGroupBox">
<property name="title"> <property name="title">
<string>Miscellaneous</string> <string>Miscellaneous</string>
</property> </property>
......
...@@ -12,7 +12,7 @@ ...@@ -12,7 +12,7 @@
</property> </property>
<layout class="QVBoxLayout" name="verticalLayout"> <layout class="QVBoxLayout" name="verticalLayout">
<item> <item>
<widget class="QGroupBox" name="groupBox"> <widget class="QGroupBox" name="behaviorBox">
<property name="title"> <property name="title">
<string>GUI Behavior</string> <string>GUI Behavior</string>
</property> </property>
......
...@@ -619,14 +619,18 @@ QWidget *CommonOptionsPage::createPage(QWidget *parent) ...@@ -619,14 +619,18 @@ QWidget *CommonOptionsPage::createPage(QWidget *parent)
#endif #endif
if (m_searchKeywords.isEmpty()) { if (m_searchKeywords.isEmpty()) {
QTextStream(&m_searchKeywords) << ' ' QLatin1Char sep(' ');
<< m_ui.checkBoxListSourceFiles->text() QTextStream(&m_searchKeywords)
<< ' ' << m_ui.checkBoxUseAlternatingRowColors->text() << sep << m_ui.checkBoxUseAlternatingRowColors->text()
<< ' ' << m_ui.checkBoxUseToolTipsInMainEditor->text() << sep << m_ui.checkBoxUseToolTipsInMainEditor->text()
<< sep << m_ui.checkBoxListSourceFiles->text()
#ifdef Q_OS_WIN #ifdef Q_OS_WIN
<< ' ' << m_ui.checkBoxRegisterForPostMortem->text() << sep << m_ui.checkBoxRegisterForPostMortem->text()
#endif #endif
<< ' ' << m_ui.labelMaximalStackDepth->text(); << sep << m_ui.checkBoxCloseBuffersOnExit->text()
<< sep << m_ui.checkBoxSwitchModeOnExit->text()
<< sep << m_ui.labelMaximalStackDepth->text()
;
m_searchKeywords.remove(QLatin1Char('&')); m_searchKeywords.remove(QLatin1Char('&'));
} }
#ifndef Q_OS_WIN #ifndef Q_OS_WIN
......
...@@ -216,13 +216,22 @@ QWidget *GdbOptionsPage::createPage(QWidget *parent) ...@@ -216,13 +216,22 @@ QWidget *GdbOptionsPage::createPage(QWidget *parent)
m_ui.labelEnvironment->hide(); m_ui.labelEnvironment->hide();
if (m_searchKeywords.isEmpty()) { if (m_searchKeywords.isEmpty()) {
// TODO: Add breakpoints, environment? QLatin1Char sep(' ');
QTextStream(&m_searchKeywords) << ' ' << QLatin1String("gdb") QTextStream(&m_searchKeywords)
<< ' ' << m_ui.checkBoxSkipKnownFrames->text() << sep << m_ui.groupBoxLocations->title()
<< ' ' << m_ui.checkBoxEnableReverseDebugging->text() << sep << m_ui.labelEnvironment->text()
<< ' ' << m_ui.checkBoxUseMessageBoxForSignals->text() << sep << m_ui.labelGdbStartupScript->text()
<< ' ' << m_ui.labelEnvironment->text() << sep << m_ui.labelGdbWatchdogTimeout->text()
<< ' ' << m_ui.labelGdbStartupScript->text(); << sep << m_ui.checkBoxEnableReverseDebugging->text()
<< sep << m_ui.checkBoxSkipKnownFrames->text()
<< sep << m_ui.checkBoxUseMessageBoxForSignals->text()
<< sep << m_ui.checkBoxAdjustBreakpointLocations->text()
<< sep << m_ui.groupBoxPluginDebugging->title()
<< sep << m_ui.radioButtonAllPluginBreakpoints->text()
<< sep << m_ui.radioButtonSelectedPluginBreakpoints->text()
<< sep << m_ui.labelSelectedPluginBreakpoints->text()
<< sep << m_ui.radioButtonNoPluginBreakpoints->text()
;
m_searchKeywords.remove(QLatin1Char('&')); m_searchKeywords.remove(QLatin1Char('&'));
} }
return w; return w;
......
...@@ -6,8 +6,8 @@ ...@@ -6,8 +6,8 @@
<rect> <rect>
<x>0</x> <x>0</x>
<y>0</y> <y>0</y>
<width>472</width> <width>513</width>
<height>421</height> <height>445</height>
</rect> </rect>
</property> </property>
<layout class="QVBoxLayout" name="verticalLayout_2"> <layout class="QVBoxLayout" name="verticalLayout_2">
...@@ -26,7 +26,7 @@ ...@@ -26,7 +26,7 @@
</widget> </widget>
</item> </item>
<item> <item>
<widget class="QGroupBox" name="groupBox"> <widget class="QGroupBox" name="behaviorBox">
<property name="title"> <property name="title">
<string>Vim Behavior</string> <string>Vim Behavior</string>
</property> </property>
......
...@@ -199,19 +199,24 @@ QWidget *FakeVimOptionPage::createPage(QWidget *parent) ...@@ -199,19 +199,24 @@ QWidget *FakeVimOptionPage::createPage(QWidget *parent)
connect(m_ui.pushButtonSetPlainStyle, SIGNAL(clicked()), connect(m_ui.pushButtonSetPlainStyle, SIGNAL(clicked()),
this, SLOT(setPlainStyle())); this, SLOT(setPlainStyle()));
if (m_searchKeywords.isEmpty()) { if (m_searchKeywords.isEmpty()) {
QLatin1Char sep(' ');
QTextStream(&m_searchKeywords) QTextStream(&m_searchKeywords)
<< ' ' << m_ui.checkBoxAutoIndent->text() << sep << m_ui.checkBoxUseFakeVim->text()
<< ' ' << m_ui.checkBoxExpandTab->text() << sep << m_ui.checkBoxReadVimRc->text()
<< ' ' << m_ui.checkBoxShowMarks->text() << sep << m_ui.checkBoxAutoIndent->text()
<< ' ' << m_ui.checkBoxSmartIndent->text() << sep << m_ui.checkBoxSmartIndent->text()
<< ' ' << m_ui.checkBoxPassControlKey->text() << sep << m_ui.checkBoxExpandTab->text()
<< ' ' << m_ui.checkBoxHlSearch->text() << sep << m_ui.checkBoxSmartTab->text()
<< ' ' << m_ui.checkBoxIncSearch->text() << sep << m_ui.checkBoxHlSearch->text()
<< ' ' << m_ui.checkBoxSmartTab->text() << sep << m_ui.checkBoxIncSearch->text()
<< ' ' << m_ui.checkBoxStartOfLine->text() << sep << m_ui.checkBoxStartOfLine->text()
<< ' ' << m_ui.labelShiftWidth->text() << sep << m_ui.checkBoxUseCoreSearch->text()
<< ' ' << m_ui.labelTabulator->text() << sep << m_ui.checkBoxShowMarks->text()
<< ' ' << m_ui.labelBackspace->text(); << sep << m_ui.checkBoxPassControlKey->text()
<< sep << m_ui.labelShiftWidth->text()
<< sep << m_ui.labelTabulator->text()
<< sep << m_ui.labelBackspace->text()
<< sep << m_ui.labelIsKeyword->text();
m_searchKeywords.remove(QLatin1Char('&')); m_searchKeywords.remove(QLatin1Char('&'));
} }
return w; return w;
......
...@@ -98,11 +98,19 @@ void SettingsPageWidget::setSystemPath() ...@@ -98,11 +98,19 @@ void SettingsPageWidget::setSystemPath()
QString SettingsPageWidget::searchKeywords() const QString SettingsPageWidget::searchKeywords() const
{ {
QString rc; QString rc;
QTextStream(&rc) << ' ' << m_ui.pathlabel->text() << ' ' << m_ui.logCountLabel->text() QLatin1Char sep(' ');
<< ' ' << m_ui.timeoutLabel->text() QTextStream(&rc)
<< ' ' << m_ui.promptToSubmitCheckBox->text() << sep << m_ui.environmentGroupBox->title()
<< ' ' << m_ui.promptToSubmitCheckBox->text() << sep << m_ui.pathlabel->text()
<< ' ' << m_ui.environmentGroupBox->title(); << sep << m_ui.winHomeCheckBox->text()
<< sep << m_ui.groupBox->title()
<< sep << m_ui.logCountLabel->text()
<< sep << m_ui.timeoutLabel->text()
<< sep << m_ui.promptToSubmitCheckBox->text()
<< sep << m_ui.promptToSubmitCheckBox->text()
<< sep << m_ui.gitkGroupBox->title()
<< sep << m_ui.gitkOptionsLabel->text()
;
rc.remove(QLatin1Char('&')); rc.remove(QLatin1Char('&'));
return rc; return rc;
} }
......
...@@ -73,12 +73,18 @@ void OptionsPageWidget::setSettings(const MercurialSettings &s) ...@@ -73,12 +73,18 @@ void OptionsPageWidget::setSettings(const MercurialSettings &s)
QString OptionsPageWidget::searchKeywords() const QString OptionsPageWidget::searchKeywords() const
{ {
QString rc; QString rc;
QTextStream(&rc) << ' ' << m_ui.mercurialCommandLabel->text() QLatin1Char sep(' ');
<< ' ' << m_ui.showLogEntriesLabel->text() QTextStream(&rc)
<< ' ' << m_ui.timeoutSecondsLabel->text() << sep << m_ui.configGroupBox->title()
<< ' ' << m_ui.promptOnSubmitCheckBox->text() << sep << m_ui.mercurialCommandLabel->text()
<< ' ' << m_ui.defaultUsernameLabel->text() << sep << m_ui.userGroupBox->title()
<< ' ' << m_ui.defaultEmailLabel->text(); << sep << m_ui.defaultUsernameLabel->text()
<< sep << m_ui.defaultEmailLabel->text()
<< sep << m_ui.miscGroupBox->title()
<< sep << m_ui.showLogEntriesLabel->text()
<< sep << m_ui.timeoutSecondsLabel->text()
<< sep << m_ui.promptOnSubmitCheckBox->text()
;
rc.remove(QLatin1Char('&')); rc.remove(QLatin1Char('&'));
return rc; return rc;
} }
......
...@@ -15,7 +15,7 @@ ...@@ -15,7 +15,7 @@
</property> </property>
<layout class="QVBoxLayout" name="verticalLayout"> <layout class="QVBoxLayout" name="verticalLayout">
<item> <item>
<widget class="QGroupBox" name="configgroupBox"> <widget class="QGroupBox" name="configGroupBox">
<property name="title"> <property name="title">
<string>Configuration</string> <string>Configuration</string>
</property> </property>
...@@ -28,7 +28,7 @@ ...@@ -28,7 +28,7 @@
</widget> </widget>
</item> </item>
<item row="0" column="1"> <item row="0" column="1">
<widget class="Utils::PathChooser" name="commandChooser"/> <widget class="Utils::PathChooser" name="commandChooser" native="true"/>
</item> </item>
</layout> </layout>
</widget> </widget>
...@@ -147,6 +147,10 @@ ...@@ -147,6 +147,10 @@
<extends>QWidget</extends> <extends>QWidget</extends>
<header location="global">utils/pathchooser.h</header> <header location="global">utils/pathchooser.h</header>
<container>1</container> <container>1</container>
<slots>
<signal>editingFinished()</signal>
<signal>browsingFinished()</signal>
</slots>
</customwidget> </customwidget>
</customwidgets> </customwidgets>
<resources/> <resources/>
......
...@@ -117,10 +117,20 @@ void SettingsPageWidget::setStatusError(const QString &t) ...@@ -117,10 +117,20 @@ void SettingsPageWidget::setStatusError(const QString &t)
QString SettingsPageWidget::searchKeywords() const QString SettingsPageWidget::searchKeywords() const
{ {
QString rc; QString rc;
QTextStream(&rc) << m_ui.promptToSubmitCheckBox->text() QLatin1Char sep(' ');
<< ' ' << m_ui.commandLabel << m_ui.environmentGroupBox->title() QTextStream(&rc)
<< ' ' << m_ui.clientLabel->text() << ' ' << m_ui.userLabel->text() << sep << m_ui.configGroupBox->title()
<< ' ' << m_ui.portLabel->text(); << sep << m_ui.commandLabel->text()
<< sep << m_ui.environmentGroupBox->title()
<< sep << m_ui.portLabel->text()
<< sep << m_ui.clientLabel->text()
<< sep << m_ui.userLabel->text()
<< sep << m_ui.miscGroupBox->title()
<< sep << m_ui.logCountLabel->text()
<< sep << m_ui.timeOutLabel->text()
<< sep << m_ui.promptToSubmitCheckBox->text()
<< sep << m_ui.autoOpenCheckBox->text()
;
rc.remove(QLatin1Char('&')); rc.remove(QLatin1Char('&'));
return rc; return rc;
} }
......
...@@ -2,6 +2,14 @@ ...@@ -2,6 +2,14 @@
<ui version="4.0"> <ui version="4.0">
<class>Perforce::Internal::SettingsPage</class> <class>Perforce::Internal::SettingsPage</class>
<widget class="QWidget" name="Perforce::Internal::SettingsPage"> <widget class="QWidget" name="Perforce::Internal::SettingsPage">
<property name="geometry">
<rect>
<x>0</x>
<y>0</y>
<width>306</width>
<height>516</height>
</rect>
</property>
<layout class="QVBoxLayout" name="verticalLayout"> <layout class="QVBoxLayout" name="verticalLayout">
<item> <item>
<widget class="QGroupBox" name="configGroupBox"> <widget class="QGroupBox" name="configGroupBox">
...@@ -37,12 +45,6 @@ ...@@ -37,12 +45,6 @@
<bool>false</bool> <bool>false</bool>
</property> </property>
<layout class="QGridLayout"> <layout class="QGridLayout">
<property name="margin">
<number>9</number>
</property>
<property name="spacing">
<number>6</number>
</property>
<item row="1" column="1"> <item row="1" column="1">
<widget class="QLineEdit" name="clientLineEdit"/> <widget class="QLineEdit" name="clientLineEdit"/>
</item> </item>
...@@ -77,7 +79,7 @@ ...@@ -77,7 +79,7 @@
</widget> </widget>
</item> </item>
<item> <item>
<widget class="QGroupBox" name="miscgroupBox"> <widget class="QGroupBox" name="miscGroupBox">
<property name="title"> <property name="title">
<string>Miscellaneous</string> <string>Miscellaneous</string>
</property> </property>
......
...@@ -116,7 +116,23 @@ void ProjectExplorerSettingsWidget::slotDirectoryButtonGroupChanged() ...@@ -116,7 +116,23 @@ void ProjectExplorerSettingsWidget::slotDirectoryButtonGroupChanged()
QString ProjectExplorerSettingsWidget::searchKeywords() const QString ProjectExplorerSettingsWidget::searchKeywords() const
{ {
return QLatin1String("jom") + QLatin1Char(' ') + m_ui.directoryGroupBox->title(); if (m_searchKeywords.isEmpty()) {
QLatin1Char sep(' ');
m_searchKeywords = m_ui.directoryGroupBox->title()
+ sep + m_ui.currentDirectoryRadioButton->text()
+ sep + m_ui.directoryRadioButton->text()
+ sep + m_ui.buildAndRunGroupBox->title()
+ sep + m_ui.saveAllFilesCheckBox->text()
+ sep + m_ui.buildProjectBeforeDeployCheckBox->text()
+ sep + m_ui.deployProjectBeforeRunCheckBox->text()
+ sep + m_ui.showCompileOutputCheckBox->text()
+ sep + m_ui.cleanOldAppOutputCheckBox->text()
+ sep + m_ui.wrapAppOutputCheckBox->text()
+ sep + m_ui.jomLabel->text()
;
m_searchKeywords.remove(QLatin1Char('&'));
}
return m_searchKeywords;
} }
// ------------------ ProjectExplorerSettingsPage // ------------------ ProjectExplorerSettingsPage
......
...@@ -63,6 +63,7 @@ private: ...@@ -63,6 +63,7 @@ private:
void setJomVisible(bool); void setJomVisible(bool);
Ui::ProjectExplorerSettingsPageUi m_ui; Ui::ProjectExplorerSettingsPageUi m_ui;
mutable QString m_searchKeywords;
}; };
class ProjectExplorerSettingsPage : public Core::IOptionsPage class ProjectExplorerSettingsPage : public Core::IOptionsPage
......
...@@ -62,8 +62,8 @@ QString SettingsPageWidget::searchKeywords() const ...@@ -62,8 +62,8 @@ QString SettingsPageWidget::searchKeywords() const
{ {
QString rc; QString rc;
QTextStream(&rc) QTextStream(&rc)
<< ' ' << m_ui.snapMarginLabel << ' ' << m_ui.snapMarginLabel->text()
<< ' ' << m_ui.itemSpacingLabel; << ' ' << m_ui.itemSpacingLabel->text();
rc.remove(QLatin1Char('&')); rc.remove(QLatin1Char('&'));
return rc; return rc;
} }
......
...@@ -106,8 +106,8 @@ QString QuickToolBarSettingsPageWidget::searchKeywords() const ...@@ -106,8 +106,8 @@ QString QuickToolBarSettingsPageWidget::searchKeywords() const
{ {
QString rc; QString rc;
QTextStream(&rc) QTextStream(&rc)
<< ' ' << m_ui.textEditHelperCheckBox << ' ' << m_ui.textEditHelperCheckBox->text()
<< ' ' << m_ui.textEditHelperCheckBoxPin; << ' ' << m_ui.textEditHelperCheckBoxPin->text();
rc.remove(QLatin1Char('&')); rc.remove(QLatin1Char('&'));
return rc; return rc;
} }
......
...@@ -875,11 +875,17 @@ QList<QSharedPointerQtVersion> QtOptionsPageWidget::versions() const ...@@ -875,11 +875,17 @@ QList<QSharedPointerQtVersion> QtOptionsPageWidget::versions() const
QString QtOptionsPageWidget::searchKeywords() const QString QtOptionsPageWidget::searchKeywords() const
{ {
QString rc; QString rc;
QTextStream(&rc) << ' ' << m_ui->mingwLabel->text() QLatin1Char sep(' ');
<< ' ' << m_ui->msvcLabel->text() QTextStream(&rc)
<< ' ' << m_ui->gcceLabel->text() << sep << m_ui->versionNameLabel->text()
<< ' ' << m_ui->mwcLabel->text() << sep << m_ui->pathLabel->text()
<< ' ' << m_ui->debuggingHelperLabel->text(); << sep << m_ui->mingwLabel->text()
<< sep << m_ui->msvcLabel->text()
<< sep << m_ui->s60SDKLabel->text()
<< sep << m_ui->gcceLabel->text()
<< sep << m_ui->mwcLabel->text()
<< sep << m_ui->sbsV2Label->text()
<< sep << m_ui->debuggingHelperLabel->text();
rc.remove(QLatin1Char('&')); rc.remove(QLatin1Char('&'));
return rc; return rc;
} }
...@@ -82,11 +82,19 @@ void SettingsPageWidget::setSettings(const SubversionSettings &s) ...@@ -82,11 +82,19 @@ void SettingsPageWidget::setSettings(const SubversionSettings &s)
QString SettingsPageWidget::searchKeywords() const QString SettingsPageWidget::searchKeywords() const
{ {
QString rc; QString rc;
QTextStream(&rc) << m_ui.commandLabel->text() QLatin1Char sep(' ');
<< ' ' << m_ui.usernameLabel->text() QTextStream(&rc)
<< ' ' << m_ui.passwordLabel->text() << sep << m_ui.generalGroupBox->title()
<< ' ' << m_ui.userGroupBox->title() << sep << m_ui.commandLabel->text()
<< ' ' << m_ui.spaceIgnorantAnnotationCheckBox->text(); << sep << m_ui.userGroupBox->title()
<< sep << m_ui.usernameLabel->text()
<< sep << m_ui.passwordLabel->text()
<< sep << m_ui.miscGroupBox->title()
<< sep << m_ui.logCountLabel->text()
<< sep << m_ui.timeOutLabel->text()
<< sep << m_ui.promptToSubmitCheckBox->text()
<< sep << m_ui.spaceIgnorantAnnotationCheckBox->text()
;
rc.remove(QLatin1Char('&'));