From 1ebb72b47f95bf34da6b3dc9883366e642849058 Mon Sep 17 00:00:00 2001 From: Robert Loehning Date: Tue, 11 Feb 2020 14:30:19 +0100 Subject: [PATCH 01/10] Squish: Update expected tooltips Change-Id: I88c5757b1f3beda34773ec3738779094a8441c2f Reviewed-by: Christian Stenger --- tests/system/suite_editors/tst_qml_editor/test.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/tests/system/suite_editors/tst_qml_editor/test.py b/tests/system/suite_editors/tst_qml_editor/test.py index 633e9fcbdc1..56179134cbd 100644 --- a/tests/system/suite_editors/tst_qml_editor/test.py +++ b/tests/system/suite_editors/tst_qml_editor/test.py @@ -157,7 +157,7 @@ def testHovering(): if JIRA.isBugStillOpen(20020): expectedValues[0] = {'text':'
Rectangle  ' '
'} - alternativeValues[0] = {"text":"

Rectangle

"} + alternativeValues[0] = {"text":"Rectangle"} verifyHoveringOnEditor(editor, lines, additionalKeyPresses, expectedTypes, expectedValues, alternativeValues) test.log("Testing hovering expressions") openDocument(focusDocumentPath % "focus\\.qml") @@ -174,5 +174,5 @@ def testHovering(): additionalKeyPresses = ["", "", "", ""] expectedTypes = ["ColorTip", "TextTip"] expectedValues = ["#D1DBBD", {"text":'
number  
'}] - alternativeValues = ["#D6DBBD", {"text":"

number

"}] + alternativeValues = ["#D6DBBD", {"text":"number"}] verifyHoveringOnEditor(editor, lines, additionalKeyPresses, expectedTypes, expectedValues, alternativeValues) From 1b2aa56f15ca27e0e8760875fd1ff9accbe9717e Mon Sep 17 00:00:00 2001 From: Orgad Shaneh Date: Wed, 9 Oct 2019 23:30:19 +0300 Subject: [PATCH 02/10] Git: Add grep and pickaxe filters MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Fixes: QTCREATORBUG-22512 Change-Id: I98eed9a7f9da15e163804a0fd81713149a06c5b0 Reviewed-by: Leena Miettinen Reviewed-by: André Hartmann --- src/plugins/git/gitclient.cpp | 12 ++++- src/plugins/git/giteditor.cpp | 45 +++++++++++++++- src/plugins/git/giteditor.h | 10 ++++ src/plugins/git/gitplugin.cpp | 54 +++++++++++++++++++- src/plugins/vcsbase/basevcseditorfactory.cpp | 9 ++-- 5 files changed, 120 insertions(+), 10 deletions(-) diff --git a/src/plugins/git/gitclient.cpp b/src/plugins/git/gitclient.cpp index 525fca7aba3..7ba46935dba 100644 --- a/src/plugins/git/gitclient.cpp +++ b/src/plugins/git/gitclient.cpp @@ -999,8 +999,9 @@ void GitClient::log(const QString &workingDirectory, const QString &fileName, const QString title = tr("Git Log \"%1\"").arg(msgArg); const Id editorId = Git::Constants::GIT_LOG_EDITOR_ID; const QString sourceFile = VcsBaseEditor::getSource(workingDir, fileName); - VcsBaseEditorWidget *editor = createVcsEditor(editorId, title, sourceFile, - codecFor(CodecLogOutput), "logTitle", msgArg); + GitEditorWidget *editor = static_cast( + createVcsEditor(editorId, title, sourceFile, + codecFor(CodecLogOutput), "logTitle", msgArg)); VcsBaseEditorConfig *argWidget = editor->editorConfig(); if (!argWidget) { argWidget = new GitLogArgumentsWidget(settings(), !fileName.isEmpty(), editor->toolBar()); @@ -1018,6 +1019,13 @@ void GitClient::log(const QString &workingDirectory, const QString &fileName, arguments << "-n" << QString::number(logCount); arguments << argWidget->arguments(); + const QString grepValue = editor->grepValue(); + if (!grepValue.isEmpty()) + arguments << "--grep=" + grepValue; + + const QString pickaxeValue = editor->pickaxeValue(); + if (!pickaxeValue.isEmpty()) + arguments << "-S" << pickaxeValue; if (!fileName.isEmpty()) arguments << "--" << fileName; diff --git a/src/plugins/git/giteditor.cpp b/src/plugins/git/giteditor.cpp index 78b8389da18..d9c29afebf4 100644 --- a/src/plugins/git/giteditor.cpp +++ b/src/plugins/git/giteditor.cpp @@ -35,10 +35,11 @@ #include "githighlighters.h" #include -#include -#include #include +#include +#include +#include #include #include @@ -380,5 +381,45 @@ QString GitEditorWidget::sourceWorkingDirectory() const return path.toString(); } +void GitEditorWidget::lineEditChanged() +{ + if (VcsBaseEditorConfig *config = editorConfig()) + config->handleArgumentsChanged(); +} + +void GitEditorWidget::refreshOnLineEdit(Utils::FancyLineEdit *lineEdit) +{ + connect(lineEdit, &QLineEdit::returnPressed, + this, &GitEditorWidget::lineEditChanged); + connect(lineEdit, &Utils::FancyLineEdit::rightButtonClicked, + this, &GitEditorWidget::lineEditChanged); +} + +void GitEditorWidget::setGrepLineEdit(Utils::FancyLineEdit *lineEdit) +{ + m_grepLineEdit = lineEdit; + refreshOnLineEdit(lineEdit); +} + +void GitEditorWidget::setPickaxeLineEdit(Utils::FancyLineEdit *lineEdit) +{ + m_pickaxeLineEdit = lineEdit; + refreshOnLineEdit(lineEdit); +} + +QString GitEditorWidget::grepValue() const +{ + if (!m_grepLineEdit) + return QString(); + return m_grepLineEdit->text(); +} + +QString GitEditorWidget::pickaxeValue() const +{ + if (!m_pickaxeLineEdit) + return QString(); + return m_pickaxeLineEdit->text(); +} + } // namespace Internal } // namespace Git diff --git a/src/plugins/git/giteditor.h b/src/plugins/git/giteditor.h index a23a4fe76d3..bc7df7fe9e6 100644 --- a/src/plugins/git/giteditor.h +++ b/src/plugins/git/giteditor.h @@ -29,6 +29,8 @@ #include +namespace Utils { class FancyLineEdit; } + namespace Git { namespace Internal { @@ -40,6 +42,10 @@ public: GitEditorWidget(); void setPlainText(const QString &text) override; + void setGrepLineEdit(Utils::FancyLineEdit *lineEdit); + void setPickaxeLineEdit(Utils::FancyLineEdit *lineEdit); + QString grepValue() const; + QString pickaxeValue() const; private: void applyDiffChunk(const VcsBase::DiffChunk& chunk, bool revert); @@ -59,9 +65,13 @@ private: bool supportChangeLinks() const override; QString fileNameForLine(int line) const override; QString sourceWorkingDirectory() const; + void refreshOnLineEdit(Utils::FancyLineEdit *lineEdit); + void lineEditChanged(); mutable QRegExp m_changeNumberPattern; QString m_currentChange; + Utils::FancyLineEdit *m_grepLineEdit = nullptr; + Utils::FancyLineEdit *m_pickaxeLineEdit = nullptr; }; } // namespace Git diff --git a/src/plugins/git/gitplugin.cpp b/src/plugins/git/gitplugin.cpp index a4731b07b7b..b04db69e94f 100644 --- a/src/plugins/git/gitplugin.cpp +++ b/src/plugins/git/gitplugin.cpp @@ -54,11 +54,13 @@ #include #include #include +#include #include #include #include -#include +#include +#include #include #include #include @@ -83,7 +85,9 @@ #include #include #include +#include #include +#include #ifdef WITH_TESTS #include @@ -125,6 +129,52 @@ private: GitClient *m_client; }; +class GitLogEditorWidget : public QWidget +{ + Q_DECLARE_TR_FUNCTIONS(Git::Internal::GitLogEditorWidget); +public: + GitLogEditorWidget() + { + auto gitEditor = new GitEditorWidget; + auto vlayout = new QVBoxLayout; + auto hlayout = new QHBoxLayout; + vlayout->setSpacing(0); + vlayout->setContentsMargins(0, 0, 0, 0); + auto grepLineEdit = addLineEdit(tr("Filter by message"), + tr("Filter log entries by text in the commit message.")); + auto pickaxeLineEdit = addLineEdit(tr("Filter by content"), + tr("Filter log entries by added or removed string.")); + hlayout->setSpacing(20); + hlayout->setContentsMargins(0, 0, 0, 0); + hlayout->addWidget(new QLabel(tr("Filter:"))); + hlayout->addWidget(grepLineEdit); + hlayout->addWidget(pickaxeLineEdit); + hlayout->addStretch(); + vlayout->addLayout(hlayout); + vlayout->addWidget(gitEditor); + setLayout(vlayout); + gitEditor->setGrepLineEdit(grepLineEdit); + gitEditor->setPickaxeLineEdit(pickaxeLineEdit); + + auto textAgg = Aggregation::Aggregate::parentAggregate(gitEditor); + auto agg = textAgg ? textAgg : new Aggregation::Aggregate; + agg->add(this); + agg->add(gitEditor); + setFocusProxy(gitEditor); + } + +private: + FancyLineEdit *addLineEdit(const QString &placeholder, const QString &tooltip) + { + auto lineEdit = new FancyLineEdit; + lineEdit->setFiltering(true); + lineEdit->setToolTip(tooltip); + lineEdit->setPlaceholderText(placeholder); + lineEdit->setMaximumWidth(200); + return lineEdit; + } +}; + const unsigned minimumRequiredVersion = 0x010900; const VcsBaseSubmitEditorParameters submitParameters { @@ -346,7 +396,7 @@ public: VcsEditorFactory logEditorFactory { &logEditorParameters, - [] { return new GitEditorWidget; }, + [] { return new GitLogEditorWidget; }, std::bind(&GitPluginPrivate::describe, this, _1, _2) }; diff --git a/src/plugins/vcsbase/basevcseditorfactory.cpp b/src/plugins/vcsbase/basevcseditorfactory.cpp index 13346949cfe..12f467afa05 100644 --- a/src/plugins/vcsbase/basevcseditorfactory.cpp +++ b/src/plugins/vcsbase/basevcseditorfactory.cpp @@ -71,10 +71,11 @@ VcsEditorFactory::VcsEditorFactory(const VcsBaseEditorParameters *parameters, return document; }); - setEditorWidgetCreator([parameters, editorWidgetCreator, describeFunc]() -> TextEditorWidget * { - auto widget = qobject_cast(editorWidgetCreator()); - widget->setDescribeFunc(describeFunc); - widget->setParameters(parameters); + setEditorWidgetCreator([parameters, editorWidgetCreator, describeFunc]() { + auto widget = editorWidgetCreator(); + auto editorWidget = Aggregation::query(widget); + editorWidget->setDescribeFunc(describeFunc); + editorWidget->setParameters(parameters); return widget; }); From 4960b2ac2a0e554cb7a0f3ffb08e3fd29e58e092 Mon Sep 17 00:00:00 2001 From: Alessandro Portale Date: Mon, 17 Feb 2020 13:51:33 +0100 Subject: [PATCH 03/10] Android: Use FilePath::fromUserInput for user input ... or when reading non-Qt config files. FilePath::fromString would make FilePath keep native dir delimiters, which would cause wrong negatives for example in FilePath::isChildOf(). This change here fixes that AndroidToolChain:::isValid incorrectly returned true. Change-Id: I28b321fe3c4064f61b78dc7fc36b8af3d18b806c Reviewed-by: Assam Boudjelthia Reviewed-by: hjk --- src/plugins/android/androidsettingswidget.cpp | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/src/plugins/android/androidsettingswidget.cpp b/src/plugins/android/androidsettingswidget.cpp index d34f3c4ab9c..bd7b1add50f 100644 --- a/src/plugins/android/androidsettingswidget.cpp +++ b/src/plugins/android/androidsettingswidget.cpp @@ -538,7 +538,7 @@ Utils::FilePath AndroidSettingsWidget::findJdkInCommonPaths() { QString jdkFromEnvVar = QString::fromLocal8Bit(getenv("JAVA_HOME")); if (!jdkFromEnvVar.isEmpty()) - return Utils::FilePath::fromString(jdkFromEnvVar); + return Utils::FilePath::fromUserInput(jdkFromEnvVar); if (Utils::HostOsInfo::isWindowsHost()) { QString jdkRegisteryPath = "HKEY_LOCAL_MACHINE\\SOFTWARE\\JavaSoft\\JDK\\"; @@ -549,7 +549,7 @@ Utils::FilePath AndroidSettingsWidget::findJdkInCommonPaths() for (const QString &version : jdkVersions) { jdkSettings.beginGroup(version); - jdkHome = Utils::FilePath::fromString(jdkSettings.value("JavaHome").toString()); + jdkHome = Utils::FilePath::fromUserInput(jdkSettings.value("JavaHome").toString()); jdkSettings.endGroup(); if (version.startsWith("1.8")) return jdkHome; @@ -583,7 +583,7 @@ Utils::FilePath AndroidSettingsWidget::findJdkInCommonPaths() void AndroidSettingsWidget::validateNdk() { - auto ndkPath = Utils::FilePath::fromString(m_ui->ndkListComboBox->currentText()); + auto ndkPath = Utils::FilePath::fromUserInput(m_ui->ndkListComboBox->currentText()); m_androidConfig.setNdkLocation(ndkPath); auto summaryWidget = static_cast(m_ui->androidDetailsWidget->widget()); @@ -612,7 +612,7 @@ void AndroidSettingsWidget::onSdkPathChanged() void AndroidSettingsWidget::validateSdk() { - auto sdkPath = Utils::FilePath::fromString(m_ui->SDKLocationPathChooser->rawPath()); + auto sdkPath = Utils::FilePath::fromUserInput(m_ui->SDKLocationPathChooser->rawPath()); m_androidConfig.setSdkLocation(sdkPath); auto summaryWidget = static_cast(m_ui->androidDetailsWidget->widget()); From 30359f725e722114c2f7feb9b7fdb8e3e9e5919c Mon Sep 17 00:00:00 2001 From: Andre Hartmann Date: Sun, 16 Feb 2020 21:16:41 +0100 Subject: [PATCH 04/10] OutputWindow: Reduce scope of local variable Found by cppcheck. Change-Id: I597021ddb3317cf6320bf25eb2d52141fa1e4f80 Reviewed-by: Orgad Shaneh --- src/plugins/coreplugin/outputwindow.cpp | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/src/plugins/coreplugin/outputwindow.cpp b/src/plugins/coreplugin/outputwindow.cpp index 4d70830ccec..3c7941ba6fc 100644 --- a/src/plugins/coreplugin/outputwindow.cpp +++ b/src/plugins/coreplugin/outputwindow.cpp @@ -439,14 +439,13 @@ void OutputWindow::appendMessage(const QString &output, OutputFormat format) if (sameLine) { d->scrollToBottom = true; - int newline = -1; bool enforceNewline = d->enforceNewline; d->enforceNewline = false; if (enforceNewline) { out.prepend('\n'); } else { - newline = out.indexOf(QLatin1Char('\n')); + const int newline = out.indexOf(QLatin1Char('\n')); moveCursor(QTextCursor::End); if (newline != -1) { if (d->formatter) From fff7e32877f11a4a6e0f07a8030f3c9d5eac5584 Mon Sep 17 00:00:00 2001 From: Andre Hartmann Date: Mon, 17 Feb 2020 14:46:04 +0100 Subject: [PATCH 05/10] OutputWindow: Cleanup and modernize Change-Id: Ie78c84e2677cabb144cfc678e5d1007fcae1f33a Reviewed-by: Orgad Shaneh --- src/plugins/coreplugin/outputwindow.cpp | 14 +++++++------- src/plugins/coreplugin/outputwindow.h | 2 +- 2 files changed, 8 insertions(+), 8 deletions(-) diff --git a/src/plugins/coreplugin/outputwindow.cpp b/src/plugins/coreplugin/outputwindow.cpp index 3c7941ba6fc..149c7189fdb 100644 --- a/src/plugins/coreplugin/outputwindow.cpp +++ b/src/plugins/coreplugin/outputwindow.cpp @@ -49,7 +49,7 @@ namespace Internal { class OutputWindowPrivate { public: - OutputWindowPrivate(QTextDocument *document) + explicit OutputWindowPrivate(QTextDocument *document) : cursor(document) { } @@ -159,7 +159,7 @@ OutputWindow::~OutputWindow() delete d; } -void OutputWindow::mousePressEvent(QMouseEvent * e) +void OutputWindow::mousePressEvent(QMouseEvent *e) { d->mouseButtonPressed = e->button(); QPlainTextEdit::mousePressEvent(e); @@ -369,11 +369,11 @@ QString OutputWindow::doNewlineEnforcement(const QString &out) d->scrollToBottom = true; QString s = out; if (d->enforceNewline) { - s.prepend(QLatin1Char('\n')); + s.prepend('\n'); d->enforceNewline = false; } - if (s.endsWith(QLatin1Char('\n'))) { + if (s.endsWith('\n')) { d->enforceNewline = true; // make appendOutputInline put in a newline next time s.chop(1); } @@ -445,7 +445,7 @@ void OutputWindow::appendMessage(const QString &output, OutputFormat format) if (enforceNewline) { out.prepend('\n'); } else { - const int newline = out.indexOf(QLatin1Char('\n')); + const int newline = out.indexOf('\n'); moveCursor(QTextCursor::End); if (newline != -1) { if (d->formatter) @@ -457,7 +457,7 @@ void OutputWindow::appendMessage(const QString &output, OutputFormat format) if (out.isEmpty()) { d->enforceNewline = true; } else { - if (out.endsWith(QLatin1Char('\n'))) { + if (out.endsWith('\n')) { d->enforceNewline = true; out.chop(1); } @@ -500,7 +500,7 @@ void OutputWindow::appendText(const QString &textIn, const QTextCharFormat &form tmp.setFontWeight(QFont::Bold); d->cursor.insertText(doNewlineEnforcement(tr("Additional output omitted. You can increase " "the limit in the \"Build & Run\" settings.") - + QLatin1Char('\n')), tmp); + + '\n'), tmp); } d->cursor.endEditBlock(); diff --git a/src/plugins/coreplugin/outputwindow.h b/src/plugins/coreplugin/outputwindow.h index 8490caa5d49..509ae6dfab0 100644 --- a/src/plugins/coreplugin/outputwindow.h +++ b/src/plugins/coreplugin/outputwindow.h @@ -109,7 +109,7 @@ private: QString doNewlineEnforcement(const QString &out); void filterNewContent(); - Internal::OutputWindowPrivate *d; + Internal::OutputWindowPrivate *d = nullptr; }; } // namespace Core From da42176da8401855688c333f02b583e8154aa95f Mon Sep 17 00:00:00 2001 From: Andre Hartmann Date: Mon, 17 Feb 2020 14:30:13 +0100 Subject: [PATCH 06/10] QmlPuppet: Fix unused parameter warnings Change-Id: I3bd5f921a3ca1f6067fac6e232f383f0b1be5463 Reviewed-by: Miikka Heikkinen --- .../qt5informationnodeinstanceserver.cpp | 15 +++++++++++++++ 1 file changed, 15 insertions(+) diff --git a/share/qtcreator/qml/qmlpuppet/qml2puppet/instances/qt5informationnodeinstanceserver.cpp b/share/qtcreator/qml/qmlpuppet/qml2puppet/instances/qt5informationnodeinstanceserver.cpp index 4af404869ad..a30f972025e 100644 --- a/share/qtcreator/qml/qmlpuppet/qml2puppet/instances/qt5informationnodeinstanceserver.cpp +++ b/share/qtcreator/qml/qmlpuppet/qml2puppet/instances/qt5informationnodeinstanceserver.cpp @@ -348,6 +348,8 @@ void Qt5InformationNodeInstanceServer::handleView3DDestroyed(QObject *obj) removeNode3D(view->scene()); if (view && view == m_active3DView) m_active3DView = nullptr; +#else + Q_UNUSED(obj) #endif } @@ -362,6 +364,8 @@ void Qt5InformationNodeInstanceServer::handleNode3DDestroyed(QObject *obj) Q_ARG(QVariant, objectToVariant(obj))); } removeNode3D(obj); +#else + Q_UNUSED(obj) #endif } @@ -656,6 +660,8 @@ QObject *Qt5InformationNodeInstanceServer::findView3DForInstance(const ServerNod if (view && sceneRoot == view->importScene()) return view3D; } +#else + Q_UNUSED(instance) #endif return {}; } @@ -676,6 +682,8 @@ QObject *Qt5InformationNodeInstanceServer::findView3DForSceneRoot(QObject *scene return view3D; } } +#else + Q_UNUSED(sceneRoot) #endif return {}; } @@ -743,6 +751,8 @@ QObject *Qt5InformationNodeInstanceServer::find3DSceneRoot(const ServerNodeInsta } } } +#else + Q_UNUSED(instance) #endif return nullptr; } @@ -759,6 +769,8 @@ QObject *Qt5InformationNodeInstanceServer::find3DSceneRoot(QObject *obj) const if (view && view->scene() == obj) return obj; } +#else + Q_UNUSED(obj) #endif // Some other non-instance object, assume it's not part of any scene return nullptr; @@ -800,6 +812,9 @@ void Qt5InformationNodeInstanceServer::setup3DEditView(const QList Date: Mon, 17 Feb 2020 09:08:48 +0100 Subject: [PATCH 07/10] Squish: Fix compiler toolchains on macOS Change-Id: I95aa7f0c91bc538ec7ada3ea04a8285b5cbe5f9c Reviewed-by: Robert Loehning --- .../settings/mac/QtProject/qtcreator/toolchains.xml | 12 ++++++------ tests/system/shared/qtcreator.py | 2 +- 2 files changed, 7 insertions(+), 7 deletions(-) diff --git a/tests/system/settings/mac/QtProject/qtcreator/toolchains.xml b/tests/system/settings/mac/QtProject/qtcreator/toolchains.xml index 411027599df..ac3136362c7 100644 --- a/tests/system/settings/mac/QtProject/qtcreator/toolchains.xml +++ b/tests/system/settings/mac/QtProject/qtcreator/toolchains.xml @@ -9,7 +9,7 @@ x86-linux-generic-elf-64bit x86-linux-generic-elf-32bit - x86-macos-generic-mach_o-64bit + x86-darwin-generic-mach_o-64bit SET_BY_SQUISH false @@ -23,8 +23,8 @@ /usr/bin/clang++ - x86-macos-generic-mach_o-64bit - x86-macos-generic-mach_o-32bit + x86-darwin-generic-mach_o-64bit + x86-darwin-generic-mach_o-32bit SET_BY_SQUISH false @@ -38,8 +38,8 @@ /usr/bin/clang - x86-macos-generic-mach_o-64bit - x86-macos-generic-mach_o-32bit + x86-darwin-generic-mach_o-64bit + x86-darwin-generic-mach_o-32bit SET_BY_SQUISH false @@ -55,7 +55,7 @@ x86-linux-generic-elf-64bit x86-linux-generic-elf-32bit - x86-macos-generic-mach_o-64bit + x86-darwin-generic-mach_o-64bit SET_BY_SQUISH false diff --git a/tests/system/shared/qtcreator.py b/tests/system/shared/qtcreator.py index 295a9ed2cff..76dbd7071d6 100644 --- a/tests/system/shared/qtcreator.py +++ b/tests/system/shared/qtcreator.py @@ -212,7 +212,7 @@ def __guessABI__(supportedABIs, use64Bit): if platform.system() == 'Linux': supportedABIs = filter(lambda x: 'linux' in x, supportedABIs) elif platform.system() == 'Darwin': - supportedABIs = filter(lambda x: 'macos' in x, supportedABIs) + supportedABIs = filter(lambda x: 'darwin' in x, supportedABIs) if use64Bit: searchFor = "64bit" else: From 086b4eef07f44f9bbc4b1e65ed158616a7b39ed6 Mon Sep 17 00:00:00 2001 From: Eike Ziller Date: Fri, 14 Feb 2020 16:48:22 +0100 Subject: [PATCH 08/10] Plugin wizard: Enable building against Qt Creator snapshots in github workflow Change-Id: I36a6ffb878c5bc6a59219424cab5b71bdc12bf33 Reviewed-by: Cristian Adam --- .../wizards/qtcreatorplugin/github_workflow_README.md | 8 ++++---- .../qtcreatorplugin/github_workflow_build_qmake.yml | 10 ++++++++-- 2 files changed, 12 insertions(+), 6 deletions(-) diff --git a/share/qtcreator/templates/wizards/qtcreatorplugin/github_workflow_README.md b/share/qtcreator/templates/wizards/qtcreatorplugin/github_workflow_README.md index d4019e46440..8481ed15ae9 100644 --- a/share/qtcreator/templates/wizards/qtcreatorplugin/github_workflow_README.md +++ b/share/qtcreator/templates/wizards/qtcreatorplugin/github_workflow_README.md @@ -16,7 +16,10 @@ The value for `QT_VERSION` specifies the Qt version to use for building the plug The value for `QT_CREATOR_VERSION` specifies the Qt Creator version to use for building the plugin. -You need to keep these two values updated for different versions of your plugin, and take care +The value for `QT_CREATOR_SNAPSHOT` can either be `NO` or `latest` or the build ID of a specific +snapshot build for the Qt Creator version that you specified. + +You need to keep these values updated for different versions of your plugin, and take care that the Qt version and Qt Creator version you specify are compatible. ## What it does @@ -35,7 +38,4 @@ The build job consists of several steps: If your plugin requires additional resources besides the plugin library, you need to adapt the script accordingly. -Only released versions of Qt and Qt Creator are supported. Building against Qt Creator snapshots -is currently not supported. - [1]: https://help.github.com/en/actions/automating-your-workflow-with-github-actions/about-github-actions diff --git a/share/qtcreator/templates/wizards/qtcreatorplugin/github_workflow_build_qmake.yml b/share/qtcreator/templates/wizards/qtcreatorplugin/github_workflow_build_qmake.yml index 8c86a99020d..9cf6aa07826 100644 --- a/share/qtcreator/templates/wizards/qtcreatorplugin/github_workflow_build_qmake.yml +++ b/share/qtcreator/templates/wizards/qtcreatorplugin/github_workflow_build_qmake.yml @@ -5,6 +5,7 @@ on: [push] env: QT_VERSION: %{JS: Util.qtVersion()} QT_CREATOR_VERSION: %{JS: Util.qtCreatorVersion()} + QT_CREATOR_SNAPSHOT: NO PLUGIN_PRO: %{ProFile} PLUGIN_NAME: %{PluginName} @@ -114,7 +115,12 @@ jobs: shell: cmake -P {0} run: | string(REGEX MATCH "([0-9]+.[0-9]+).[0-9]+" outvar "$ENV{QT_CREATOR_VERSION}") - set(qtc_base_url "https://download.qt.io/official_releases/qtcreator/${CMAKE_MATCH_1}/$ENV{QT_CREATOR_VERSION}") + + set(qtc_base_url "https://download.qt.io/official_releases/qtcreator/${CMAKE_MATCH_1}/$ENV{QT_CREATOR_VERSION}/installer_source") + set(qtc_snapshot "$ENV{QT_CREATOR_SNAPSHOT}") + if (qtc_snapshot) + set(qtc_base_url "https://download.qt.io/snapshots/qtcreator/${CMAKE_MATCH_1}/$ENV{QT_CREATOR_VERSION}/installer_source/${qtc_snapshot}") + endif() if ("${{ runner.os }}" STREQUAL "Windows") set(qtc_output_directory "qtcreator/lib/qtcreator/plugins") @@ -142,7 +148,7 @@ jobs: foreach(package qtcreator qtcreator_dev) file(DOWNLOAD - "${qtc_base_url}/installer_source/${qtc_platform}/${package}.7z" ./${package}.7z SHOW_PROGRESS) + "${qtc_base_url}/${qtc_platform}/${package}.7z" ./${package}.7z SHOW_PROGRESS) execute_process(COMMAND ${CMAKE_COMMAND} -E tar xvf ../${package}.7z WORKING_DIRECTORY qtcreator) endforeach() From d06eee52186928dd297d1cb3137c0821e6777d93 Mon Sep 17 00:00:00 2001 From: Leena Miettinen Date: Fri, 14 Feb 2020 16:55:29 +0100 Subject: [PATCH 09/10] Doc: Fix QDoc warnings in Core plugin dialogs classes - Fix IOptionsPage class docs - Mark PromptOverwriteDialog and ReadOnlyFilesDialog Fixes: QTCREATORBUG-23608 Change-Id: I6a646f0bd68230a7c5f80bd748bda20729f23b74 Reviewed-by: Eike Ziller --- .../images/qtcreator-options-dialog.png | Bin 0 -> 21703 bytes .../coreplugin/dialogs/ioptionspage.cpp | 71 +++++++++++------- .../dialogs/promptoverwritedialog.cpp | 4 +- .../dialogs/readonlyfilesdialog.cpp | 24 +++++- 4 files changed, 68 insertions(+), 31 deletions(-) create mode 100644 doc/qtcreatordev/images/qtcreator-options-dialog.png diff --git a/doc/qtcreatordev/images/qtcreator-options-dialog.png b/doc/qtcreatordev/images/qtcreator-options-dialog.png new file mode 100644 index 0000000000000000000000000000000000000000..02a446b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zVjS<^Jp6U-LtwRE#rpI2jpEkrJ-5N(&+|%VfwIk7ZEPPnN^Hc=>gK&o`14@PcSWxK zM{AcBKaxDjJfTvBZRsmP0cQqbd1v#x`wBmQ+dAuA#<76oXQ~%VaD8^>to?Vp_s`aB z)7HB&wcVC$Evr(@&N^lFCu1XujijIYI z&F|K|e0uwO4%f@if1c-^KeN;J)Z*EX?e*{1eSSVa|Ig38**h86W%H zXOez}91X}bT`cCjb51sI-B&^9LbkQ8pgKw`DdV{B_S_vcw{Q6dzWei{+kAW7p6{J* zkK5<(&p!M%{!e1|v)K8+1B=f^lkM0>{zdUg6 z$*lrQbD80lI$?jlg15O# zeQg|sYIm$MX|u``yQ{H#+8y6E`?gQfw{_;)wjNJSzd7eiTl4L7Lly^p!;-(e+v7fM z(>`9uwL4POIXt%XswF7Th4QR@tGq!uYqsp&=P9P#S;q})SdIuZNbGt#X?w2hZ_PK$ zB&0eexOBJd_&&o9lp-%Bzt|Oho)E|K1-_!vZ=VVcPaRPcM1v-`$pb`y03{O1N=W z*w5mivO*h!#+M88+PB^RfB40dg&*f0;+r-tKxdERzi;{fzs&|6bf72u0AvyDh(Ayr r2xG&K^@JboC-Gi_iD5>>fBWe9FPf9$byXP{7#KWV{an^LB{Ts5AyDCp literal 0 HcmV?d00001 diff --git a/src/plugins/coreplugin/dialogs/ioptionspage.cpp b/src/plugins/coreplugin/dialogs/ioptionspage.cpp index 531466d8ad5..e2d2ea5e9ce 100644 --- a/src/plugins/coreplugin/dialogs/ioptionspage.cpp +++ b/src/plugins/coreplugin/dialogs/ioptionspage.cpp @@ -39,12 +39,25 @@ using namespace Utils; +/*! + \class Core::IOptionsPageProvider + \inmodule QtCreator + \internal +*/ +/*! + \class Core::IOptionsPageWidget + \inmodule QtCreator + \internal +*/ + /*! \class Core::IOptionsPage - \mainclass - \inmodule Qt Creator + \ingroup mainclasses + \inmodule QtCreator \brief The IOptionsPage class is an interface for providing pages for the - \gui Options dialog (called \gui Preferences on Mac OS). + \uicontrol Options dialog (called \uicontrol Preferences on \macos). + + \image qtcreator-options-dialog.png */ /*! @@ -64,31 +77,28 @@ using namespace Utils; \fn Id IOptionsPage::category() const Returns the unique id for the category that the options page should be displayed in. This id is - used for sorting the list on the left side of the \gui Options dialog. + used for sorting the list on the left side of the \uicontrol Options dialog. */ /*! \fn QString IOptionsPage::displayCategory() const Returns the translated category name of the options page. This name is displayed in the list on - the left side of the \gui Options dialog. + the left side of the \uicontrol Options dialog. */ /*! - \fn QIcon IOptionsPage::categoryIcon() const - Returns the category icon of the options page. This icon is displayed in the list on the left - side of the \gui Options dialog. + side of the \uicontrol Options dialog. */ - QIcon Core::IOptionsPage::categoryIcon() const { return m_categoryIcon.icon(); } /*! - This sets a callback to create page widgets on demand. The widget will - be destroyed on \c finish. + Sets the \a widgetCreator callback to create page widgets on demand. The + widget will be destroyed on finish(). */ void Core::IOptionsPage::setWidgetCreator(const WidgetCreator &widgetCreator) { @@ -96,16 +106,14 @@ void Core::IOptionsPage::setWidgetCreator(const WidgetCreator &widgetCreator) } /*! - \fn QWidget *IOptionsPage::widget() - - Returns the widget to show in the \gui Options dialog. You should create a widget lazily here, + Returns the widget to show in the \uicontrol Options dialog. You should create a widget lazily here, and delete it again in the finish() method. This method can be called multiple times, so you should only create a new widget if the old one was deleted. - Alternatively, use \c setWidgetCreator to set a callback function that is used to + Alternatively, use setWidgetCreator() to set a callback function that is used to lazily create a widget in time. - Either override this function in a derived class, or set a \c widgetCreator. + Either override this function in a derived class, or set a widget creator. */ QWidget *Core::IOptionsPage::widget() @@ -117,10 +125,12 @@ QWidget *Core::IOptionsPage::widget() } /*! - This is called when selecting the \gui Apply button on the options page dialog. It should detect - whether any changes were made and store those. + Called when selecting the \uicontrol Apply button on the options page dialog. + Should detect whether any changes were made and store those. - Either override this function in a derived class, or set a \c widgetCreator. + Either override this function in a derived class, or set a widget creator. + + \sa setWidgetCreator() */ void Core::IOptionsPage::apply() @@ -131,10 +141,12 @@ void Core::IOptionsPage::apply() } /*! - This is called directly before the \gui Options dialog closes. Here you should delete the widget that - was created in widget() to free resources. + Called directly before the \uicontrol Options dialog closes. Here you should + delete the widget that was created in widget() to free resources. - Either override this function in a derived class, or set a \c widgetCreator. + Either override this function in a derived class, or set a widget creator. + + \sa setWidgetCreator() */ void Core::IOptionsPage::finish() @@ -146,6 +158,10 @@ void Core::IOptionsPage::finish() } } +/*! + Sets \a categoryIconPath as the path to the category icon of the options + page. +*/ void Core::IOptionsPage::setCategoryIconPath(const QString &categoryIconPath) { m_categoryIcon = Icon({{categoryIconPath, Theme::PanelTextColorDark}}, Icon::Tint); @@ -176,7 +192,7 @@ void Core::IOptionsPage::setCategoryIconPath(const QString &categoryIconPath) */ /*! - \fn void IOptionsPage::setCategoryIcon(const QString &categoryIcon) + \fn void IOptionsPage::setCategoryIcon(const Utils::Icon &categoryIcon) Sets \a categoryIcon as the category icon of the options page. */ @@ -185,7 +201,7 @@ static QList g_optionsPages; /*! Constructs an options page with the given \a parent and registers it - at the global options page pool if \a registerGlobally is true. + at the global options page pool if \a registerGlobally is \c true. */ Core::IOptionsPage::IOptionsPage(QObject *parent, bool registerGlobally) : QObject(parent) @@ -195,20 +211,23 @@ Core::IOptionsPage::IOptionsPage(QObject *parent, bool registerGlobally) } /*! - Destroys the options page. + \internal */ Core::IOptionsPage::~IOptionsPage() { g_optionsPages.removeOne(this); } +/*! + Returns a list of all options pages. + */ const QList Core::IOptionsPage::allOptionsPages() { return g_optionsPages; } /*! - Is used by the \gui Options dialog search filter to match \a searchKeyWord to this options + Is used by the \uicontrol Options dialog search filter to match \a searchKeyWord to this options page. This defaults to take the widget and then looks for all child labels, check boxes, push buttons, and group boxes. Should return \c true when a match is found. */ diff --git a/src/plugins/coreplugin/dialogs/promptoverwritedialog.cpp b/src/plugins/coreplugin/dialogs/promptoverwritedialog.cpp index a9434616c90..d29c56aef01 100644 --- a/src/plugins/coreplugin/dialogs/promptoverwritedialog.cpp +++ b/src/plugins/coreplugin/dialogs/promptoverwritedialog.cpp @@ -39,7 +39,9 @@ enum { FileNameRole = Qt::UserRole + 1 }; /*! - \class Core::Internal::PromptOverwriteDialog + \class Core::PromptOverwriteDialog + \inmodule QtCreator + \internal \brief The PromptOverwriteDialog class implements a dialog that asks users whether they want to overwrite files. diff --git a/src/plugins/coreplugin/dialogs/readonlyfilesdialog.cpp b/src/plugins/coreplugin/dialogs/readonlyfilesdialog.cpp index d9d11277a8f..d41445d8f79 100644 --- a/src/plugins/coreplugin/dialogs/readonlyfilesdialog.cpp +++ b/src/plugins/coreplugin/dialogs/readonlyfilesdialog.cpp @@ -133,16 +133,32 @@ ReadOnlyFilesDialogPrivate::~ReadOnlyFilesDialogPrivate() using namespace Internal; /*! - * \class ReadOnlyFilesDialog + * \class Core::ReadOnlyFilesDialog + * \inmodule QtCreator + * \internal * \brief The ReadOnlyFilesDialog class implements a dialog to show a set of * files that are classified as not writable. * * Automatically checks which operations are allowed to make the file writable. These operations - * are Make Writable which tries to set the file permissions in the file system, - * Open With Version Control System if the open operation is allowed by the version control system - * and Save As which is used to save the changes to a document in another file. + * are \c MakeWritable (RO_MakeWritable), which tries to set the file permissions in the file system, + * \c OpenWithVCS (RO_OpenVCS) if the open operation is allowed by the version control system, + * and \c SaveAs (RO_SaveAs), which is used to save the changes to a document under another file + * name. */ +/*! \enum ReadOnlyFilesDialog::ReadOnlyResult + This enum holds the operations that are allowed to make the file writable. + + \value RO_Cancel + Cancels the operation. + \value RO_OpenVCS + Opens the file under control of the version control system. + \value RO_MakeWritable + Sets the file permissions in the file system. + \value RO_SaveAs + Saves changes to a document under another file name. +*/ + ReadOnlyFilesDialog::ReadOnlyFilesDialog(const Utils::FilePaths &filePaths, QWidget *parent) : QDialog(parent) , d(new ReadOnlyFilesDialogPrivate(this)) From 8046e3311f225c1224527157d0a3e27b8e980736 Mon Sep 17 00:00:00 2001 From: Leena Miettinen Date: Thu, 13 Feb 2020 16:14:56 +0100 Subject: [PATCH 10/10] Doc: Fix QDoc warnings in Find classes - Document BaseTextFind and FindSupport - Mark undocumented classes and namespaces \internal - Add and fix docs for IFindFilter, SearchResult, and SearchResultWindow Fixes: QTCREATORBUG-23600 Change-Id: Ic9445f7f15562f114f4cbd9fe16988d7249d48db Reviewed-by: Eike Ziller --- .../src/common-extension-tasks.qdoc | 7 +- src/plugins/coreplugin/find/basetextfind.cpp | 83 +++++++- src/plugins/coreplugin/find/findplugin.cpp | 6 +- .../find/highlightscrollbarcontroller.cpp | 12 ++ src/plugins/coreplugin/find/ifindfilter.cpp | 120 +++++++---- src/plugins/coreplugin/find/ifindsupport.cpp | 113 ++++++++++ src/plugins/coreplugin/find/itemviewfind.cpp | 6 + src/plugins/coreplugin/find/optionspopup.cpp | 6 + .../coreplugin/find/searchresultwindow.cpp | 196 ++++++++++++++---- src/plugins/coreplugin/icore.cpp | 27 ++- 10 files changed, 485 insertions(+), 91 deletions(-) diff --git a/doc/qtcreatordev/src/common-extension-tasks.qdoc b/doc/qtcreatordev/src/common-extension-tasks.qdoc index 1cf6c90c768..36f88967818 100644 --- a/doc/qtcreatordev/src/common-extension-tasks.qdoc +++ b/doc/qtcreatordev/src/common-extension-tasks.qdoc @@ -86,13 +86,13 @@ \row \li Add a find filter to the \uicontrol Find dialog. \li Implement any kind of search term based search. - \li \l{Find::IFindFilter}, \l{Core::SearchResultWindow} + \li \l{Core::IFindFilter}, \l{Core::SearchResultWindow} \row \li Add support for the find tool bar to a widget. \li The widget that has focus is asked whether it supports text search. You can add support for widgets under your control. - \li \l{Core::IFindSupport}, \l{Find::BaseTextFind} + \li \l{Core::IFindSupport}, \l{Core::BaseTextFind} \omit \row @@ -111,8 +111,7 @@ \li For a text typed in by the user you provide a list of things to show in the popup. When the user selects an entry you are requested to do whatever you want. - \li \l{Core::ILocatorFilter}, \l{Core::LocatorFilterEntry}, - \l{Locator::BaseFileFilter} + \li \l{Core::ILocatorFilter}, \l{Core::BaseFileFilter} \row \li Show a progress indicator for a concurrently running task. diff --git a/src/plugins/coreplugin/find/basetextfind.cpp b/src/plugins/coreplugin/find/basetextfind.cpp index ef7042bd5de..2d3cb7de0b5 100644 --- a/src/plugins/coreplugin/find/basetextfind.cpp +++ b/src/plugins/coreplugin/find/basetextfind.cpp @@ -81,17 +81,54 @@ BaseTextFindPrivate::BaseTextFindPrivate(QPlainTextEdit *editor) { } +/*! + \class Core::BaseTextFind + \inmodule QtCreator + + \brief The BaseTextFind class implements a find filter for QPlainTextEdit + and QTextEdit based widgets. + + \sa Core::IFindFilter +*/ + +/*! + \fn void BaseTextFind::findScopeChanged(const QTextCursor &start, + const QTextCursor &end, + int verticalBlockSelectionFirstColumn, + int verticalBlockSelectionLastColumn) + + This signal is emitted when the search + scope changes to \a start, \a end, + \a verticalBlockSelectionFirstColumn, and + \a verticalBlockSelectionLastColumn. +*/ + +/*! + \fn void BaseTextFind::highlightAllRequested(const QString &txt, Core::FindFlags findFlags) + + This signal is emitted when the search results for \a txt using the given + \a findFlags should be highlighted in the editor widget. +*/ + +/*! + \internal +*/ BaseTextFind::BaseTextFind(QTextEdit *editor) : d(new BaseTextFindPrivate(editor)) { } - +/*! + \internal +*/ BaseTextFind::BaseTextFind(QPlainTextEdit *editor) : d(new BaseTextFindPrivate(editor)) { } +/*! + \internal +*/ BaseTextFind::~BaseTextFind() { delete d; @@ -121,28 +158,43 @@ bool BaseTextFind::isReadOnly() const return d->m_editor ? d->m_editor->isReadOnly() : d->m_plaineditor->isReadOnly(); } +/*! + \reimp +*/ bool BaseTextFind::supportsReplace() const { return !isReadOnly(); } +/*! + \reimp +*/ FindFlags BaseTextFind::supportedFindFlags() const { return FindBackward | FindCaseSensitively | FindRegularExpression | FindWholeWords | FindPreserveCase; } +/*! + \reimp +*/ void BaseTextFind::resetIncrementalSearch() { d->m_incrementalStartPos = -1; d->m_incrementalWrappedState = false; } +/*! + \reimp +*/ void BaseTextFind::clearHighlights() { highlightAll(QString(), {}); } +/*! + \reimp +*/ QString BaseTextFind::currentFindString() const { QTextCursor cursor = textCursor(); @@ -168,6 +220,9 @@ QString BaseTextFind::currentFindString() const return QString(); } +/*! + \reimp +*/ QString BaseTextFind::completedFindString() const { QTextCursor cursor = textCursor(); @@ -176,6 +231,9 @@ QString BaseTextFind::completedFindString() const return cursor.selectedText(); } +/*! + \reimp +*/ IFindSupport::Result BaseTextFind::findIncremental(const QString &txt, FindFlags findFlags) { QTextCursor cursor = textCursor(); @@ -195,6 +253,9 @@ IFindSupport::Result BaseTextFind::findIncremental(const QString &txt, FindFlags return found ? Found : NotFound; } +/*! + \reimp +*/ IFindSupport::Result BaseTextFind::findStep(const QString &txt, FindFlags findFlags) { bool wrapped = false; @@ -208,6 +269,9 @@ IFindSupport::Result BaseTextFind::findStep(const QString &txt, FindFlags findFl return found ? Found : NotFound; } +/*! + \reimp +*/ void BaseTextFind::replace(const QString &before, const QString &after, FindFlags findFlags) { QTextCursor cursor = replaceInternal(before, after, findFlags); @@ -259,6 +323,9 @@ QTextCursor BaseTextFind::replaceInternal(const QString &before, const QString & return cursor; } +/*! + \reimp +*/ bool BaseTextFind::replaceStep(const QString &before, const QString &after, FindFlags findFlags) { QTextCursor cursor = replaceInternal(before, after, findFlags); @@ -269,6 +336,10 @@ bool BaseTextFind::replaceStep(const QString &before, const QString &after, Find return found; } +/*! + \reimp + Returns the number of search hits replaced. +*/ int BaseTextFind::replaceAll(const QString &before, const QString &after, FindFlags findFlags) { QTextCursor editCursor = textCursor(); @@ -408,6 +479,9 @@ bool BaseTextFind::inScope(int startPosition, int endPosition) const && d->m_findScopeEnd.position() >= endPosition); } +/*! + \reimp +*/ void BaseTextFind::defineFindScope() { QTextCursor cursor = textCursor(); @@ -436,6 +510,9 @@ void BaseTextFind::defineFindScope() } } +/*! + \reimp +*/ void BaseTextFind::clearFindScope() { d->m_findScopeStart = QTextCursor(); @@ -447,6 +524,10 @@ void BaseTextFind::clearFindScope() d->m_findScopeVerticalBlockSelectionLastColumn); } +/*! + \reimp + Emits highlightAllRequested(). +*/ void BaseTextFind::highlightAll(const QString &txt, FindFlags findFlags) { emit highlightAllRequested(txt, findFlags); diff --git a/src/plugins/coreplugin/find/findplugin.cpp b/src/plugins/coreplugin/find/findplugin.cpp index 04236779184..aa3165547c8 100644 --- a/src/plugins/coreplugin/find/findplugin.cpp +++ b/src/plugins/coreplugin/find/findplugin.cpp @@ -53,11 +53,13 @@ #include /*! - \namespace Core::Internal + \namespace Core::Internal::ItemDataRoles \internal */ + /*! - \namespace Core::Internal::ItemDataRoles + \class Core::Find + \inmodule QtCreator \internal */ diff --git a/src/plugins/coreplugin/find/highlightscrollbarcontroller.cpp b/src/plugins/coreplugin/find/highlightscrollbarcontroller.cpp index b9d07b70da4..f68739f1e22 100644 --- a/src/plugins/coreplugin/find/highlightscrollbarcontroller.cpp +++ b/src/plugins/coreplugin/find/highlightscrollbarcontroller.cpp @@ -36,6 +36,18 @@ using namespace Utils; namespace Core { +/*! + \class Core::Highlight + \inmodule QtCreator + \internal +*/ + +/*! + \class Core::HighlightScrollBarController + \inmodule QtCreator + \internal +*/ + class HighlightScrollBarOverlay : public QWidget { public: diff --git a/src/plugins/coreplugin/find/ifindfilter.cpp b/src/plugins/coreplugin/find/ifindfilter.cpp index c861d1e0df9..fef203a1f8c 100644 --- a/src/plugins/coreplugin/find/ifindfilter.cpp +++ b/src/plugins/coreplugin/find/ifindfilter.cpp @@ -33,27 +33,32 @@ #include /*! - \class Find::IFindFilter + \class Core::IFindFilter + \inmodule QtCreator \brief The IFindFilter class is the base class for find implementations - that are invoked by selecting \gui Edit > \gui {Find/Replace} > - \gui {Advanced Find}. + that are invoked by selecting \uicontrol Edit > \uicontrol {Find/Replace} > + \uicontrol {Advanced Find}. - Implementations of this class add an additional \gui Scope to the \gui {Advanced + Implementations of this class add an additional \uicontrol Scope to the \uicontrol {Advanced Find} dialog. That can be any search that requires the user to provide a text based search term (potentially with find flags like searching case sensitively or using regular expressions). Existing - scopes are \gui {All Projects} that searches from all files in all projects - and \gui {Files in File System} where the user provides a directory and file + scopes are \uicontrol {All Projects} that searches from all files in all projects + and \uicontrol {Files in File System} where the user provides a directory and file patterns to search. + \image qtcreator-search-filesystem.png + To make your find scope available to the user, you need to implement this class, and register an instance of your subclass in the plugin manager. A common way to present the search results to the user, is to use the - shared \gui{Search Results} panel. + shared \uicontrol{Search Results} pane. + + \image qtcreator-searchresults.png If you want to implement a find filter that is doing a file based text - search, you should use Find::BaseFileFind, which already implements all + search, you should use \l Core::BaseTextFind, which already implements all the details for this kind of search, only requiring you to provide an iterator over the file names of the files that should be searched. @@ -62,19 +67,18 @@ \li Start your search in a separate thread \li Make this known to the Core::ProgressManager, for a progress bar and the ability to cancel the search - \li Interface with the shared \gui{Search Results} panel, to show + \li Interface with the shared \uicontrol{Search Results} pane, to show the search results, handle the event that the user click on one of the search result items, and possible handle a global replace of all or some of the search result items. \endlist - Luckily QtConcurrent and the search result panel provide the frameworks + Luckily QtConcurrent and the search results pane provide the frameworks that make it relatively easy to implement, while ensuring a common way for the user. - The common pattern is roughly this: - - Implement the actual search within a QtConcurrent based function, that is + The common pattern is roughly to first implement the actual search + within a QtConcurrent based function. That is a function that takes a \c{QFutureInterface &future} as the first parameter and the other information needed for the search as additional parameters. It should set useful progress information @@ -82,21 +86,17 @@ and \c{future.isCanceled()}, and report the search results (possibly in chunks) via \c{future.reportResult}. - In the find filter's find/replaceAll function, get the shared - \gui{Search Results} window, initiate a new search and connect the + In the find filter's \c find() or \c replaceAll() function, get the shared + \uicontrol{Search Results} window, initiate a new search and connect the signals for handling selection of results and the replace action (see the Core::SearchResultWindow class for details). Start your search implementation via the corresponding QtConcurrent functions. Add the returned QFuture object to the Core::ProgressManager. Use a QFutureWatcher on the returned QFuture object to receive a signal when your search implementation reports search results, and add these - to the shared \gui{Search Results} window. + to the shared \uicontrol{Search Results} window. */ -/*! - \fn IFindFilter::~IFindFilter() - \internal -*/ /*! \fn QString IFindFilter::id() const @@ -110,7 +110,8 @@ Returns the name of the find filter or scope as presented to the user. This is the name that appears in the scope selection combo box, for example. - Always return a translatable string (that is, use tr() for the return value). + Always return a translatable string. That is, use \c tr() for the return + value. */ /*! @@ -118,20 +119,18 @@ Returns whether the user should be able to select this find filter at the moment. - This is used for the \gui {Current Projects} scope, for example. If the user + This is used for the \uicontrol {Current Projects} scope, for example. If the user has not opened a project, the scope is disabled. - \sa changed() + \sa enabledChanged() */ /*! - \fn QKeySequence IFindFilter::defaultShortcut() const - Returns the shortcut that can be used to open the advanced find - dialog with this filter or scope preselected. + \fn bool IFindFilter::isValid() const + Returns whether the find filter is valid. - Usually return an empty shortcut here, the user can still choose and - assign a specific shortcut to this find scope via the preferences. + \sa validChanged() */ /*! @@ -143,7 +142,7 @@ */ /*! - \fn bool showSearchTermInput() const + \fn bool IFindFilter::showSearchTermInput() const Returns whether the find filter wants to show the search term line edit. The default value is \c true, override this function to return \c false, if @@ -151,14 +150,14 @@ */ /*! - \fn void IFindFilter::findAll(const QString &txt, Core::FindFlags findFlags) + \fn void IFindFilter::findAll(const QString &txt, FindFlags findFlags) This function is called when the user selected this find scope and initiated a search. You should start a thread which actually performs the search for \a txt using the given \a findFlags - (add it to Core::ProgressManager for a progress bar!) and presents the - search results to the user (using the \gui{Search Results} output pane). + (add it to Core::ProgressManager for a progress bar) and presents the + search results to the user (using the \uicontrol{Search Results} output pane). For more information, see the descriptions of this class, Core::ProgressManager, and Core::SearchResultWindow. @@ -168,7 +167,7 @@ */ /*! - \fn void IFindFilter::replaceAll(const QString &txt, Core::FindFlags findFlags) + \fn void IFindFilter::replaceAll(const QString &txt, FindFlags findFlags) Override this function if you want to support search and replace. This function is called when the user selected this find scope and @@ -177,8 +176,8 @@ You should start a thread which actually performs the search for \a txt using the given \a findFlags - (add it to Core::ProgressManager for a progress bar!) and presents the - search results to the user (using the \gui{Search Results} output pane). + (add it to Core::ProgressManager for a progress bar) and presents the + search results to the user (using the \uicontrol{Search Results} output pane). For more information see the descriptions of this class, Core::ProgressManager, and Core::SearchResultWindow. @@ -192,7 +191,7 @@ Returns a widget that contains additional controls for options for this find filter. - The widget will be shown below the common options in the \gui {Advanced Find} + The widget will be shown below the common options in the \uicontrol {Advanced Find} dialog. It will be reparented and deleted by the find plugin. */ @@ -211,44 +210,71 @@ /*! \fn void IFindFilter::enabledChanged(bool enabled) - Signals that the enabled state of this find filter has changed. + This signal is emitted when the \a enabled state of this find filter + changes. */ /*! - \fn Core::FindFlags BaseTextFind::supportedFindFlags() const - Returns the find flags, like whole words or regular expressions, - that this find filter supports. + \fn void IFindFilter::validChanged(bool valid) - Depending on the returned value, the default find option widgets are - enabled or disabled. - The default is Find::FindCaseSensitively, Find::FindRegularExpression - and Find::FindWholeWords + This signal is emitted when the \a valid state of this find filter changes. +*/ + +/*! + \fn void IFindFilter::displayNameChanged() + + This signal is emitted when the display name of this find filter changes. */ namespace Core { static QList g_findFilters; +/*! + \internal +*/ IFindFilter::IFindFilter() { g_findFilters.append(this); } +/*! + \internal +*/ IFindFilter::~IFindFilter() { g_findFilters.removeOne(this); } +/*! + Returns a list of find filters. +*/ const QList IFindFilter::allFindFilters() { return g_findFilters; } +/*! + Returns the shortcut that can be used to open the advanced find + dialog with this filter or scope preselected. + + Usually return an empty shortcut here, the user can still choose and + assign a specific shortcut to this find scope via the preferences. +*/ QKeySequence IFindFilter::defaultShortcut() const { return QKeySequence(); } +/*! + Returns the find flags, like whole words or regular expressions, + that this find filter supports. + + Depending on the returned value, the default find option widgets are + enabled or disabled. + The default is Core::FindCaseSensitively, Core::FindRegularExpression + and Core::FindWholeWords. +*/ FindFlags IFindFilter::supportedFindFlags() const { return FindCaseSensitively @@ -256,6 +282,9 @@ FindFlags IFindFilter::supportedFindFlags() const | FindWholeWords; } +/*! + Returns icons for the find flags \a flags. +*/ QPixmap IFindFilter::pixmapForFindFlags(FindFlags flags) { static const QPixmap casesensitiveIcon = Icons::FIND_CASE_INSENSITIVELY.pixmap(); @@ -300,6 +329,9 @@ QPixmap IFindFilter::pixmapForFindFlags(FindFlags flags) return pixmap; } +/*! + Returns descriptive text labels for the find flags \a flags. +*/ QString IFindFilter::descriptionForFindFlags(FindFlags flags) { QStringList flagStrings; diff --git a/src/plugins/coreplugin/find/ifindsupport.cpp b/src/plugins/coreplugin/find/ifindsupport.cpp index da54c5b41ea..f36bea2146d 100644 --- a/src/plugins/coreplugin/find/ifindsupport.cpp +++ b/src/plugins/coreplugin/find/ifindsupport.cpp @@ -30,6 +30,106 @@ using namespace Core; +/*! + \class Core::IFindSupport + \inmodule QtCreator + \brief The IFindSupport class provides functions for searching in a document + or widget. + + \sa Core::BaseTextFind +*/ + +/*! + \enum IFindSupport::Result + This enum holds whether the search term was found within the search scope + using the find flags. + + \value Found The search term was found. + \value NotFound The search term was not found. + \value NotYetFound The search term has not been found yet. +*/ + +/*! + \fn IFindSupport::IFindSupport() + \internal +*/ + +/*! + \fn IFindSupport::~IFindSupport() + \internal +*/ + +/*! + \fn bool IFindSupport::supportsReplace() const + Returns whether the find filter supports search and replace. +*/ + +/*! + \fn FindFlags IFindSupport::supportedFindFlags() const + Returns the find flags, such as whole words or regular expressions, + that this find filter supports. + + Depending on the returned value, the default find option widgets are + enabled or disabled. + + The default is Core::FindBackward, Core::FindCaseSensitively, + Core::FindRegularExpression, Core::FindWholeWords, and + Core::FindPreserveCase. +*/ + +/*! + \fn void IFindSupport::resetIncrementalSearch() + Resets incremental search to start position. +*/ + +/*! + \fn void IFindSupport::clearHighlights() + Clears highlighting of search results in the searched widget. +*/ + +/*! + \fn QString IFindSupport::currentFindString() const + Returns the current search string. +*/ + +/*! + \fn QString IFindSupport::completedFindString() const + Returns the complete search string. +*/ + +/*! + \fn void IFindSupport::highlightAll(const QString &txt, FindFlags findFlags) + Highlights all search hits for \a txt when using \a findFlags. +*/ + +/*! + \fn Result IFindSupport::findIncremental(const QString &txt, FindFlags findFlags) + Performs an incremental search of the search term \a txt using \a findFlags. +*/ + +/*! + \fn Result IFindSupport::findStep(const QString &txt, FindFlags findFlags) + Searches for \a txt using \a findFlags. +*/ + +/*! + \fn void IFindSupport::defineFindScope() + Defines the find scope. +*/ + +/*! + \fn void IFindSupport::clearFindScope() + Clears the find scope. +*/ + +/*! + \fn void IFindSupport::changed() + This signal is emitted when the search changes. +*/ + +/*! + Replaces \a before with \a after as specified by \a findFlags. +*/ void IFindSupport::replace(const QString &before, const QString &after, FindFlags findFlags) { Q_UNUSED(before) @@ -37,6 +137,12 @@ void IFindSupport::replace(const QString &before, const QString &after, FindFlag Q_UNUSED(findFlags) } +/*! + Replaces \a before with \a after as specified by \a findFlags, and then + performs findStep(). + + Returns whether the find step found another match. +*/ bool IFindSupport::replaceStep(const QString &before, const QString &after, FindFlags findFlags) { Q_UNUSED(before) @@ -45,6 +151,10 @@ bool IFindSupport::replaceStep(const QString &before, const QString &after, Find return false; } +/*! + Finds and replaces all instances of \a before with \a after as specified by + \a findFlags. +*/ int IFindSupport::replaceAll(const QString &before, const QString &after, FindFlags findFlags) { Q_UNUSED(before) @@ -53,6 +163,9 @@ int IFindSupport::replaceAll(const QString &before, const QString &after, FindFl return 0; } +/*! + Shows \a parent overlayed with the wrap indicator. +*/ void IFindSupport::showWrapIndicator(QWidget *parent) { Utils::FadingIndicator::showPixmap(parent, Utils::StyleHelper::dpiSpecificImageFile( diff --git a/src/plugins/coreplugin/find/itemviewfind.cpp b/src/plugins/coreplugin/find/itemviewfind.cpp index 3f07dff596c..ae1103a165f 100644 --- a/src/plugins/coreplugin/find/itemviewfind.cpp +++ b/src/plugins/coreplugin/find/itemviewfind.cpp @@ -35,6 +35,12 @@ namespace Core { +/*! + \class Core::ItemViewFind + \inmodule QtCreator + \internal +*/ + class ItemModelFindPrivate { public: diff --git a/src/plugins/coreplugin/find/optionspopup.cpp b/src/plugins/coreplugin/find/optionspopup.cpp index d7274f87e0c..b766cee1624 100644 --- a/src/plugins/coreplugin/find/optionspopup.cpp +++ b/src/plugins/coreplugin/find/optionspopup.cpp @@ -37,6 +37,12 @@ namespace Core { +/*! + \class Core::OptionsPopup + \inmodule QtCreator + \internal +*/ + OptionsPopup::OptionsPopup(QWidget *parent, const QVector &commands) : QWidget(parent, Qt::Popup) { diff --git a/src/plugins/coreplugin/find/searchresultwindow.cpp b/src/plugins/coreplugin/find/searchresultwindow.cpp index ec723c89285..a9895f720c8 100644 --- a/src/plugins/coreplugin/find/searchresultwindow.cpp +++ b/src/plugins/coreplugin/find/searchresultwindow.cpp @@ -53,6 +53,30 @@ static const int MAX_SEARCH_HISTORY = 12; namespace Core { +/*! + \namespace Core::Search + \inmodule QtCreator + \internal +*/ + +/*! + \class Core::Search::TextPosition + \inmodule QtCreator + \internal +*/ + +/*! + \class Core::Search::TextRange + \inmodule QtCreator + \internal +*/ + +/*! + \class Core::SearchResultItem + \inmodule QtCreator + \internal +*/ + namespace Internal { class InternalScrollArea : public QScrollArea @@ -236,6 +260,7 @@ using namespace Core::Internal; /*! \class Core::SearchResult + \inmodule QtCreator \brief The SearchResult class reports user interaction, such as the activation of a search result item. @@ -251,46 +276,99 @@ using namespace Core::Internal; */ /*! - \fn void SearchResult::replaceButtonClicked(const QString &replaceText, const QList &checkedItems, bool preserveCase) + \fn void SearchResult::replaceButtonClicked(const QString &replaceText, + const QList &checkedItems, + bool preserveCase) + Indicates that the user initiated a text replace by selecting - \gui {Replace All}, for example. + \uicontrol {Replace All}, for example. The signal reports the text to use for replacement in \a replaceText, - and the list of search result items that were selected by the user - in \a checkedItems. + the list of search result items that were selected by the user + in \a checkedItems, and whether a search and replace should preserve the + case of the replaced strings in \a preserveCase. The handler of this signal should apply the replace only on the selected items. */ +/*! + \enum Core::SearchResult::AddMode + This enum type specifies whether the search results should be sorted or + ordered: + + \value AddSorted + The search results are sorted. + \value AddOrdered + The search results are ordered. +*/ + +/*! + \fn void SearchResult::cancelled() + This signal is emitted if the user cancels the search. +*/ + +/*! + \fn void SearchResult::countChanged(int count) + This signal is emitted when the number of search hits changes to \a count. +*/ + +/*! + \fn void SearchResult::paused(bool paused) + This signal is emitted when the search status is set to \a paused. +*/ + +/*! + \fn void SearchResult::requestEnabledCheck() + + This signal is emitted when the enabled status of search results is + requested. +*/ + +/*! + \fn void SearchResult::searchAgainRequested() + + This signal is emitted when the \uicontrol {Search Again} button is + selected. +*/ + +/*! + \fn void SearchResult::visibilityChanged(bool visible) + + This signal is emitted when the visibility of the search results changes + to \a visible. +*/ + /*! \class Core::SearchResultWindow + \inmodule QtCreator \brief The SearchResultWindow class is the implementation of a commonly - shared \gui{Search Results} output pane. Use it to show search results - to a user. + shared \uicontrol{Search Results} output pane. + + \image qtcreator-searchresults.png Whenever you want to show the user a list of search results, or want to present UI for a global search and replace, use the single instance of this class. - Except for being an implementation of a output pane, the - SearchResultWindow has a few functions and one enum that allows other + In addition to being an implementation of an output pane, the + SearchResultWindow has functions and enums that enable other plugins to show their search results and hook into the user actions for selecting an entry and performing a global replace. Whenever you start a search, call startNewSearch(SearchMode) to initialize - the \gui {Search Results} output pane. The parameter determines if the GUI for + the \uicontrol {Search Results} output pane. The parameter determines if the GUI for replacing should be shown. The function returns a SearchResult object that is your hook into the signals from user interaction for this search. - When you produce search results, call addResults or addResult to add them - to the \gui {Search Results} output pane. - After the search has finished call finishSearch to inform the - \gui {Search Results} output pane about it. + When you produce search results, call addResults() or addResult() to add them + to the \uicontrol {Search Results} output pane. + After the search has finished call finishSearch() to inform the + \uicontrol {Search Results} output pane about it. - You will get activated signals via your SearchResult instance when - the user selects a search result item, and, if you started the search - with the SearchAndReplace option, the replaceButtonClicked signal - when the user requests a replace. + You will get activated() signals via your SearchResult instance when + the user selects a search result item. If you started the search + with the SearchAndReplace option, the replaceButtonClicked() signal + is emitted when the user requests a replace. */ /*! @@ -298,6 +376,17 @@ using namespace Core::Internal; \internal */ +/*! + \enum SearchResultWindow::PreserveCaseMode + This enum type specifies whether a search and replace should preserve the + case of the replaced strings: + + \value PreserveCaseEnabled + The case is preserved when replacings strings. + \value PreserveCaseDisabled + The given case is used when replacing strings. +*/ + SearchResultWindow *SearchResultWindow::m_instance = nullptr; /*! @@ -322,7 +411,7 @@ SearchResultWindow::~SearchResultWindow() } /*! - Returns the single shared instance of the \gui {Search Results} output pane. + Returns the single shared instance of the \uicontrol {Search Results} output pane. */ SearchResultWindow *SearchResultWindow::instance() { @@ -356,24 +445,31 @@ QList SearchResultWindow::toolBarWidgets() const } /*! - Tells the \gui {Search Results} output pane to start a new search. + Tells the \uicontrol {Search Results} output pane to start a new search. The \a label should be a string that shortly describes the type of the search, that is, the search filter and possibly the most relevant search - option, followed by a colon ':'. For example: \c {Project 'myproject':} + option, followed by a colon (:). For example: \c {Project 'myproject':} The \a searchTerm is shown after the colon. - The \a toolTip should elaborate on the search parameters, like file patterns that are searched and - find flags. - If \a cfgGroup is not empty, it will be used for storing the "do not ask again" - setting of a "this change cannot be undone" warning (which is implicitly requested + + The \a toolTip should elaborate on the search parameters, like file patterns + that are searched and find flags. + + If \a cfgGroup is not empty, it will be used for storing the \e {do not ask again} + setting of a \e {this change cannot be undone} warning (which is implicitly requested by passing a non-empty group). + + The \a searchOrSearchAndReplace parameter holds whether the search + results pane should show a UI for a global search and replace action. + The \a preserveCaseMode parameter holds whether the case of the search + string should be preserved when replacing strings. + Returns a SearchResult object that is used for signaling user interaction with the results of this search. The search result window owns the returned SearchResult - and might delete it any time, even while the search is running - (for example, when the user clears the \gui {Search Results} pane, or when - the user opens so many other searches - that this search falls out of the history). + and might delete it any time, even while the search is running. + For example, when the user clears the \uicontrol {Search Results} pane, or when + the user opens so many other searches that this search falls out of the history. */ SearchResult *SearchResultWindow::startNewSearch(const QString &label, @@ -420,7 +516,7 @@ SearchResult *SearchResultWindow::startNewSearch(const QString &label, } /*! - Clears the current contents of the \gui {Search Results} output pane. + Clears the current contents of the \uicontrol {Search Results} output pane. */ void SearchResultWindow::clearContents() { @@ -495,13 +591,18 @@ void SearchResultWindow::setTextEditorFont(const QFont &font, widget->setTextEditorFont(font, color); } +/*! + Sets the \uicontrol {Search Results} tab width to \a tabWidth. +*/ void SearchResultWindow::setTabWidth(int tabWidth) { d->m_tabWidth = tabWidth; foreach (Internal::SearchResultWidget *widget, d->m_searchResultWidgets) widget->setTabWidth(tabWidth); } - +/*! + Opens a new search panel. +*/ void SearchResultWindow::openNewSearchPanel() { d->setCurrentIndexWithFocus(0); @@ -644,23 +745,32 @@ QString SearchResult::textToReplace() const return m_widget->textToReplace(); } +/*! + Returns the number of search hits. +*/ int SearchResult::count() const { return m_widget->count(); } +/*! + Sets whether the \uicontrol {Seach Again} button is enabled to \a supported. +*/ void SearchResult::setSearchAgainSupported(bool supported) { m_widget->setSearchAgainSupported(supported); } +/*! + Returns a UI for a global search and replace action. +*/ QWidget *SearchResult::additionalReplaceWidget() const { return m_widget->additionalReplaceWidget(); } /*! - Adds a single result line to the \gui {Search Results} output pane. + Adds a single result line to the \uicontrol {Search Results} output pane. \a fileName, \a lineNumber, and \a lineText are shown on the result line. \a searchTermStart and \a searchTermLength specify the region that @@ -683,6 +793,18 @@ void SearchResult::addResult(const QString &fileName, int lineNumber, const QStr m_widget->addResult(fileName, lineText, mainRange, userData); } +/*! + Adds a single result line to the \uicontrol {Search Results} output pane. + + \a mainRange specifies the region from the beginning of the search term + through its length that should be visually marked. + \a fileName and \a lineText are shown on the result line. + You can attach arbitrary \a userData to the search result, which can + be used, for example, when reacting to the signals of the search results + for your search. + + \sa addResults() +*/ void SearchResult::addResult(const QString &fileName, const QString &lineText, Search::TextRange mainRange, @@ -693,7 +815,8 @@ void SearchResult::addResult(const QString &fileName, } /*! - Adds the search result \a items to the \gui {Search Results} output pane. + Adds the search result \a items to the \uicontrol {Search Results} output + pane using \a mode. \sa addResult() */ @@ -704,8 +827,8 @@ void SearchResult::addResults(const QList &items, AddMode mode } /*! - Notifies the \gui {Search Results} output pane that the current search - has finished, and the UI should reflect that. + Notifies the \uicontrol {Search Results} output pane that the current search + has been \a canceled, and the UI should reflect that. */ void SearchResult::finishSearch(bool canceled) { @@ -729,13 +852,16 @@ void SearchResult::restart() m_widget->restart(); } +/*! + Sets whether the \uicontrol {Seach Again} button is enabled to \a enabled. +*/ void SearchResult::setSearchAgainEnabled(bool enabled) { m_widget->setSearchAgainEnabled(enabled); } /*! - * Opens the \gui {Search Results} output pane with this search. + * Opens the \uicontrol {Search Results} output pane with this search. */ void SearchResult::popup() { diff --git a/src/plugins/coreplugin/icore.cpp b/src/plugins/coreplugin/icore.cpp index 83b3f2e2e08..ead03010eb5 100644 --- a/src/plugins/coreplugin/icore.cpp +++ b/src/plugins/coreplugin/icore.cpp @@ -44,6 +44,22 @@ which constitute the basic functionality of \QC. */ +/*! + \enum Core::FindFlag + This enum holds the find flags. + + \value FindBackward + Searches backwards. + \value FindCaseSensitively + Considers case when searching. + \value FindWholeWords + Finds only whole words. + \value FindRegularExpression + Uses a regular epression as a search term. + \value FindPreserveCase + Preserves the case when replacing search terms. +*/ + /*! \namespace Core::Internal \internal @@ -51,6 +67,7 @@ /*! \class Core::ICore + \inmodule QtCreator \brief The ICore class allows access to the different parts that make up the basic functionality of \QC. @@ -58,7 +75,7 @@ instance is created by the Core plugin. You can access this instance from your plugin through \c{Core::instance()}. - \mainclass + \ingroup mainclasses */ /*! @@ -81,7 +98,7 @@ /*! \fn bool ICore::showOptionsDialog(Id group, Id page, QWidget *parent = 0); - Opens the application \gui Options (or \gui Preferences) dialog with preselected + Opens the application \uicontrol Options (or \uicontrol Preferences) dialog with preselected \a page in the specified \a group. The arguments refer to the string IDs of the corresponding IOptionsPage. @@ -230,7 +247,7 @@ \fn void ICore::openFiles(const QStringList &fileNames, OpenFilesFlags flags = None) Opens all files from a list of \a fileNames like it would be done if they were given to \QC on the command line, or - they were opened via \gui File > \gui Open. + they were opened via \uicontrol File > \uicontrol Open. */ /*! @@ -253,12 +270,12 @@ Signals that the user has requested that the global settings should be saved to disk. - At the moment that happens when the application is closed, and on \gui{Save All}. + At the moment that happens when the application is closed, and on \uicontrol{Save All}. */ /*! \fn void ICore::optionsDialogRequested() - Enables plugins to perform actions just before the \gui Tools > \gui Options + Enables plugins to perform actions just before the \uicontrol Tools > \uicontrol Options dialog is shown. */