diff --git a/src/libs/utils/savedaction.cpp b/src/libs/utils/savedaction.cpp index e3833bebb6e..a4b94bcd7bc 100644 --- a/src/libs/utils/savedaction.cpp +++ b/src/libs/utils/savedaction.cpp @@ -42,6 +42,7 @@ #include #include #include +#include using namespace Utils; @@ -238,19 +239,17 @@ QAction *SavedAction::updatedAction(const QString &text0) \sa settingsKey(), settingsGroup(), writeSettings() */ -void SavedAction::readSettings(QSettings *settings) +void SavedAction::readSettings(const QSettings *settings) { if (m_settingsGroup.isEmpty() || m_settingsKey.isEmpty()) return; - settings->beginGroup(m_settingsGroup); - QVariant var = settings->value(m_settingsKey, m_defaultValue); + QVariant var = settings->value(m_settingsGroup + QLatin1Char('/') + m_settingsKey, m_defaultValue); // work around old ini files containing @Invalid() entries if (isCheckable() && !var.isValid()) var = false; setValue(var); //qDebug() << "READING: " << var.isValid() << m_settingsKey << " -> " << m_value // << " (default: " << m_defaultValue << ")" << var; - settings->endGroup(); } /* @@ -314,6 +313,11 @@ void SavedAction::connectWidget(QWidget *widget, ApplyMode applyMode) this, SLOT(pathChooserEditingFinished())); connect(pathChooser, SIGNAL(browsingFinished()), this, SLOT(pathChooserEditingFinished())); + } else if (QGroupBox *groupBox= qobject_cast(widget)) { + if (!groupBox->isCheckable()) + qDebug() << "connectWidget to non-checkable group box" << widget << toString(); + groupBox->setChecked(m_value.toBool()); + connect(groupBox, SIGNAL(toggled(bool)), this, SLOT(groupBoxToggled(bool))); } else { qDebug() << "Cannot connect widget " << widget << toString(); } @@ -339,6 +343,8 @@ void SavedAction::apply(QSettings *s) setValue(spinBox->value()); else if (PathChooser *pathChooser = qobject_cast(m_widget)) setValue(pathChooser->path()); + else if (const QGroupBox *groupBox= qobject_cast(m_widget)) + setValue(groupBox->isChecked()); if (s) writeSettings(s); } @@ -392,6 +398,12 @@ void SavedAction::pathChooserEditingFinished() setValue(pathChooser->path()); } +void SavedAction::groupBoxToggled(bool checked) +{ + if (m_applyMode == ImmediateApply) + setValue(QVariant(checked)); +} + void SavedAction::actionTriggered(bool) { if (isCheckable()) @@ -436,3 +448,16 @@ void SavedActionSet::finish() action->disconnectWidget(); } +QString SavedActionSet::searchKeyWords() const +{ + const QChar blank = QLatin1Char(' '); + QString rc; + foreach (SavedAction *action, m_list) { + if (!rc.isEmpty()) + rc += blank; + rc += action->text(); + } + rc.remove(QLatin1Char('&')); + return rc; +} + diff --git a/src/libs/utils/savedaction.h b/src/libs/utils/savedaction.h index 4306a800bd9..abfb8d14377 100644 --- a/src/libs/utils/savedaction.h +++ b/src/libs/utils/savedaction.h @@ -70,7 +70,7 @@ public: virtual QString settingsGroup() const; Q_SLOT virtual void setSettingsGroup(const QString &group); - virtual void readSettings(QSettings *settings); + virtual void readSettings(const QSettings *settings); Q_SLOT virtual void writeSettings(QSettings *settings); virtual void connectWidget(QWidget *widget, ApplyMode applyMode = DeferedApply); @@ -93,6 +93,7 @@ private: Q_SLOT void actionTriggered(bool); Q_SLOT void spinBoxValueChanged(int); Q_SLOT void spinBoxValueChanged(QString); + Q_SLOT void groupBoxToggled(bool checked); QVariant m_value; QVariant m_defaultValue; @@ -115,6 +116,9 @@ public: void finish(); void clear() { m_list.clear(); } + // Search keywords for options dialog search. + QString searchKeyWords() const; + private: QList m_list; }; diff --git a/src/plugins/cmakeprojectmanager/cmakeprojectmanager.cpp b/src/plugins/cmakeprojectmanager/cmakeprojectmanager.cpp index e9788ca9b67..313f0b8fdf2 100644 --- a/src/plugins/cmakeprojectmanager/cmakeprojectmanager.cpp +++ b/src/plugins/cmakeprojectmanager/cmakeprojectmanager.cpp @@ -263,7 +263,7 @@ QWidget *CMakeSettingsPage::createPage(QWidget *parent) { QWidget *outerWidget = new QWidget(parent); QVBoxLayout *outerLayout = new QVBoxLayout(outerWidget); - QGroupBox *groupBox = new QGroupBox(trCategory()); + QGroupBox *groupBox = new QGroupBox; outerLayout->addWidget(groupBox); outerLayout->addItem(new QSpacerItem(0, 0, QSizePolicy::Ignored, QSizePolicy::MinimumExpanding)); QFormLayout *formLayout = new QFormLayout(groupBox); diff --git a/src/plugins/coreplugin/dialogs/settingsdialog.cpp b/src/plugins/coreplugin/dialogs/settingsdialog.cpp index 34bf4ca2816..f469c63148e 100644 --- a/src/plugins/coreplugin/dialogs/settingsdialog.cpp +++ b/src/plugins/coreplugin/dialogs/settingsdialog.cpp @@ -42,6 +42,11 @@ #include #include #include +#include +#include +#include +#include +#include enum ItemType { CategoryItem, PageItem }; @@ -201,8 +206,37 @@ SettingsDialog::SettingsDialog(QWidget *parent, const QString &categoryId, connect(buttonBox->button(QDialogButtonBox::Apply), SIGNAL(clicked()), this, SLOT(apply())); - foreach(IOptionsPage *page, m_pages) - stackedPages->addWidget(page->createPage(0)); + // Create pages with title labels with a larger, bold font, left-aligned + // with the group boxes of the page. + const int pageCount = m_pages.size(); + QFont titleLabelFont; + const int leftMargin = qApp->style()->pixelMetric(QStyle::PM_LayoutLeftMargin) + + qApp->style()->pixelMetric(QStyle::PM_DefaultFrameWidth); + for (int i = 0; i < pageCount; i++) { + // Title bar + QHBoxLayout *titleLayout = new QHBoxLayout; + titleLayout->addSpacerItem(new QSpacerItem(leftMargin, 0, QSizePolicy::Fixed, QSizePolicy::Ignored)); + QLabel *titleLabel = new QLabel(m_pages.at(i)->trName()); + if (i == 0) { // Create a bold header font from the default label font. + titleLabelFont = titleLabel->font(); + titleLabelFont.setBold(true); + // Paranoia: Should a font be set in pixels... + const int pointSize = titleLabelFont.pointSize(); + if (pointSize > 0) + titleLabelFont.setPointSize(pointSize + 2); + } + titleLabel->setFont(titleLabelFont); + titleLayout->addWidget(titleLabel); + // Page + QWidget *pageContainer =new QWidget; + QVBoxLayout *pageLayout = new QVBoxLayout(pageContainer); + pageLayout->addLayout(titleLayout); + pageLayout->addSpacerItem(new QSpacerItem(0, 6, QSizePolicy::Ignored, QSizePolicy::Fixed)); + pageLayout->addWidget(m_pages.at(i)->createPage(0)); + stackedPages->addWidget(pageContainer); + } +// foreach(IOptionsPage *page, m_pages) + // stackedPages->addWidget(); splitter->setCollapsible(1, false); pageTree->header()->setVisible(false); @@ -247,10 +281,11 @@ void SettingsDialog::showPage(const QStandardItem *item) // if a category was hit. switch (itemTypeOfItem(item)) { case PageItem: { - const IOptionsPage *page = pageOfItem(item); + IOptionsPage *page = pageOfItem(item); m_currentCategory = page->category(); m_currentPage = page->id(); stackedPages->setCurrentIndex(indexOfItem(item)); + m_visitedPages.insert(page); } break; case CategoryItem: @@ -318,10 +353,10 @@ void SettingsDialog::filter(const QString &text) void SettingsDialog::accept() { m_applied = true; - foreach (IOptionsPage *page, m_pages) { + foreach (IOptionsPage *page, m_visitedPages) page->apply(); + foreach (IOptionsPage *page, m_pages) page->finish(); - } done(QDialog::Accepted); } @@ -334,7 +369,7 @@ void SettingsDialog::reject() void SettingsDialog::apply() { - foreach (IOptionsPage *page, m_pages) + foreach (IOptionsPage *page, m_visitedPages) page->apply(); m_applied = true; } diff --git a/src/plugins/coreplugin/dialogs/settingsdialog.h b/src/plugins/coreplugin/dialogs/settingsdialog.h index f007bfd83a7..053296068b4 100644 --- a/src/plugins/coreplugin/dialogs/settingsdialog.h +++ b/src/plugins/coreplugin/dialogs/settingsdialog.h @@ -33,6 +33,7 @@ #include "ui_settingsdialog.h" #include +#include #include "coreplugin/dialogs/ioptionspage.h" @@ -74,6 +75,8 @@ private: void showPage(const QStandardItem *item); const QList m_pages; + + QSet m_visitedPages; QSortFilterProxyModel *m_proxyModel; QStandardItemModel *m_model; bool m_applied; diff --git a/src/plugins/coreplugin/generalsettings.ui b/src/plugins/coreplugin/generalsettings.ui index 35c3b27963a..a128edbc155 100644 --- a/src/plugins/coreplugin/generalsettings.ui +++ b/src/plugins/coreplugin/generalsettings.ui @@ -2,12 +2,17 @@ Core::Internal::GeneralSettings + + + 0 + 0 + 363 + 296 + + - - General settings - QFormLayout::WrapLongRows diff --git a/src/plugins/cpaster/codepastersettings.cpp b/src/plugins/cpaster/codepastersettings.cpp index da2591cc721..60327b8f9fc 100644 --- a/src/plugins/cpaster/codepastersettings.cpp +++ b/src/plugins/cpaster/codepastersettings.cpp @@ -74,7 +74,7 @@ QString CodePasterSettingsPage::trCategory() const QWidget *CodePasterSettingsPage::createPage(QWidget *parent) { - QGroupBox *groupBox = new QGroupBox(category()); + QGroupBox *groupBox = new QGroupBox(); QVBoxLayout *groupBoxLayout = new QVBoxLayout(groupBox); QFormLayout *formLayout = new QFormLayout; QLineEdit *lineedit = new QLineEdit(m_host); diff --git a/src/plugins/cpaster/pastebindotcomsettings.ui b/src/plugins/cpaster/pastebindotcomsettings.ui index 693c8bf6f57..7068761ee2c 100644 --- a/src/plugins/cpaster/pastebindotcomsettings.ui +++ b/src/plugins/cpaster/pastebindotcomsettings.ui @@ -16,9 +16,6 @@ - - PasteBin - diff --git a/src/plugins/cpaster/settingspage.ui b/src/plugins/cpaster/settingspage.ui index 2593d6e1a90..aab35a272ab 100644 --- a/src/plugins/cpaster/settingspage.ui +++ b/src/plugins/cpaster/settingspage.ui @@ -2,14 +2,6 @@ CodePaster::SettingsPage - - - 0 - 0 - 453 - 320 - - @@ -19,9 +11,6 @@ 0 - - General - @@ -59,14 +48,14 @@ - + Copy Paste URL to clipboard - + Display Output Pane after sending a post diff --git a/src/plugins/cpptools/completionsettingspage.ui b/src/plugins/cpptools/completionsettingspage.ui index 55c077532a5..c00b8aabd3d 100644 --- a/src/plugins/cpptools/completionsettingspage.ui +++ b/src/plugins/cpptools/completionsettingspage.ui @@ -13,9 +13,6 @@ - - Code Completion - diff --git a/src/plugins/cpptools/cppfilesettingspage.cpp b/src/plugins/cpptools/cppfilesettingspage.cpp index 86e55461ed3..f1b7cce8697 100644 --- a/src/plugins/cpptools/cppfilesettingspage.cpp +++ b/src/plugins/cpptools/cppfilesettingspage.cpp @@ -243,7 +243,8 @@ QString CppFileSettingsWidget::searchKeywords() const QString rc; QTextStream(&rc) << m_ui->headerSuffixLabel->text() << ' ' << m_ui->sourceSuffixLabel->text() - << ' ' << m_ui->lowerCaseFileNamesCheckBox->text(); + << ' ' << m_ui->lowerCaseFileNamesCheckBox->text() + << ' ' << m_ui->licenseTemplateLabel->text(); rc.remove(QLatin1Char('&')); return rc; } diff --git a/src/plugins/cpptools/cppfilesettingspage.ui b/src/plugins/cpptools/cppfilesettingspage.ui index e981bd7ef9d..02261b47f1d 100644 --- a/src/plugins/cpptools/cppfilesettingspage.ui +++ b/src/plugins/cpptools/cppfilesettingspage.ui @@ -6,7 +6,7 @@ 0 0 - 424 + 441 503 @@ -19,9 +19,6 @@ 0 - - File Naming Conventions - QFormLayout::ExpandingFieldsGrow @@ -61,7 +58,7 @@ - + diff --git a/src/plugins/cvs/settingspage.cpp b/src/plugins/cvs/settingspage.cpp index 72e17ee5d44..ae1d9112158 100644 --- a/src/plugins/cvs/settingspage.cpp +++ b/src/plugins/cvs/settingspage.cpp @@ -37,6 +37,7 @@ #include #include +#include #include using namespace CVS::Internal; @@ -70,6 +71,17 @@ void SettingsPageWidget::setSettings(const CVSSettings &s) m_ui.describeByCommitIdCheckBox->setChecked(s.describeByCommitId); } +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(); + rc.remove(QLatin1Char('&')); + return rc; +} + SettingsPage::SettingsPage() { } @@ -98,6 +110,8 @@ QWidget *SettingsPage::createPage(QWidget *parent) { m_widget = new SettingsPageWidget(parent); m_widget->setSettings(CVSPlugin::cvsPluginInstance()->settings()); + if (m_searchKeywords.isEmpty()) + m_searchKeywords = m_widget->searchKeywords(); return m_widget; } @@ -105,3 +119,8 @@ void SettingsPage::apply() { CVSPlugin::cvsPluginInstance()->setSettings(m_widget->settings()); } + +bool SettingsPage::matches(const QString &s) const +{ + return m_searchKeywords.contains(s, Qt::CaseInsensitive); +} diff --git a/src/plugins/cvs/settingspage.h b/src/plugins/cvs/settingspage.h index b9842981772..cd80d85102c 100644 --- a/src/plugins/cvs/settingspage.h +++ b/src/plugins/cvs/settingspage.h @@ -55,6 +55,8 @@ public: CVSSettings settings() const; void setSettings(const CVSSettings &); + QString searchKeywords() const; + private: Ui::SettingsPage m_ui; }; @@ -75,8 +77,10 @@ public: QWidget *createPage(QWidget *parent); void apply(); void finish() { } + virtual bool matches(const QString &) const; private: + QString m_searchKeywords; SettingsPageWidget* m_widget; }; diff --git a/src/plugins/cvs/settingspage.ui b/src/plugins/cvs/settingspage.ui index 2eaf4c935df..df835685f18 100644 --- a/src/plugins/cvs/settingspage.ui +++ b/src/plugins/cvs/settingspage.ui @@ -2,115 +2,81 @@ CVS::Internal::SettingsPage - - - 0 - 0 - 575 - 437 - - - + - - - - - - - Prompt to submit - - - - - - - - - When checked, all files touched by a commit will be displayed when clicking on a revision number in the annotation view (retrieved via commit id). Otherwise, only the respective file will be displayed. - - - Describe all files matching commit id: - - - - - - - Qt::Vertical - - - QSizePolicy::Fixed - - - - 20 - 20 - - - - - - - - 0 - - - - - CVS Command: - - - - - - - - - - CVS Root: - - - - - - - - - - Diff Options: - - - - - - - - - - - - Qt::Vertical - - - - 20 - 40 - - - - - + + + Configuration + + + + + + CVS Command: + + + + + + + + + + CVS Root: + + + + + + + + - + + + Miscellaneous + + + + + + Diff Options: + + + + + + + + + + Prompt on submit + + + + + + + When checked, all files touched by a commit will be displayed when clicking on a revision number in the annotation view (retrieved via commit id). Otherwise, only the respective file will be displayed. + + + Describe all files matching commit id + + + + + + + + - Qt::Horizontal + Qt::Vertical - 105 - 20 + 20 + 40 diff --git a/src/plugins/debugger/cdb/cdboptionspage.cpp b/src/plugins/debugger/cdb/cdboptionspage.cpp index f8cdc051682..03967535261 100644 --- a/src/plugins/debugger/cdb/cdboptionspage.cpp +++ b/src/plugins/debugger/cdb/cdboptionspage.cpp @@ -35,6 +35,7 @@ #include #include +#include #include #include @@ -127,6 +128,16 @@ void CdbOptionsPageWidget::downLoadLinkActivated(const QString &link) QDesktopServices::openUrl(QUrl(link)); } +QString CdbOptionsPageWidget::searchKeywords() const +{ + QString rc; + QTextStream(&rc) << m_ui.pathLabel->text() << ' ' << m_ui.symbolPathLabel->text() + << ' ' << m_ui.sourcePathLabel->text() + << ' ' << m_ui.verboseSymbolLoadingCheckBox->text(); + rc.remove(QLatin1Char('&')); + return rc; +} + // ---------- CdbOptionsPage CdbOptionsPage::CdbOptionsPage(const QSharedPointer &options) : m_options(options) @@ -162,6 +173,8 @@ QWidget *CdbOptionsPage::createPage(QWidget *parent) m_widget = new CdbOptionsPageWidget(parent); m_widget->setOptions(*m_options); m_widget->setFailureMessage(m_failureMessage); + if (m_searchKeywords.isEmpty()) + m_searchKeywords = m_widget->searchKeywords(); return m_widget; } @@ -188,5 +201,10 @@ void CdbOptionsPage::finish() { } +bool CdbOptionsPage::matches(const QString &s) const +{ + return m_searchKeywords.contains(s, Qt::CaseInsensitive); +} + } // namespace Internal } // namespace Debugger diff --git a/src/plugins/debugger/cdb/cdboptionspage.h b/src/plugins/debugger/cdb/cdboptionspage.h index 01b56c32c95..0938e19885b 100644 --- a/src/plugins/debugger/cdb/cdboptionspage.h +++ b/src/plugins/debugger/cdb/cdboptionspage.h @@ -53,6 +53,8 @@ public: void setFailureMessage(const QString &); + QString searchKeywords() const; + private slots: void autoDetect(); void downLoadLinkActivated(const QString &); @@ -78,6 +80,7 @@ public: virtual QWidget *createPage(QWidget *parent); virtual void apply(); virtual void finish(); + virtual bool matches(const QString &) const; static QString settingsId(); @@ -92,6 +95,7 @@ private: const QSharedPointer m_options; QPointer m_widget; QString m_failureMessage; + QString m_searchKeywords; }; } // namespace Internal diff --git a/src/plugins/debugger/commonoptionspage.ui b/src/plugins/debugger/commonoptionspage.ui index 4148ad84c06..8cbfecf9e2b 100644 --- a/src/plugins/debugger/commonoptionspage.ui +++ b/src/plugins/debugger/commonoptionspage.ui @@ -2,22 +2,14 @@ CommonOptionsPage - - - 0 - 0 - 379 - 243 - - - + User interface - - + + Checking this will populate the source file view automatically but might slow down debugger startup considerably. @@ -27,28 +19,28 @@ - + Show a message box when receiving a signal - + Use alternating row colors in debug views - + Use tooltips in main editor while debugging - + When this option is checked, 'Step Into' compresses several steps into one in certain situations, leading to 'less noisy' debugging. So will, e.g., the atomic @@ -59,58 +51,38 @@ - + Enable reverse debugging - - - - - - Maximal stack depth: - - - - - - - Qt::LeftToRight - - - Qt::AlignRight|Qt::AlignTrailing|Qt::AlignVCenter - - - <unlimited> - - - 999 - - - 5 - - - 10 - - - - - - - Qt::Horizontal - - - - 40 - 20 - - - - - + + + + Maximal stack depth: + + + + + + + Qt::LeftToRight + + + <unlimited> + + + 999 + + + 5 + + + 10 + + diff --git a/src/plugins/debugger/debuggerplugin.cpp b/src/plugins/debugger/debuggerplugin.cpp index 818390dd17f..8868f38b104 100644 --- a/src/plugins/debugger/debuggerplugin.cpp +++ b/src/plugins/debugger/debuggerplugin.cpp @@ -62,6 +62,7 @@ #include +#include #include #include #include @@ -328,10 +329,12 @@ public: QWidget *createPage(QWidget *parent); void apply() { m_group.apply(settings()); } void finish() { m_group.finish(); } + virtual bool matches(const QString &s) const; private: Ui::CommonOptionsPage m_ui; Utils::SavedActionSet m_group; + QString m_searchKeywords; }; QWidget *CommonOptionsPage::createPage(QWidget *parent) @@ -364,9 +367,25 @@ QWidget *CommonOptionsPage::createPage(QWidget *parent) m_ui.checkBoxEnableReverseDebugging->hide(); #endif + if (m_searchKeywords.isEmpty()) { + QTextStream(&m_searchKeywords) << ' ' << m_ui.checkBoxListSourceFiles->text() + << ' ' << m_ui.checkBoxUseMessageBoxForSignals->text() + << ' ' << m_ui.checkBoxUseAlternatingRowColors->text() + << ' ' << m_ui.checkBoxUseToolTipsInMainEditor->text() + << ' ' << m_ui.checkBoxSkipKnownFrames->text() + << ' ' << m_ui.checkBoxEnableReverseDebugging->text() + << ' ' << m_ui.labelMaximalStackDepth->text(); + m_searchKeywords.remove(QLatin1Char('&')); + } + return w; } +bool CommonOptionsPage::matches(const QString &s) const +{ + return m_searchKeywords.contains(s, Qt::CaseInsensitive); +} + } // namespace Internal } // namespace Debugger @@ -377,6 +396,13 @@ QWidget *CommonOptionsPage::createPage(QWidget *parent) // /////////////////////////////////////////////////////////////////////// +static inline bool oxygenStyle() +{ + if (const ManhattanStyle *ms = qobject_cast(qApp->style())) + return !qstrcmp("OxygenStyle", ms->systemStyle()->metaObject()->className()); + return false; +} + namespace Debugger { namespace Internal { @@ -396,14 +422,12 @@ public: QWidget *createPage(QWidget *parent); void apply() { m_group.apply(settings()); } void finish() { m_group.finish(); } + virtual bool matches(const QString &s) const; private: - Q_SLOT void updateState(); - - friend class DebuggerPlugin; - Ui::DebuggingHelperOptionPage m_ui; - + Ui::DebuggingHelperOptionPage m_ui; Utils::SavedActionSet m_group; + QString m_searchKeywords; }; QWidget *DebuggingHelperOptionPage::createPage(QWidget *parent) @@ -416,16 +440,15 @@ QWidget *DebuggingHelperOptionPage::createPage(QWidget *parent) m_ui.dumperLocationChooser->setInitialBrowsePathBackup( Core::ICore::instance()->resourcePath() + "../../lib"); - connect(m_ui.checkBoxUseDebuggingHelpers, SIGNAL(toggled(bool)), - this, SLOT(updateState())); - connect(m_ui.checkBoxUseCustomDebuggingHelperLocation, SIGNAL(toggled(bool)), - this, SLOT(updateState())); - m_group.clear(); m_group.insert(theDebuggerAction(UseDebuggingHelpers), - m_ui.checkBoxUseDebuggingHelpers); + m_ui.debuggingHelperGroupBox); m_group.insert(theDebuggerAction(UseCustomDebuggingHelperLocation), - m_ui.checkBoxUseCustomDebuggingHelperLocation); + m_ui.customLocationGroupBox); + // Suppress Oxygen style's giving flat group boxes bold titles + if (oxygenStyle()) + m_ui.customLocationGroupBox->setStyleSheet(QLatin1String("QGroupBox::title { font: ; }")); + m_group.insert(theDebuggerAction(CustomDebuggingHelperLocation), m_ui.dumperLocationChooser); @@ -439,9 +462,6 @@ QWidget *DebuggingHelperOptionPage::createPage(QWidget *parent) m_ui.checkBoxDebugDebuggingHelpers->hide(); #endif - m_ui.dumperLocationChooser-> - setEnabled(theDebuggerAction(UseCustomDebuggingHelperLocation)->value().toBool()); - #ifndef QT_DEBUG #if 0 cmd = am->registerAction(m_manager->m_dumpLogAction, @@ -451,19 +471,22 @@ QWidget *DebuggingHelperOptionPage::createPage(QWidget *parent) mdebug->addAction(cmd); #endif #endif - updateState(); + if (m_searchKeywords.isEmpty()) { + QTextStream(&m_searchKeywords) + << ' ' << m_ui.debuggingHelperGroupBox->title() + << ' ' << m_ui.customLocationGroupBox->title() + << ' ' << m_ui.dumperLocationLabel->text() + << ' ' << m_ui.checkBoxUseCodeModel->text() + << ' ' << m_ui.checkBoxDebugDebuggingHelpers->text(); + m_searchKeywords.remove(QLatin1Char('&')); + } return w; } -void DebuggingHelperOptionPage::updateState() +bool DebuggingHelperOptionPage::matches(const QString &s) const { - m_ui.checkBoxUseCustomDebuggingHelperLocation->setEnabled( - m_ui.checkBoxUseDebuggingHelpers->isChecked()); - bool locationEnabled = m_ui.checkBoxUseDebuggingHelpers->isChecked() - && m_ui.checkBoxUseCustomDebuggingHelperLocation->isChecked(); - m_ui.dumperLocationChooser->setEnabled(locationEnabled); - m_ui.dumperLocationLabel->setEnabled(locationEnabled); + return m_searchKeywords.contains(s, Qt::CaseInsensitive); } } // namespace Internal diff --git a/src/plugins/debugger/dumperoptionpage.ui b/src/plugins/debugger/dumperoptionpage.ui index e63355068de..a7ac27cfcd6 100644 --- a/src/plugins/debugger/dumperoptionpage.ui +++ b/src/plugins/debugger/dumperoptionpage.ui @@ -6,87 +6,45 @@ 0 0 - 432 - 434 + 417 + 203 - + - Debugging helper + Use Debugging helper + + + true - - - This will enable nice display of Qt and Standard Library objects in the Locals&Watchers view + + + Use debugging helper from custom location - - Use debugging helper + + true + + true + + + + + + Location: + + + + + + + - - - - - - Qt::Horizontal - - - QSizePolicy::Fixed - - - - 10 - 10 - - - - - - - - This will load a dumper library - - - Use debugging helper from custom location - - - - - - - - - - - Qt::Horizontal - - - QSizePolicy::Fixed - - - - 20 - 20 - - - - - - - - Location: - - - - - - - - diff --git a/src/plugins/debugger/gdb/gdboptionspage.cpp b/src/plugins/debugger/gdb/gdboptionspage.cpp index b030e44977f..6683a6bad65 100644 --- a/src/plugins/debugger/gdb/gdboptionspage.cpp +++ b/src/plugins/debugger/gdb/gdboptionspage.cpp @@ -4,6 +4,7 @@ #include #include +#include const char * const GDB_SETTINGS_ID = QT_TRANSLATE_NOOP("Debugger::Internal::GdbOptionsPage", "Gdb"); @@ -73,6 +74,13 @@ QWidget *GdbOptionsPage::createPage(QWidget *parent) m_ui.environmentEdit->hide(); m_ui.labelEnvironment->hide(); + if (m_searchKeywords.isEmpty()) { + // TODO: Add breakpoints, environment? + QTextStream(&m_searchKeywords) << ' ' << m_ui.labelGdbLocation->text() + << ' ' << m_ui.labelEnvironment->text() + << ' ' << m_ui.labelGdbStartupScript->text(); + m_searchKeywords.remove(QLatin1Char('&')); + } return w; } void GdbOptionsPage::apply() @@ -85,5 +93,10 @@ void GdbOptionsPage::finish() m_group.finish(); } +bool GdbOptionsPage::matches(const QString &s) const +{ + return m_searchKeywords.contains(s, Qt::CaseInsensitive); +} + } // namespace Internal } // namespace Debugger diff --git a/src/plugins/debugger/gdb/gdboptionspage.h b/src/plugins/debugger/gdb/gdboptionspage.h index 2a86e950140..3510cbb9986 100644 --- a/src/plugins/debugger/gdb/gdboptionspage.h +++ b/src/plugins/debugger/gdb/gdboptionspage.h @@ -23,12 +23,14 @@ public: virtual QWidget *createPage(QWidget *parent); virtual void apply(); virtual void finish(); + virtual bool matches(const QString &) const; static QString settingsId(); -private: +private: Ui::GdbOptionsPage m_ui; Utils::SavedActionSet m_group; + QString m_searchKeywords; }; } // namespace Internal diff --git a/src/plugins/debugger/gdb/gdboptionspage.ui b/src/plugins/debugger/gdb/gdboptionspage.ui index 01900e97632..15ee247cd6a 100644 --- a/src/plugins/debugger/gdb/gdboptionspage.ui +++ b/src/plugins/debugger/gdb/gdboptionspage.ui @@ -2,30 +2,22 @@ GdbOptionsPage - - - 0 - 0 - 429 - 452 - - Gdb interaction - + + + 6 + + + 6 + 9 - - 6 - - - - @@ -36,6 +28,9 @@ + + + @@ -46,6 +41,9 @@ + + + @@ -57,10 +55,7 @@ - - - - + @@ -133,6 +128,9 @@ Qt::Vertical + + QSizePolicy::MinimumExpanding + 10 diff --git a/src/plugins/debugger/gdb/trkoptionspage.cpp b/src/plugins/debugger/gdb/trkoptionspage.cpp index 1a7c8a91c96..5a5501903c1 100644 --- a/src/plugins/debugger/gdb/trkoptionspage.cpp +++ b/src/plugins/debugger/gdb/trkoptionspage.cpp @@ -76,6 +76,8 @@ QWidget *TrkOptionsPage::createPage(QWidget *parent) if (!m_widget) m_widget = new TrkOptionsWidget(parent); m_widget->setTrkOptions(*m_options); + if (m_searchKeywords.isEmpty()) + m_searchKeywords = m_widget->searchKeywords(); return m_widget; } @@ -94,5 +96,10 @@ void TrkOptionsPage::finish() { } +bool TrkOptionsPage::matches(const QString &s) const +{ + return m_searchKeywords.contains(s, Qt::CaseInsensitive); +} + } // namespace Internal } // namespace Designer diff --git a/src/plugins/debugger/gdb/trkoptionspage.h b/src/plugins/debugger/gdb/trkoptionspage.h index 1d33ab954f5..d9badcfa212 100644 --- a/src/plugins/debugger/gdb/trkoptionspage.h +++ b/src/plugins/debugger/gdb/trkoptionspage.h @@ -60,11 +60,13 @@ public: virtual QWidget *createPage(QWidget *parent); virtual void apply(); virtual void finish(); + virtual bool matches(const QString &) const; static QString settingsId(); private: const TrkOptionsPtr m_options; QPointer m_widget; + QString m_searchKeywords; }; } // namespace Internal diff --git a/src/plugins/debugger/gdb/trkoptionswidget.cpp b/src/plugins/debugger/gdb/trkoptionswidget.cpp index d61014a5877..5a872471550 100644 --- a/src/plugins/debugger/gdb/trkoptionswidget.cpp +++ b/src/plugins/debugger/gdb/trkoptionswidget.cpp @@ -32,6 +32,8 @@ #include "debuggerconstants.h" #include "ui_trkoptionswidget.h" +#include + namespace Debugger { namespace Internal { @@ -88,5 +90,14 @@ TrkOptions TrkOptionsWidget::trkOptions() const return rc; } +QString TrkOptionsWidget::searchKeywords() const +{ + QString rc; + QTextStream(&rc) << ui->gdbLabel->text() << ' ' << ui->serialLabel->text() + << ' ' << ui->blueToothLabel->text(); + rc.remove(QLatin1Char('&')); + return rc; +} + } // namespace Internal } // namespace Designer diff --git a/src/plugins/debugger/gdb/trkoptionswidget.h b/src/plugins/debugger/gdb/trkoptionswidget.h index 25ca593dbb1..11280add72e 100644 --- a/src/plugins/debugger/gdb/trkoptionswidget.h +++ b/src/plugins/debugger/gdb/trkoptionswidget.h @@ -50,6 +50,8 @@ public: void setTrkOptions(const TrkOptions &); TrkOptions trkOptions() const; + QString searchKeywords() const; + protected: void changeEvent(QEvent *e); diff --git a/src/plugins/designer/cpp/cppsettingspage.cpp b/src/plugins/designer/cpp/cppsettingspage.cpp index 26111a76190..66122e7f69e 100644 --- a/src/plugins/designer/cpp/cppsettingspage.cpp +++ b/src/plugins/designer/cpp/cppsettingspage.cpp @@ -31,6 +31,7 @@ #include "designerconstants.h" #include +#include #include namespace Designer { @@ -84,6 +85,18 @@ void CppSettingsPageWidget::setUiEmbedding(int v) } } +QString CppSettingsPageWidget::searchKeywords() const +{ + QString rc; + QTextStream(&rc) << m_ui.ptrAggregationRadioButton->text() + << ' ' << m_ui.aggregationButton->text() + << ' ' << m_ui.multipleInheritanceButton->text() + << ' ' << m_ui.retranslateCheckBox->text() + << ' ' << m_ui.includeQtModuleCheckBox->text(); + rc.remove(QLatin1Char('&')); + return rc; +} + // ---------- CppSettingsPage CppSettingsPage::CppSettingsPage(QObject *parent) : Core::IOptionsPage(parent) { @@ -114,6 +127,8 @@ QWidget *CppSettingsPage::createPage(QWidget *parent) { m_widget = new CppSettingsPageWidget(parent); m_widget->setParameters(m_parameters); + if (m_searchKeywords.isEmpty()) + m_searchKeywords = m_widget->searchKeywords(); return m_widget; } @@ -132,5 +147,10 @@ void CppSettingsPage::finish() { } +bool CppSettingsPage::matches(const QString &s) const +{ + return m_searchKeywords.contains(s, Qt::CaseInsensitive); +} + } // namespace Internal } // namespace Designer diff --git a/src/plugins/designer/cpp/cppsettingspage.h b/src/plugins/designer/cpp/cppsettingspage.h index dc42fc6952e..57fc9f160bb 100644 --- a/src/plugins/designer/cpp/cppsettingspage.h +++ b/src/plugins/designer/cpp/cppsettingspage.h @@ -49,6 +49,8 @@ public: FormClassWizardGenerationParameters parameters() const; void setParameters(const FormClassWizardGenerationParameters &p); + QString searchKeywords() const; + private: int uiEmbedding() const; void setUiEmbedding(int); @@ -69,10 +71,12 @@ public: virtual QWidget *createPage(QWidget *parent); virtual void apply(); virtual void finish(); + virtual bool matches(const QString &s) const; private: QPointer m_widget; FormClassWizardGenerationParameters m_parameters; + QString m_searchKeywords; }; } // namespace Internal diff --git a/src/plugins/designer/cpp/cppsettingspagewidget.ui b/src/plugins/designer/cpp/cppsettingspagewidget.ui index b06c43da415..1e2b089d0a8 100644 --- a/src/plugins/designer/cpp/cppsettingspagewidget.ui +++ b/src/plugins/designer/cpp/cppsettingspagewidget.ui @@ -2,103 +2,81 @@ Designer::Internal::CppSettingsPageWidget - - - 0 - 0 - 526 - 369 - - Form - + - - - - - Embedding of the UI Class - - - false - - - - - - Aggregation as a pointer member - - - - - - - Aggregation - - - - - - - Multiple Inheritance - - - - - aggregationButton - multipleInheritanceButton - ptrAggregationRadioButton - - - - - - Code Generation - - - - - - Support for changing languages at runtime - - - - - - - Use Qt module name in #include-directive - - - - - - - - - - Qt::Vertical - - - - 20 - 40 - - - - - + + + Embedding of the UI Class + + + false + + + + + + Aggregation as a pointer member + + + + + + + Aggregation + + + + + + + Multiple Inheritance + + + + + aggregationButton + multipleInheritanceButton + ptrAggregationRadioButton + - + + + Code Generation + + + + + + Support for changing languages at runtime + + + + + + + Use Qt module name in #include-directive + + + + + + + + - Qt::Horizontal + Qt::Vertical + + + QSizePolicy::MinimumExpanding - 169 - 20 + 0 + 0 diff --git a/src/plugins/fakevim/fakevimoptions.ui b/src/plugins/fakevim/fakevimoptions.ui index 2f3d6f674a7..7ce297d46ce 100644 --- a/src/plugins/fakevim/fakevimoptions.ui +++ b/src/plugins/fakevim/fakevimoptions.ui @@ -6,197 +6,213 @@ 0 0 - 394 - 322 + 519 + 392 - - - - - Use FakeVim - - - + Vim style settings - - - - - vim's "expandtab" option - - - Expand tabulators: - - + + true + + + + + + + + VIM's "autoindent" option + + + Automatic indentation: + + + + + + + + + + + + + + vim's "expandtab" option + + + Expand tabulators: + + + + + + + + + + + + + + Highlight search results: + + + + + + + + + + + + + + Incremental search: + + + + + + + + + + + + + + Shift width: + + + + + + + + + + Smart tabulators: + + + + + + + + + + + + + + Start of line: + + + + + + + + + + + + + + vim's "tabstop" option + + + Tabulator size: + + + + + + + + + + Backspace: + + + + + + + - - - - + + + + Qt::Vertical - - - - - - Highlight search results: + + QSizePolicy::Fixed - - - - - - + + + 17 + 10 + - + - - - - Shift width: - - - - - - - - - - Smart tabulators: - - - - - - - - - - - - - - Start of line: - - - - - - - - - - - - - - vim's "tabstop" option - - - Tabulator size: - - - - - - - - - - Backspace: - - - - - - - - - - - - - - - - - VIM's "autoindent" option - - - Automatic indentation: - - - - - - - Incremental search: - - - - - - - - - + + + + + + Copy text editor settings + + + + + + + Set Qt style + + + + + + + Set plain style + + + + + + + Qt::Horizontal + + + + 40 + 20 + + + + + - - - - - Copy text editor settings - - - - - - - Set Qt style - - - - - - - Set plain style - - - - - - - Qt::Horizontal - - - - 40 - 20 - - - - - - - - + Qt::Vertical 20 - 1 + 40 diff --git a/src/plugins/fakevim/fakevimplugin.cpp b/src/plugins/fakevim/fakevimplugin.cpp index 4246e1d1335..a81fb767872 100644 --- a/src/plugins/fakevim/fakevimplugin.cpp +++ b/src/plugins/fakevim/fakevimplugin.cpp @@ -68,6 +68,7 @@ #include #include #include +#include #include #include @@ -118,6 +119,7 @@ public: QWidget *createPage(QWidget *parent); void apply() { m_group.apply(ICore::instance()->settings()); } void finish() { m_group.finish(); } + virtual bool matches(const QString &) const; private slots: void copyTextEditorSettings(); @@ -127,7 +129,7 @@ private slots: private: friend class DebuggerPlugin; Ui::FakeVimOptionPage m_ui; - + QString m_searchKeywords; Utils::SavedActionSet m_group; }; @@ -138,7 +140,7 @@ QWidget *FakeVimOptionPage::createPage(QWidget *parent) m_group.clear(); m_group.insert(theFakeVimSetting(ConfigUseFakeVim), - m_ui.checkBoxUseFakeVim); + m_ui.groupBox); m_group.insert(theFakeVimSetting(ConfigExpandTab), m_ui.checkBoxExpandTab); @@ -167,7 +169,15 @@ QWidget *FakeVimOptionPage::createPage(QWidget *parent) this, SLOT(setQtStyle())); connect(m_ui.pushButtonSetPlainStyle, SIGNAL(clicked()), this, SLOT(setPlainStyle())); - + if (m_searchKeywords.isEmpty()) { + QTextStream(&m_searchKeywords) + << ' ' << m_ui.labelAutoIndent->text() << ' ' << m_ui.labelExpandTab->text() + << ' ' << m_ui.labelHlSearch->text() << ' ' << m_ui.labelIncSearch->text() + << ' ' << m_ui.labelShiftWidth->text() << ' ' << m_ui.labelSmartTab->text() + << ' ' << m_ui.labelStartOfLine->text() << ' ' << m_ui.tabulatorLabel->text() + << ' ' << m_ui.labelBackspace->text(); + m_searchKeywords.remove(QLatin1Char('&')); + } return w; } @@ -188,25 +198,32 @@ void FakeVimOptionPage::copyTextEditorSettings() void FakeVimOptionPage::setQtStyle() { m_ui.checkBoxExpandTab->setChecked(true); - m_ui.lineEditTabStop->setText("4"); - m_ui.lineEditShiftWidth->setText("4"); + const QString four = QString(QLatin1Char('4')); + m_ui.lineEditTabStop->setText(four); + m_ui.lineEditShiftWidth->setText(four); m_ui.checkBoxSmartTab->setChecked(true); m_ui.checkBoxAutoIndent->setChecked(true); m_ui.checkBoxIncSearch->setChecked(true); - m_ui.lineEditBackspace->setText("indent,eol,start"); + m_ui.lineEditBackspace->setText(QLatin1String("indent,eol,start")); } void FakeVimOptionPage::setPlainStyle() { m_ui.checkBoxExpandTab->setChecked(false); - m_ui.lineEditTabStop->setText("8"); - m_ui.lineEditShiftWidth->setText("8"); + const QString eight = QString(QLatin1Char('4')); + m_ui.lineEditTabStop->setText(eight); + m_ui.lineEditShiftWidth->setText(eight); m_ui.checkBoxSmartTab->setChecked(false); m_ui.checkBoxAutoIndent->setChecked(false); m_ui.checkBoxIncSearch->setChecked(false); m_ui.lineEditBackspace->setText(QString()); } +bool FakeVimOptionPage::matches(const QString &s) const +{ + return m_searchKeywords.contains(s, Qt::CaseInsensitive); +} + } // namespace Internal } // namespace FakeVim diff --git a/src/plugins/git/settingspage.cpp b/src/plugins/git/settingspage.cpp index 9060bdd7620..56094f39943 100644 --- a/src/plugins/git/settingspage.cpp +++ b/src/plugins/git/settingspage.cpp @@ -36,6 +36,7 @@ #include #include #include +#include #include 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); +} + } } diff --git a/src/plugins/git/settingspage.h b/src/plugins/git/settingspage.h index b6ed3c7bddb..c559c982c0a 100644 --- a/src/plugins/git/settingspage.h +++ b/src/plugins/git/settingspage.h @@ -54,6 +54,8 @@ public: GitSettings settings() const; void setSettings(const GitSettings &); + QString searchKeywords() const; + private slots: void setSystemPath(); @@ -76,8 +78,10 @@ public: QWidget *createPage(QWidget *parent); void apply(); void finish() { } + virtual bool matches(const QString &) const; private: + QString m_searchKeywords; SettingsPageWidget* m_widget; }; diff --git a/src/plugins/git/settingspage.ui b/src/plugins/git/settingspage.ui index b5fdc24a589..a6b27926c1e 100644 --- a/src/plugins/git/settingspage.ui +++ b/src/plugins/git/settingspage.ui @@ -7,7 +7,7 @@ 0 0 409 - 251 + 279 @@ -66,59 +66,64 @@ - - - - - Log commit display count: - - - - - - - Note that huge amount of commits might take some time. - - - 1000 - - - - - - - Timeout (seconds): - - - - - - - 10 - - - 300 - - - 30 - - - - - - - Prompt to submit - - - - - - - Omit date from annotation output - - - - + + + Miscellaneous + + + + + + Log commit display count: + + + + + + + Note that huge amount of commits might take some time. + + + 1000 + + + + + + + Timeout (seconds): + + + + + + + 10 + + + 300 + + + 30 + + + + + + + Prompt on submit + + + + + + + Omit date from annotation output + + + + + diff --git a/src/plugins/help/docsettingspage.cpp b/src/plugins/help/docsettingspage.cpp index 8ff6eef1615..78c0a552447 100644 --- a/src/plugins/help/docsettingspage.cpp +++ b/src/plugins/help/docsettingspage.cpp @@ -75,7 +75,8 @@ QWidget *DocSettingsPage::createPage(QWidget *parent) m_ui.docsListWidget->addItems(m_helpEngine->registeredDocumentations()); m_registeredDocs = false; m_removeDocs.clear(); - + if (m_searchKeywords.isEmpty()) + m_searchKeywords = m_ui.groupBox->title(); return w; } @@ -126,6 +127,11 @@ void DocSettingsPage::apply() emit dialogAccepted(); } +bool DocSettingsPage::matches(const QString &s) const +{ + return m_searchKeywords.contains(s, Qt::CaseInsensitive); +} + bool DocSettingsPage::applyChanges() { QStringList::const_iterator it = m_removeDocs.constBegin(); diff --git a/src/plugins/help/docsettingspage.h b/src/plugins/help/docsettingspage.h index 47bdd2a0f8d..1a620036fca 100644 --- a/src/plugins/help/docsettingspage.h +++ b/src/plugins/help/docsettingspage.h @@ -56,6 +56,7 @@ public: QWidget *createPage(QWidget *parent); void apply(); void finish() { } + virtual bool matches(const QString &s) const; bool applyChanges(); @@ -72,6 +73,7 @@ private: bool m_registeredDocs; QStringList m_removeDocs; Ui::DocSettingsPage m_ui; + QString m_searchKeywords; }; } // namespace Help diff --git a/src/plugins/help/filtersettingspage.cpp b/src/plugins/help/filtersettingspage.cpp index d688b075013..1e1e9605729 100644 --- a/src/plugins/help/filtersettingspage.cpp +++ b/src/plugins/help/filtersettingspage.cpp @@ -78,6 +78,9 @@ QWidget *FilterSettingsPage::createPage(QWidget *parent) SLOT(removeFilter())); updateFilterPage(); + if (m_searchKeywords.isEmpty()) + m_searchKeywords = m_ui.filterGroupBox->title() + QLatin1Char(' ') + m_ui.attributesGroupBox->title(); + return m_currentPage; } @@ -220,3 +223,10 @@ bool FilterSettingsPage::applyChanges() } return false; } + +bool FilterSettingsPage::matches(const QString &s) const +{ + return m_searchKeywords.contains(s, Qt::CaseInsensitive); +} + + diff --git a/src/plugins/help/filtersettingspage.h b/src/plugins/help/filtersettingspage.h index d8d922bf4c5..9169c191c72 100644 --- a/src/plugins/help/filtersettingspage.h +++ b/src/plugins/help/filtersettingspage.h @@ -55,6 +55,7 @@ public: QWidget *createPage(QWidget *parent); void apply(); void finish() { } + virtual bool matches(const QString &s) const; bool applyChanges(); @@ -72,6 +73,7 @@ private: QMap m_filterMap; QStringList m_removedFilters; QWidget *m_currentPage; + QString m_searchKeywords; }; } // namespace Help diff --git a/src/plugins/help/filtersettingspage.ui b/src/plugins/help/filtersettingspage.ui index 704f6f965e9..f22c690b51d 100644 --- a/src/plugins/help/filtersettingspage.ui +++ b/src/plugins/help/filtersettingspage.ui @@ -12,9 +12,9 @@ - + - + Filters @@ -26,7 +26,7 @@ - + Attributes @@ -55,7 +55,7 @@ - + @@ -71,7 +71,7 @@ - + Qt::Horizontal diff --git a/src/plugins/help/generalsettingspage.cpp b/src/plugins/help/generalsettingspage.cpp index 6076532d8ce..3c0257c8e7c 100644 --- a/src/plugins/help/generalsettingspage.cpp +++ b/src/plugins/help/generalsettingspage.cpp @@ -127,6 +127,12 @@ QWidget *GeneralSettingsPage::createPage(QWidget *parent) connect(m_ui.importButton, SIGNAL(clicked()), this, SLOT(importBookmarks())); connect(m_ui.exportButton, SIGNAL(clicked()), this, SLOT(exportBookmarks())); + if (m_searchKeywords.isEmpty()) { + QTextStream(&m_searchKeywords) << ' ' << m_ui.contextHelpLabel->text() + << ' ' << m_ui.startPageLabel->text() << ' ' << m_ui.homePageLabel->text() + << ' ' << m_ui.bookmarkGroupBox->title(); + m_searchKeywords.remove(QLatin1Char('&')); + } return m_currentPage; } @@ -324,3 +330,8 @@ int GeneralSettingsPage::closestPointSizeIndex(int desiredPointSize) const } return closestIndex; } + +bool GeneralSettingsPage::matches(const QString &s) const +{ + return m_searchKeywords.contains(s, Qt::CaseInsensitive); +} diff --git a/src/plugins/help/generalsettingspage.h b/src/plugins/help/generalsettingspage.h index be347b4102b..5ecfbaf2d72 100644 --- a/src/plugins/help/generalsettingspage.h +++ b/src/plugins/help/generalsettingspage.h @@ -63,6 +63,7 @@ public: QWidget *createPage(QWidget *parent); void apply(); void finish(); + virtual bool matches(const QString &s) const; signals: void fontChanged(); @@ -90,6 +91,7 @@ private: QFontDatabase fontDatabase; Ui::GeneralSettingsPage m_ui; + QString m_searchKeywords; }; } // Internal diff --git a/src/plugins/help/generalsettingspage.ui b/src/plugins/help/generalsettingspage.ui index 5987bbfdfaa..8d55f9b0e17 100644 --- a/src/plugins/help/generalsettingspage.ui +++ b/src/plugins/help/generalsettingspage.ui @@ -2,26 +2,18 @@ GeneralSettingsPage - - - 0 - 0 - 593 - 371 - - Form - + Font - + 0 @@ -53,7 +45,7 @@ - + 0 @@ -92,7 +84,7 @@ - + 0 @@ -131,7 +123,7 @@ - + true @@ -140,9 +132,9 @@ - + - + 0 @@ -179,21 +171,8 @@ - - - - Qt::Horizontal - - - - 40 - 20 - - - - - + 0 @@ -230,18 +209,14 @@ - - - - - - + + Home Page: - + @@ -288,13 +263,13 @@ - + Help Bookmarks - + @@ -363,9 +338,6 @@ - - - @@ -376,10 +348,13 @@ Qt::Vertical + + QSizePolicy::MinimumExpanding + - 20 - 126 + 0 + 0 diff --git a/src/plugins/locator/settingspage.cpp b/src/plugins/locator/settingspage.cpp index 99453132fe1..6697fd8603f 100644 --- a/src/plugins/locator/settingspage.cpp +++ b/src/plugins/locator/settingspage.cpp @@ -90,6 +90,10 @@ QWidget *SettingsPage::createPage(QWidget *parent) m_customFilters = m_plugin->customFilters(); saveFilterStates(); updateFilterList(); + if (m_searchKeywords.isEmpty()) { + m_searchKeywords = m_ui.refreshIntervalLabel->text(); + m_searchKeywords.remove(QLatin1Char('&')); + } return m_page; } @@ -220,3 +224,8 @@ void SettingsPage::removeCustomFilter() } updateFilterList(); } + +bool SettingsPage::matches(const QString &s) const +{ + return m_searchKeywords.contains(s, Qt::CaseInsensitive); +} diff --git a/src/plugins/locator/settingspage.h b/src/plugins/locator/settingspage.h index 1fb55661e0f..414f4864ce9 100644 --- a/src/plugins/locator/settingspage.h +++ b/src/plugins/locator/settingspage.h @@ -63,6 +63,7 @@ public: QWidget *createPage(QWidget *parent); void apply(); void finish(); + virtual bool matches(const QString &) const; private slots: void updateButtonStates(); @@ -85,6 +86,7 @@ private: QList m_customFilters; QList m_refreshFilters; QHash m_filterStates; + QString m_searchKeywords; }; } // namespace Internal diff --git a/src/plugins/locator/settingspage.ui b/src/plugins/locator/settingspage.ui index f2f055c57b6..3fdc38b88a9 100644 --- a/src/plugins/locator/settingspage.ui +++ b/src/plugins/locator/settingspage.ui @@ -15,10 +15,7 @@ - - - Configure Filters - + @@ -77,7 +74,7 @@ - + Refresh Interval: diff --git a/src/plugins/perforce/settingspage.cpp b/src/plugins/perforce/settingspage.cpp index 4fe846f8ead..dd772e14228 100644 --- a/src/plugins/perforce/settingspage.cpp +++ b/src/plugins/perforce/settingspage.cpp @@ -36,6 +36,7 @@ #include #include #include +#include using namespace Perforce::Internal; using namespace Utils; @@ -66,7 +67,7 @@ Settings SettingsPageWidget::settings() const { Settings settings; settings.p4Command = m_ui.pathChooser->path(); - settings.defaultEnv = m_ui.defaultCheckBox->isChecked(); + settings.defaultEnv = !m_ui.environmentGroupBox->isChecked(); settings.p4Port = m_ui.portLineEdit->text(); settings.p4User = m_ui.userLineEdit->text(); settings.p4Client= m_ui.clientLineEdit->text(); @@ -77,7 +78,7 @@ Settings SettingsPageWidget::settings() const void SettingsPageWidget::setSettings(const PerforceSettings &s) { m_ui.pathChooser->setPath(s.p4Command()); - m_ui.defaultCheckBox->setChecked(s.defaultEnv()); + m_ui.environmentGroupBox->setChecked(!s.defaultEnv()); m_ui.portLineEdit->setText(s.p4Port()); m_ui.clientLineEdit->setText(s.p4Client()); m_ui.userLineEdit->setText(s.p4User()); @@ -92,6 +93,17 @@ void SettingsPageWidget::setStatusText(bool ok, const QString &t) m_ui.errorLabel->setText(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(); + rc.remove(QLatin1Char('&')); + return rc; +} + SettingsPage::SettingsPage() { } @@ -120,6 +132,8 @@ QWidget *SettingsPage::createPage(QWidget *parent) { m_widget = new SettingsPageWidget(parent); m_widget->setSettings(PerforcePlugin::perforcePluginInstance()->settings()); + if (m_searchKeywords.isEmpty()) + m_searchKeywords = m_widget->searchKeywords(); return m_widget; } @@ -127,3 +141,8 @@ void SettingsPage::apply() { PerforcePlugin::perforcePluginInstance()->setSettings(m_widget->settings()); } + +bool SettingsPage::matches(const QString &s) const +{ + return m_searchKeywords.contains(s, Qt::CaseInsensitive); +} diff --git a/src/plugins/perforce/settingspage.h b/src/plugins/perforce/settingspage.h index 4ecf0f16060..3836d2cc1ed 100644 --- a/src/plugins/perforce/settingspage.h +++ b/src/plugins/perforce/settingspage.h @@ -51,6 +51,8 @@ public: void setSettings(const PerforceSettings &); Settings settings() const; + QString searchKeywords() const; + private slots: void slotTest(); @@ -75,8 +77,10 @@ public: QWidget *createPage(QWidget *parent); void apply(); void finish() { } + virtual bool matches(const QString &) const; private: + QString m_searchKeywords; SettingsPageWidget* m_widget; }; diff --git a/src/plugins/perforce/settingspage.ui b/src/plugins/perforce/settingspage.ui index fe25bcf5844..1b6c6b3a7d7 100644 --- a/src/plugins/perforce/settingspage.ui +++ b/src/plugins/perforce/settingspage.ui @@ -2,68 +2,28 @@ Perforce::Internal::SettingsPage - - - 0 - 0 - 423 - 463 - - - - - - - Prompt to submit - - - - + + + Configuration + + + + + + P4 Command: + + + + + + + + - - - Qt::Vertical - - - QSizePolicy::Fixed - - - - 20 - 20 - - - - - - - - QFormLayout::ExpandingFieldsGrow - - - - - P4 Command: - - - - - - - - - - Use default P4 environment variables - - - - - - - + true @@ -71,6 +31,9 @@ Environment variables + true + + false @@ -113,6 +76,38 @@ + + + + Miscellaneous + + + + + + Prompt on submit + + + + + + + + + + Qt::Vertical + + + QSizePolicy::Fixed + + + + 0 + 10 + + + + @@ -144,8 +139,8 @@ - 141 - 20 + 20 + 40 @@ -173,22 +168,5 @@ userLineEdit - - - defaultCheckBox - toggled(bool) - groupBox - setDisabled(bool) - - - 134 - 51 - - - 139 - 65 - - - - + diff --git a/src/plugins/projectexplorer/projectexplorersettingspage.cpp b/src/plugins/projectexplorer/projectexplorersettingspage.cpp index 187253e532e..58983a872b0 100644 --- a/src/plugins/projectexplorer/projectexplorersettingspage.cpp +++ b/src/plugins/projectexplorer/projectexplorersettingspage.cpp @@ -37,18 +37,14 @@ using namespace ProjectExplorer; using namespace ProjectExplorer::Internal; -ProjectExplorerSettingsPage::ProjectExplorerSettingsPage() +ProjectExplorerSettingsPage::ProjectExplorerSettingsPage() : + m_searchKeywords(QLatin1String("jom")) { - -} -ProjectExplorerSettingsPage::~ProjectExplorerSettingsPage() -{ - } QString ProjectExplorerSettingsPage::id() const { - return Constants::PROJECTEXPLORER_PAGE; + return QLatin1String(Constants::PROJECTEXPLORER_PAGE); } QString ProjectExplorerSettingsPage::trName() const @@ -58,7 +54,7 @@ QString ProjectExplorerSettingsPage::trName() const QString ProjectExplorerSettingsPage::category() const { - return Constants::PROJECTEXPLORER_PAGE; + return QLatin1String(Constants::PROJECTEXPLORER_PAGE); } QString ProjectExplorerSettingsPage::trCategory() const @@ -101,3 +97,8 @@ void ProjectExplorerSettingsPage::finish() { // Nothing to do } + +bool ProjectExplorerSettingsPage::matches(const QString &s) const +{ + return m_searchKeywords.contains(s, Qt::CaseInsensitive); +} diff --git a/src/plugins/projectexplorer/projectexplorersettingspage.h b/src/plugins/projectexplorer/projectexplorersettingspage.h index 9506f0d62e9..efd28fefa7c 100644 --- a/src/plugins/projectexplorer/projectexplorersettingspage.h +++ b/src/plugins/projectexplorer/projectexplorersettingspage.h @@ -41,7 +41,6 @@ class ProjectExplorerSettingsPage : public Core::IOptionsPage Q_OBJECT public: ProjectExplorerSettingsPage(); - ~ProjectExplorerSettingsPage(); virtual QString id() const; virtual QString trName() const; @@ -51,7 +50,10 @@ public: virtual QWidget *createPage(QWidget *parent); virtual void apply(); virtual void finish(); + virtual bool matches(const QString &s) const; + private: + const QString m_searchKeywords; Ui::ProjectExplorerSettingsPageUi m_ui; }; diff --git a/src/plugins/projectexplorer/projectexplorersettingspage.ui b/src/plugins/projectexplorer/projectexplorersettingspage.ui index 85dd1083ada..2e912e52730 100644 --- a/src/plugins/projectexplorer/projectexplorersettingspage.ui +++ b/src/plugins/projectexplorer/projectexplorersettingspage.ui @@ -12,10 +12,7 @@ - - - Build and Run - + diff --git a/src/plugins/qt4projectmanager/qt-s60/s60devicespreferencepane.ui b/src/plugins/qt4projectmanager/qt-s60/s60devicespreferencepane.ui index 1693e3e8a5b..3333a752ea3 100644 --- a/src/plugins/qt4projectmanager/qt-s60/s60devicespreferencepane.ui +++ b/src/plugins/qt4projectmanager/qt-s60/s60devicespreferencepane.ui @@ -6,90 +6,89 @@ 0 0 - 400 - 300 + 282 + 296 Form - + - - - Installed S60 SDKs: - + + + + + + 0 + + + false + + + true + + + 2 + + + true + + + + SDK Location + + + + + Qt Location + + + + + + + + background-color: red; + + + Error + + + true + + + Qt::LinksAccessibleByMouse|Qt::TextSelectableByMouse + + + + + + + + + Qt::Horizontal + + + + 40 + 20 + + + + + + + + Refresh + + + + + + - - - - 0 - - - false - - - true - - - 2 - - - true - - - - SDK Location - - - - - Qt Location - - - - - - - - background-color: red; - - - Error - - - true - - - Qt::LinksAccessibleByMouse|Qt::TextSelectableByMouse - - - - - - - - - Qt::Horizontal - - - - 40 - 20 - - - - - - - - Refresh - - - - - diff --git a/src/plugins/qt4projectmanager/qtoptionspage.cpp b/src/plugins/qt4projectmanager/qtoptionspage.cpp index 50fe634a878..af029059849 100644 --- a/src/plugins/qt4projectmanager/qtoptionspage.cpp +++ b/src/plugins/qt4projectmanager/qtoptionspage.cpp @@ -16,6 +16,7 @@ #include #include #include +#include #include #include #include @@ -84,6 +85,8 @@ QWidget *QtOptionsPage::createPage(QWidget *parent) { QtVersionManager *vm = QtVersionManager::instance(); m_widget = new QtOptionsPageWidget(parent, vm->versions(), vm->defaultVersion()); + if (m_searchKeywords.isEmpty()) + m_searchKeywords = m_widget->searchKeywords(); return m_widget; } @@ -99,6 +102,11 @@ void QtOptionsPage::apply() vm->setNewQtVersions(versions, m_widget->defaultVersion()); } +bool QtOptionsPage::matches(const QString &s) const +{ + return m_searchKeywords.contains(s, Qt::CaseInsensitive); +} + //----------------------------------------------------- @@ -728,3 +736,16 @@ int QtOptionsPageWidget::defaultVersion() const { return m_defaultVersion; } + +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() + << ' ' << m_ui->versionListGroupBox->title(); + rc.remove(QLatin1Char('&')); + return rc; +} diff --git a/src/plugins/qt4projectmanager/qtoptionspage.h b/src/plugins/qt4projectmanager/qtoptionspage.h index 834dff9b36f..7fc3ffaf710 100644 --- a/src/plugins/qt4projectmanager/qtoptionspage.h +++ b/src/plugins/qt4projectmanager/qtoptionspage.h @@ -81,6 +81,7 @@ public: QList versions() const; int defaultVersion() const; void finish(); + QString searchKeywords() const; virtual bool eventFilter(QObject *o, QEvent *e); @@ -142,8 +143,11 @@ public: QWidget *createPage(QWidget *parent); void apply(); void finish() { } + virtual bool matches(const QString &) const; + private: QtOptionsPageWidget *m_widget; + QString m_searchKeywords; }; } //namespace Internal diff --git a/src/plugins/qt4projectmanager/qtversionmanager.ui b/src/plugins/qt4projectmanager/qtversionmanager.ui index 3cb3d40d858..90cbdd9dfda 100644 --- a/src/plugins/qt4projectmanager/qtversionmanager.ui +++ b/src/plugins/qt4projectmanager/qtversionmanager.ui @@ -2,254 +2,251 @@ Qt4ProjectManager::Internal::QtVersionManager - - - 0 - 0 - 577 - 507 - - - + Qt versions - - - - - 6 - - - 0 - + + + - - - - 21 - 23 - + + + true - - + + + 3 + + + Name + + + + + QMake Location + + + + + Debugging Helper + + - - - - 21 - 23 - + + + 6 - - - + + 0 - - - - - - Qt::Vertical - - - - 10 - 40 - - - + + + + + 21 + 23 + + + + + + + + + + + + + 21 + 23 + + + + - + + + + + + + Qt::Vertical + + + + 10 + 40 + + + + + - - - - 0 - - - - - - 0 - 0 - + + + + + + Version Name: - - - - - 0 - 0 - - + + + + + - <!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0//EN" "http://www.w3.org/TR/REC-html40/strict.dtd"> + QMake Location: + + + + + + + + + + MinGW Directory: + + + + + + + + + + MSVC Version: + + + + + + + + + + 0 + 0 + + + + + + + + + 0 + 0 + + + + <!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0//EN" "http://www.w3.org/TR/REC-html40/strict.dtd"> <html><head><meta name="qrichtext" content="1" /><style type="text/css"> p, li { white-space: pre-wrap; } </style></head><body style=" font-family:'MS Shell Dlg 2'; font-size:8.25pt; font-weight:400; font-style:normal;"> <p style=" margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px;"><span style=" color:#ff0000;">Unable to detect MSVC version.</span></p></body></html> + + + + + + + + + S60 SDK: - - - - - - - - - 0 - 0 - + + + + + + + CSL/GCCE Directory: + + + + + + + + + Carbide Directory: + + + + + + + + + + Debugging Helper: + + + + + + + + + + 0 + 0 + + + + + + + + + + + Show &Log + + + + + + + &Rebuild + + + + + + + - - - - Show &Log - - - - - - - &Rebuild - - - - - - - true - - - 3 - - - - Name - - - - - QMake Location - - - - - Debugging Helper - - - - - - - - Version Name: - - - - - - - - - - QMake Location: - - - - - - - - - - MinGW Directory: - - - - - - - - - - MSVC Version: - - - - - - - S60 SDK: - - - - - - - - - - CSL/GCCE Directory: - - - - - - - - - - Carbide Directory: - - - - - - - - - - Debugging Helper: - - - - - - - - - - - - + + Default Qt Version: - + diff --git a/src/plugins/subversion/settingspage.cpp b/src/plugins/subversion/settingspage.cpp index 93b9ef0a1e1..85ed2e7bfbc 100644 --- a/src/plugins/subversion/settingspage.cpp +++ b/src/plugins/subversion/settingspage.cpp @@ -37,6 +37,7 @@ #include #include +#include #include 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); +} diff --git a/src/plugins/subversion/settingspage.h b/src/plugins/subversion/settingspage.h index 02479154cff..f355fce0bb2 100644 --- a/src/plugins/subversion/settingspage.h +++ b/src/plugins/subversion/settingspage.h @@ -55,6 +55,8 @@ public: SubversionSettings settings() const; void setSettings(const SubversionSettings &); + QString searchKeywords() const; + private: Ui::SettingsPage m_ui; }; @@ -75,8 +77,10 @@ public: QWidget *createPage(QWidget *parent); void apply(); void finish() { } + virtual bool matches(const QString &) const; private: + QString m_searchKeywords; SettingsPageWidget* m_widget; }; diff --git a/src/plugins/subversion/settingspage.ui b/src/plugins/subversion/settingspage.ui index 743702e684b..e7f4b177b36 100644 --- a/src/plugins/subversion/settingspage.ui +++ b/src/plugins/subversion/settingspage.ui @@ -6,117 +6,91 @@ 0 0 - 575 - 437 + 473 + 295 - + - - - - - - - Prompt to submit - - - - - - - - - Qt::Vertical - - - QSizePolicy::Fixed - - - - 20 - 20 - - - - - - - - 0 - - - - - Subversion Command: - - - - - - - - - - - - Authentication - - - true - - - - - - User name: - - - - - - - - - - Password: - - - - - - - QLineEdit::Password - - - - - - - - - - Qt::Vertical - - - - 20 - 40 - - - - - + + + Configuration + + + + + + Subversion Command: + + + + + + + + - + + + Authentication + + + true + + + + + + User name: + + + + + + + + + + Password: + + + + + + + QLineEdit::Password + + + + + + + + + + Miscellaneous + + + + + + Prompt on submit + + + + + + + + - Qt::Horizontal + Qt::Vertical - 105 - 20 + 20 + 40 diff --git a/src/plugins/texteditor/behaviorsettingspage.cpp b/src/plugins/texteditor/behaviorsettingspage.cpp index ed013c6b610..86b7acac5df 100644 --- a/src/plugins/texteditor/behaviorsettingspage.cpp +++ b/src/plugins/texteditor/behaviorsettingspage.cpp @@ -35,6 +35,7 @@ #include #include +#include using namespace TextEditor; @@ -46,6 +47,7 @@ struct BehaviorSettingsPage::BehaviorSettingsPagePrivate Ui::BehaviorSettingsPage m_page; TabSettings m_tabSettings; StorageSettings m_storageSettings; + QString m_searchKeywords; }; BehaviorSettingsPage::BehaviorSettingsPagePrivate::BehaviorSettingsPagePrivate @@ -95,6 +97,15 @@ QWidget *BehaviorSettingsPage::createPage(QWidget *parent) QWidget *w = new 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.groupBoxTabAndIndentSettings->title() + << ' ' << m_d->m_page.groupBoxStorageSettings->title(); + m_d->m_searchKeywords.remove(QLatin1Char('&')); + } return w; } @@ -167,3 +178,8 @@ StorageSettings BehaviorSettingsPage::storageSettings() const { return m_d->m_storageSettings; } + +bool BehaviorSettingsPage::matches(const QString &s) const +{ + return m_d->m_searchKeywords.contains(s, Qt::CaseInsensitive); +} diff --git a/src/plugins/texteditor/behaviorsettingspage.h b/src/plugins/texteditor/behaviorsettingspage.h index 2bc524198fc..007c11a303e 100644 --- a/src/plugins/texteditor/behaviorsettingspage.h +++ b/src/plugins/texteditor/behaviorsettingspage.h @@ -70,6 +70,8 @@ public: TabSettings tabSettings() const; StorageSettings storageSettings() const; + virtual bool matches(const QString &s) const; + signals: void tabSettingsChanged(const TextEditor::TabSettings &); void storageSettingsChanged(const TextEditor::StorageSettings &); diff --git a/src/plugins/texteditor/behaviorsettingspage.ui b/src/plugins/texteditor/behaviorsettingspage.ui index c20e2aaad12..8ba86f0f59c 100644 --- a/src/plugins/texteditor/behaviorsettingspage.ui +++ b/src/plugins/texteditor/behaviorsettingspage.ui @@ -138,7 +138,7 @@ - + Tab key performs auto-indent: diff --git a/src/plugins/texteditor/displaysettingspage.cpp b/src/plugins/texteditor/displaysettingspage.cpp index 9f4fa6a90aa..ceb011a50c7 100644 --- a/src/plugins/texteditor/displaysettingspage.cpp +++ b/src/plugins/texteditor/displaysettingspage.cpp @@ -34,6 +34,7 @@ #include #include +#include using namespace TextEditor; @@ -44,6 +45,7 @@ struct DisplaySettingsPage::DisplaySettingsPagePrivate const DisplaySettingsPageParameters m_parameters; Ui::DisplaySettingsPage m_page; DisplaySettings m_displaySettings; + QString m_searchKeywords; }; DisplaySettingsPage::DisplaySettingsPagePrivate::DisplaySettingsPagePrivate @@ -92,6 +94,17 @@ QWidget *DisplaySettingsPage::createPage(QWidget *parent) QWidget *w = new QWidget(parent); m_d->m_page.setupUi(w); settingsToUI(); + if (m_d->m_searchKeywords.isEmpty()) { + QTextStream(&m_d->m_searchKeywords) << m_d->m_page.displayLineNumbers->text() + << ' ' << m_d->m_page.highlightCurrentLine->text() + << ' ' << m_d->m_page.displayFoldingMarkers->text() + << ' ' << m_d->m_page.highlightBlocks->text() + << ' ' << m_d->m_page.visualizeWhitespace->text() + << ' ' << m_d->m_page.animateMatchingParentheses->text() + << ' ' << m_d->m_page.enableTextWrapping->text() + << ' ' << m_d->m_page.mouseNavigation->text(); + m_d->m_searchKeywords.remove(QLatin1Char('&')); + } return w; } @@ -160,3 +173,8 @@ void DisplaySettingsPage::setDisplaySettings(const DisplaySettings &newDisplaySe emit displaySettingsChanged(newDisplaySettings); } } + +bool DisplaySettingsPage::matches(const QString &s) const +{ + return m_d->m_searchKeywords.contains(s, Qt::CaseInsensitive); +} diff --git a/src/plugins/texteditor/displaysettingspage.h b/src/plugins/texteditor/displaysettingspage.h index f9d8ab3b13f..902e984a57e 100644 --- a/src/plugins/texteditor/displaysettingspage.h +++ b/src/plugins/texteditor/displaysettingspage.h @@ -65,6 +65,7 @@ public: QWidget *createPage(QWidget *parent); void apply(); void finish() { } + virtual bool matches(const QString &s) const; DisplaySettings displaySettings() const; void setDisplaySettings(const DisplaySettings &); diff --git a/src/plugins/texteditor/fontsettingspage.cpp b/src/plugins/texteditor/fontsettingspage.cpp index 898f775cc46..de2bf702f0d 100644 --- a/src/plugins/texteditor/fontsettingspage.cpp +++ b/src/plugins/texteditor/fontsettingspage.cpp @@ -133,6 +133,7 @@ public: Ui::FontSettingsPage ui; SchemeListModel *m_schemeListModel; bool m_refreshingSchemeList; + QString m_searchKeywords; }; } // namespace Internal @@ -367,6 +368,8 @@ 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(); return w; } @@ -618,3 +621,8 @@ const FontSettings &FontSettingsPage::fontSettings() const { return d_ptr->m_value; } + +bool FontSettingsPage::matches(const QString &s) const +{ + return d_ptr->m_searchKeywords.contains(s, Qt::CaseInsensitive); +} diff --git a/src/plugins/texteditor/fontsettingspage.h b/src/plugins/texteditor/fontsettingspage.h index e2095a3fce5..d9d90272847 100644 --- a/src/plugins/texteditor/fontsettingspage.h +++ b/src/plugins/texteditor/fontsettingspage.h @@ -97,6 +97,7 @@ public: QWidget *createPage(QWidget *parent); void apply(); void finish(); + virtual bool matches(const QString &) const; void saveSettings(); diff --git a/src/plugins/texteditor/fontsettingspage.ui b/src/plugins/texteditor/fontsettingspage.ui index 1cd02f47a8d..cb7f5d1fb6a 100644 --- a/src/plugins/texteditor/fontsettingspage.ui +++ b/src/plugins/texteditor/fontsettingspage.ui @@ -12,13 +12,13 @@ - + Font - + 0 @@ -57,7 +57,7 @@ - + 0 @@ -103,7 +103,7 @@ - + Color Scheme diff --git a/src/plugins/vcsbase/vcsbasesettingspage.ui b/src/plugins/vcsbase/vcsbasesettingspage.ui index a535a107069..b2db722b00e 100644 --- a/src/plugins/vcsbase/vcsbasesettingspage.ui +++ b/src/plugins/vcsbase/vcsbasesettingspage.ui @@ -2,115 +2,78 @@ VCSBaseSettingsPage - - - 0 - 0 - 536 - 407 - - - + - - - Common - - - - - - - - - - - - Wrap submit message at: - - - - - - - false - - - 40 - - - 200 - - - 72 - - - - - - - Qt::Horizontal - - - - 40 - 20 - - - - - - - - - - - - QFormLayout::WrapLongRows - - - - - An executable which is called with the submit message in a temporary file as first argument. It should return with an exit != 0 and a message on standard error to indicate failure. - - - Submit message check script: - - - - - - - - - - A file listing user names and email addresses in a 4-column mailmap format: + + + + QFormLayout::WrapLongRows + + + + + An executable which is called with the submit message in a temporary file as first argument. It should return with an exit != 0 and a message on standard error to indicate failure. + + + Submit message check script: + + + + + + + + + + A file listing user names and email addresses in a 4-column mailmap format: name <email> alias <email> - - - User/alias configuration file: - - - - - - - - - - A simple file containing lines with field names like "Reviewed-By:" which will be added below the submit editor. - - - User fields configuration file: - - - - - - - - - + + + User/alias configuration file: + + + + + + + + + + A simple file containing lines with field names like "Reviewed-By:" which will be added below the submit editor. + + + User fields configuration file: + + + + + + + + + + Wrap submit message at: + + + + + + + false + + + characters + + + 40 + + + 200 + + + 72 + + @@ -120,10 +83,13 @@ name <email> alias <email> Qt::Vertical + + QSizePolicy::MinimumExpanding + - 20 - 307 + 0 + 0 @@ -139,22 +105,5 @@ name <email> alias <email> - - - lineWrapCheckBox - toggled(bool) - lineWrapSpinBox - setEnabled(bool) - - - 186 - 58 - - - 225 - 58 - - - - +