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)
#endif
if (m_searchKeywords.isEmpty()) {
QTextStream(&m_searchKeywords) << m_page->colorLabel->text() << ' '
<< m_page->terminalLabel->text() << ' ' << m_page->editorLabel->text()
<< ' '<< m_page->modifiedLabel->text();
QLatin1Char sep(' ');
QTextStream(&m_searchKeywords)
<< 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('&'));
}
return w;
......
......@@ -12,7 +12,7 @@
</property>
<layout class="QVBoxLayout" name="verticalLayout">
<item>
<widget class="QGroupBox" name="groupBox_2">
<widget class="QGroupBox" name="interfaceBox">
<property name="title">
<string>User Interface</string>
</property>
......@@ -115,7 +115,7 @@
</widget>
</item>
<item>
<widget class="QGroupBox" name="groupBox">
<widget class="QGroupBox" name="systemBox">
<property name="title">
<string>System</string>
</property>
......
......@@ -76,10 +76,17 @@ void SettingsPageWidget::setSettings(const CVSSettings &s)
QString SettingsPageWidget::searchKeywords() const
{
QString rc;
QTextStream(&rc) << m_ui.promptToSubmitCheckBox->text()
<< ' ' << m_ui.describeByCommitIdCheckBox->text()
<< ' ' << m_ui.commandLabel->text()
<< ' ' << m_ui.rootLabel->text() << ' ' << m_ui.diffOptionsLabel->text();
QLatin1Char sep(' ');
QTextStream(&rc)
<< sep << m_ui.configGroupBox->title()
<< 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('&'));
return rc;
}
......
......@@ -12,7 +12,7 @@
</property>
<layout class="QVBoxLayout" name="verticalLayout">
<item>
<widget class="QGroupBox" name="miscGroupBox">
<widget class="QGroupBox" name="configGroupBox">
<property name="title">
<string>Configuration</string>
</property>
......@@ -25,7 +25,7 @@
</widget>
</item>
<item row="0" column="1">
<widget class="Utils::PathChooser" name="commandPathChooser"/>
<widget class="Utils::PathChooser" name="commandPathChooser" native="true"/>
</item>
<item row="1" column="0">
<widget class="QLabel" name="rootLabel">
......@@ -41,7 +41,7 @@
</widget>
</item>
<item>
<widget class="QGroupBox" name="miscGroupBox_2">
<widget class="QGroupBox" name="miscGroupBox">
<property name="title">
<string>Miscellaneous</string>
</property>
......
......@@ -12,7 +12,7 @@
</property>
<layout class="QVBoxLayout" name="verticalLayout">
<item>
<widget class="QGroupBox" name="groupBox">
<widget class="QGroupBox" name="behaviorBox">
<property name="title">
<string>GUI Behavior</string>
</property>
......
......@@ -619,14 +619,18 @@ QWidget *CommonOptionsPage::createPage(QWidget *parent)
#endif
if (m_searchKeywords.isEmpty()) {
QTextStream(&m_searchKeywords) << ' '
<< m_ui.checkBoxListSourceFiles->text()
<< ' ' << m_ui.checkBoxUseAlternatingRowColors->text()
<< ' ' << m_ui.checkBoxUseToolTipsInMainEditor->text()
QLatin1Char sep(' ');
QTextStream(&m_searchKeywords)
<< sep << m_ui.checkBoxUseAlternatingRowColors->text()
<< sep << m_ui.checkBoxUseToolTipsInMainEditor->text()
<< sep << m_ui.checkBoxListSourceFiles->text()
#ifdef Q_OS_WIN
<< ' ' << m_ui.checkBoxRegisterForPostMortem->text()
<< sep << m_ui.checkBoxRegisterForPostMortem->text()
#endif
<< ' ' << m_ui.labelMaximalStackDepth->text();
<< sep << m_ui.checkBoxCloseBuffersOnExit->text()
<< sep << m_ui.checkBoxSwitchModeOnExit->text()
<< sep << m_ui.labelMaximalStackDepth->text()
;
m_searchKeywords.remove(QLatin1Char('&'));
}
#ifndef Q_OS_WIN
......
......@@ -216,13 +216,22 @@ QWidget *GdbOptionsPage::createPage(QWidget *parent)
m_ui.labelEnvironment->hide();
if (m_searchKeywords.isEmpty()) {
// TODO: Add breakpoints, environment?
QTextStream(&m_searchKeywords) << ' ' << QLatin1String("gdb")
<< ' ' << m_ui.checkBoxSkipKnownFrames->text()
<< ' ' << m_ui.checkBoxEnableReverseDebugging->text()
<< ' ' << m_ui.checkBoxUseMessageBoxForSignals->text()
<< ' ' << m_ui.labelEnvironment->text()
<< ' ' << m_ui.labelGdbStartupScript->text();
QLatin1Char sep(' ');
QTextStream(&m_searchKeywords)
<< sep << m_ui.groupBoxLocations->title()
<< sep << m_ui.labelEnvironment->text()
<< sep << m_ui.labelGdbStartupScript->text()
<< sep << m_ui.labelGdbWatchdogTimeout->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('&'));
}
return w;
......
......@@ -6,8 +6,8 @@
<rect>
<x>0</x>
<y>0</y>
<width>472</width>
<height>421</height>
<width>513</width>
<height>445</height>
</rect>
</property>
<layout class="QVBoxLayout" name="verticalLayout_2">
......@@ -26,7 +26,7 @@
</widget>
</item>
<item>
<widget class="QGroupBox" name="groupBox">
<widget class="QGroupBox" name="behaviorBox">
<property name="title">
<string>Vim Behavior</string>
</property>
......
......@@ -199,19 +199,24 @@ QWidget *FakeVimOptionPage::createPage(QWidget *parent)
connect(m_ui.pushButtonSetPlainStyle, SIGNAL(clicked()),
this, SLOT(setPlainStyle()));
if (m_searchKeywords.isEmpty()) {
QLatin1Char sep(' ');
QTextStream(&m_searchKeywords)
<< ' ' << m_ui.checkBoxAutoIndent->text()
<< ' ' << m_ui.checkBoxExpandTab->text()
<< ' ' << m_ui.checkBoxShowMarks->text()
<< ' ' << m_ui.checkBoxSmartIndent->text()
<< ' ' << m_ui.checkBoxPassControlKey->text()
<< ' ' << m_ui.checkBoxHlSearch->text()
<< ' ' << m_ui.checkBoxIncSearch->text()
<< ' ' << m_ui.checkBoxSmartTab->text()
<< ' ' << m_ui.checkBoxStartOfLine->text()
<< ' ' << m_ui.labelShiftWidth->text()
<< ' ' << m_ui.labelTabulator->text()
<< ' ' << m_ui.labelBackspace->text();
<< sep << m_ui.checkBoxUseFakeVim->text()
<< sep << m_ui.checkBoxReadVimRc->text()
<< sep << m_ui.checkBoxAutoIndent->text()
<< sep << m_ui.checkBoxSmartIndent->text()
<< sep << m_ui.checkBoxExpandTab->text()
<< sep << m_ui.checkBoxSmartTab->text()
<< sep << m_ui.checkBoxHlSearch->text()
<< sep << m_ui.checkBoxIncSearch->text()
<< sep << m_ui.checkBoxStartOfLine->text()
<< sep << m_ui.checkBoxUseCoreSearch->text()
<< sep << m_ui.checkBoxShowMarks->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('&'));
}
return w;
......
......@@ -98,11 +98,19 @@ void SettingsPageWidget::setSystemPath()
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.promptToSubmitCheckBox->text()
<< ' ' << m_ui.environmentGroupBox->title();
QLatin1Char sep(' ');
QTextStream(&rc)
<< sep << m_ui.environmentGroupBox->title()
<< sep << m_ui.pathlabel->text()
<< 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('&'));
return rc;
}
......
......@@ -73,12 +73,18 @@ void OptionsPageWidget::setSettings(const MercurialSettings &s)
QString OptionsPageWidget::searchKeywords() const
{
QString rc;
QTextStream(&rc) << ' ' << m_ui.mercurialCommandLabel->text()
<< ' ' << m_ui.showLogEntriesLabel->text()
<< ' ' << m_ui.timeoutSecondsLabel->text()
<< ' ' << m_ui.promptOnSubmitCheckBox->text()
<< ' ' << m_ui.defaultUsernameLabel->text()
<< ' ' << m_ui.defaultEmailLabel->text();
QLatin1Char sep(' ');
QTextStream(&rc)
<< sep << m_ui.configGroupBox->title()
<< sep << m_ui.mercurialCommandLabel->text()
<< sep << m_ui.userGroupBox->title()
<< 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('&'));
return rc;
}
......
......@@ -15,7 +15,7 @@
</property>
<layout class="QVBoxLayout" name="verticalLayout">
<item>
<widget class="QGroupBox" name="configgroupBox">
<widget class="QGroupBox" name="configGroupBox">
<property name="title">
<string>Configuration</string>
</property>
......@@ -28,7 +28,7 @@
</widget>
</item>
<item row="0" column="1">
<widget class="Utils::PathChooser" name="commandChooser"/>
<widget class="Utils::PathChooser" name="commandChooser" native="true"/>
</item>
</layout>
</widget>
......@@ -147,6 +147,10 @@
<extends>QWidget</extends>
<header location="global">utils/pathchooser.h</header>
<container>1</container>
<slots>
<signal>editingFinished()</signal>
<signal>browsingFinished()</signal>
</slots>
</customwidget>
</customwidgets>
<resources/>
......
......@@ -117,10 +117,20 @@ void SettingsPageWidget::setStatusError(const QString &t)
QString SettingsPageWidget::searchKeywords() const
{
QString rc;
QTextStream(&rc) << m_ui.promptToSubmitCheckBox->text()
<< ' ' << m_ui.commandLabel << m_ui.environmentGroupBox->title()
<< ' ' << m_ui.clientLabel->text() << ' ' << m_ui.userLabel->text()
<< ' ' << m_ui.portLabel->text();
QLatin1Char sep(' ');
QTextStream(&rc)
<< sep << m_ui.configGroupBox->title()
<< 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('&'));
return rc;
}
......
......@@ -2,6 +2,14 @@
<ui version="4.0">
<class>Perforce::Internal::SettingsPage</class>
<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">
<item>
<widget class="QGroupBox" name="configGroupBox">
......@@ -37,12 +45,6 @@
<bool>false</bool>
</property>
<layout class="QGridLayout">
<property name="margin">
<number>9</number>
</property>
<property name="spacing">
<number>6</number>
</property>
<item row="1" column="1">
<widget class="QLineEdit" name="clientLineEdit"/>
</item>
......@@ -77,7 +79,7 @@
</widget>
</item>
<item>
<widget class="QGroupBox" name="miscgroupBox">
<widget class="QGroupBox" name="miscGroupBox">
<property name="title">
<string>Miscellaneous</string>
</property>
......
......@@ -116,7 +116,23 @@ void ProjectExplorerSettingsWidget::slotDirectoryButtonGroupChanged()
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
......
......@@ -63,6 +63,7 @@ private:
void setJomVisible(bool);
Ui::ProjectExplorerSettingsPageUi m_ui;
mutable QString m_searchKeywords;
};
class ProjectExplorerSettingsPage : public Core::IOptionsPage
......
......@@ -62,8 +62,8 @@ QString SettingsPageWidget::searchKeywords() const
{
QString rc;
QTextStream(&rc)
<< ' ' << m_ui.snapMarginLabel
<< ' ' << m_ui.itemSpacingLabel;
<< ' ' << m_ui.snapMarginLabel->text()
<< ' ' << m_ui.itemSpacingLabel->text();
rc.remove(QLatin1Char('&'));
return rc;
}
......
......@@ -106,8 +106,8 @@ QString QuickToolBarSettingsPageWidget::searchKeywords() const
{
QString rc;
QTextStream(&rc)
<< ' ' << m_ui.textEditHelperCheckBox
<< ' ' << m_ui.textEditHelperCheckBoxPin;
<< ' ' << m_ui.textEditHelperCheckBox->text()
<< ' ' << m_ui.textEditHelperCheckBoxPin->text();
rc.remove(QLatin1Char('&'));
return rc;
}
......
......@@ -875,11 +875,17 @@ QList<QSharedPointerQtVersion> QtOptionsPageWidget::versions() const
QString QtOptionsPageWidget::searchKeywords() const
{
QString rc;
QTextStream(&rc) << ' ' << m_ui->mingwLabel->text()
<< ' ' << m_ui->msvcLabel->text()
<< ' ' << m_ui->gcceLabel->text()
<< ' ' << m_ui->mwcLabel->text()
<< ' ' << m_ui->debuggingHelperLabel->text();
QLatin1Char sep(' ');
QTextStream(&rc)
<< sep << m_ui->versionNameLabel->text()
<< sep << m_ui->pathLabel->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('&'));
return rc;
}
......@@ -82,11 +82,19 @@ void SettingsPageWidget::setSettings(const SubversionSettings &s)
QString SettingsPageWidget::searchKeywords() const
{
QString rc;
QTextStream(&rc) << m_ui.commandLabel->text()
<< ' ' << m_ui.usernameLabel->text()
<< ' ' << m_ui.passwordLabel->text()
<< ' ' << m_ui.userGroupBox->title()
<< ' ' << m_ui.spaceIgnorantAnnotationCheckBox->text();
QLatin1Char sep(' ');
QTextStream(&rc)
<< sep << m_ui.generalGroupBox->title()
<< sep << m_ui.commandLabel->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('&'));
return rc;
}
......
......@@ -97,15 +97,27 @@ QWidget *BehaviorSettingsPage::createPage(QWidget *parent)
m_d->m_page.setupUi(w);
settingsToUI();
if (m_d->m_searchKeywords.isEmpty()) {
QTextStream(&m_d->m_searchKeywords) << m_d->m_page.insertSpaces->text()
<< ' ' << m_d->m_page.smartBackspace->text()
<< ' ' << m_d->m_page.cleanWhitespace->text()
<< ' ' << m_d->m_page.addFinalNewLine->text()
<< ' ' << m_d->m_page.mouseNavigation->text()
<< ' ' << m_d->m_page.scrollWheelZooming->text()
<< ' ' << m_d->m_page.groupBoxTabAndIndentSettings->title()
<< ' ' << m_d->m_page.groupBoxStorageSettings->title()
<< ' ' << m_d->m_page.groupBoxMouse->title();
QLatin1Char sep(' ');
QTextStream(&m_d->m_searchKeywords)
<< m_d->m_page.insertSpaces->text()
<< sep << m_d->m_page.autoInsertSpaces->text()
<< sep << m_d->m_page.autoIndent->text()
<< sep << m_d->m_page.smartBackspace->text()
<< sep << m_d->m_page.indentBlocksLabel->text()
<< sep << m_d->m_page.continuationAlignLabel->text()
<< sep << m_d->m_page.tabKeyIndentLabel->text()
<< sep << m_d->m_page.cleanWhitespace->text()
<< sep << m_d->m_page.inEntireDocument->text()
<< sep << m_d->m_page.cleanIndentation->text()
<< sep << m_d->m_page.addFinalNewLine->text()
<< sep << m_d->m_page.encodingLabel->text()
<< sep << m_d->m_page.utf8BomLabel->text()
<< sep << m_d->m_page.mouseNavigation->text()
<< sep << m_d->m_page.scrollWheelZooming->text()
<< sep << m_d->m_page.groupBoxTabAndIndentSettings->title()
<< sep << m_d->m_page.groupBoxStorageSettings->title()
<< sep << m_d->m_page.groupBoxEncodings->title()
<< sep << m_d->m_page.groupBoxMouse->title();
m_d->m_searchKeywords.remove(QLatin1Char('&'));
}
......
......@@ -437,7 +437,7 @@ Influences the indentation of continuation lines.
</spacer>
</item>
<item row="1" column="1">
<widget class="QGroupBox" name="groupBox">
<widget class="QGroupBox" name="groupBoxEncodings">
<property name="title">
<string>File Encodings</string>
</property>
......
......@@ -358,8 +358,17 @@ QWidget *FontSettingsPage::createPage(QWidget *parent)
updatePointSizes();
refreshColorSchemeList();
d_ptr->m_lastValue = d_ptr->m_value;
if (d_ptr->m_searchKeywords.isEmpty())
d_ptr->m_searchKeywords = d_ptr->ui.fontGroupBox->title() + QLatin1Char(' ') + d_ptr->ui.colorSchemeGroupBox->title();
if (d_ptr->m_searchKeywords.isEmpty()) {
QLatin1Char sep(' ');
d_ptr->m_searchKeywords =
d_ptr->ui.fontGroupBox->title() + sep
+ d_ptr->ui.familyLabel->text() + sep
+ d_ptr->ui.sizeLabel->text() + sep
+ d_ptr->ui.zoomLabel->text() + sep
+ d_ptr->ui.antialias->text() + sep
+ d_ptr->ui.colorSchemeGroupBox->title();
d_ptr->m_searchKeywords.remove(QLatin1Char('&'));
}
return w;
}
......
......@@ -6,7 +6,7 @@
<rect>
<x>0</x>
<y>0</y>
<width>402</width>
<width>521</width>
<height>306</height>
</rect>
</property>
......@@ -135,7 +135,7 @@
</spacer>
</item>
<item row="0" column="6">
<widget class="QLabel" name="label">
<widget class="QLabel" name="zoomLabel">
<property name="text">
<string>Zoom:</string>
</property>
......
......@@ -86,11 +86,12 @@ void CommonSettingsWidget::setSettings(const CommonVcsSettings &s)
QString CommonSettingsWidget::searchKeyWordMatchString() const
{
const QChar blank = QLatin1Char(' ');
QString rc = m_ui->submitMessageCheckScriptLabel->text();
rc += blank;
rc += m_ui->nickNameMailMapLabel->text();
rc += blank;
rc += m_ui->nickNameFieldsFileLabel->text();
QString rc = m_ui->lineWrapCheckBox->text()
+ blank + m_ui->submitMessageCheckScriptLabel->text()
+ blank + m_ui->nickNameMailMapLabel->text()
+ blank + m_ui->nickNameFieldsFileLabel->text()
+ blank + m_ui->sshPromptLabel->text()
;
rc.remove(QLatin1Char('&')); // Strip buddy markers.
return rc;
}
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment