forked from qt-creator/qt-creator
Show locator filter descriptions more prominently
- Sort items in the menu. - Disable items for disabled filters. - Show a tool tip when hovering over the magnifying glass menu. - Add descriptions to all filters and make them more consistent. Change-Id: Ic03e303c50422f9de5dd3c512fe32bbdc958d2ba Reviewed-by: David Schulz <david.schulz@qt.io> Reviewed-by: Qt CI Bot <qt_ci_bot@qt-project.org>
This commit is contained in:
@@ -19,8 +19,8 @@ BookmarkFilter::BookmarkFilter(BookmarkManager *manager)
|
||||
{
|
||||
setId("Bookmarks");
|
||||
setDisplayName(Tr::tr("Bookmarks"));
|
||||
setDescription(Tr::tr("Matches all bookmarks. Filter by file name, by the text on the line of the "
|
||||
"bookmark, or by the bookmark's note text."));
|
||||
setDescription(Tr::tr("Locates bookmarks. Filter by file name, by the text on the line of the "
|
||||
"bookmark, or by the bookmark's note text."));
|
||||
setPriority(Medium);
|
||||
setDefaultShortcutString("b");
|
||||
}
|
||||
|
@@ -50,6 +50,7 @@ public:
|
||||
{
|
||||
setId({});
|
||||
setDisplayName({});
|
||||
setDescription({});
|
||||
setDefaultShortcutString({});
|
||||
setEnabled(false);
|
||||
setHidden(true);
|
||||
@@ -63,6 +64,7 @@ public:
|
||||
{
|
||||
setId({});
|
||||
setDisplayName({});
|
||||
setDescription({});
|
||||
setDefaultShortcutString({});
|
||||
setEnabled(false);
|
||||
setHidden(true);
|
||||
@@ -82,6 +84,7 @@ public:
|
||||
{
|
||||
setId({});
|
||||
setDisplayName({});
|
||||
setDescription({});
|
||||
setDefaultShortcutString({});
|
||||
setEnabled(false);
|
||||
setHidden(true);
|
||||
@@ -94,6 +97,7 @@ public:
|
||||
LspClassesFilter() {
|
||||
setId({});
|
||||
setDisplayName({});
|
||||
setDescription({});
|
||||
setDefaultShortcutString({});
|
||||
setEnabled(false);
|
||||
setHidden(true);
|
||||
@@ -112,6 +116,7 @@ public:
|
||||
{
|
||||
setId({});
|
||||
setDisplayName({});
|
||||
setDescription({});
|
||||
setDefaultShortcutString({});
|
||||
setEnabled(false);
|
||||
setHidden(true);
|
||||
@@ -125,6 +130,7 @@ public:
|
||||
{
|
||||
setId({});
|
||||
setDisplayName({});
|
||||
setDescription({});
|
||||
setDefaultShortcutString({});
|
||||
setEnabled(false);
|
||||
setHidden(true);
|
||||
@@ -148,6 +154,7 @@ ClangGlobalSymbolFilter::ClangGlobalSymbolFilter(ILocatorFilter *cppFilter,
|
||||
{
|
||||
setId(CppEditor::Constants::LOCATOR_FILTER_ID);
|
||||
setDisplayName(::CppEditor::Tr::tr(CppEditor::Constants::LOCATOR_FILTER_DISPLAY_NAME));
|
||||
setDescription(::CppEditor::Tr::tr(CppEditor::Constants::LOCATOR_FILTER_DESCRIPTION));
|
||||
setDefaultShortcutString(":");
|
||||
setDefaultIncludedByDefault(false);
|
||||
}
|
||||
@@ -175,6 +182,7 @@ ClangClassesFilter::ClangClassesFilter()
|
||||
{
|
||||
setId(CppEditor::Constants::CLASSES_FILTER_ID);
|
||||
setDisplayName(::CppEditor::Tr::tr(CppEditor::Constants::CLASSES_FILTER_DISPLAY_NAME));
|
||||
setDescription(::CppEditor::Tr::tr(CppEditor::Constants::CLASSES_FILTER_DESCRIPTION));
|
||||
setDefaultShortcutString("c");
|
||||
setDefaultIncludedByDefault(false);
|
||||
}
|
||||
@@ -184,6 +192,7 @@ ClangFunctionsFilter::ClangFunctionsFilter()
|
||||
{
|
||||
setId(CppEditor::Constants::FUNCTIONS_FILTER_ID);
|
||||
setDisplayName(::CppEditor::Tr::tr(CppEditor::Constants::FUNCTIONS_FILTER_DISPLAY_NAME));
|
||||
setDescription(::CppEditor::Tr::tr(CppEditor::Constants::FUNCTIONS_FILTER_DESCRIPTION));
|
||||
setDefaultShortcutString("m");
|
||||
setDefaultIncludedByDefault(false);
|
||||
}
|
||||
@@ -195,6 +204,7 @@ public:
|
||||
{
|
||||
setId({});
|
||||
setDisplayName({});
|
||||
setDescription({});
|
||||
setDefaultShortcutString({});
|
||||
setEnabled(false);
|
||||
setHidden(true);
|
||||
@@ -309,6 +319,7 @@ ClangdCurrentDocumentFilter::ClangdCurrentDocumentFilter() : d(new Private)
|
||||
{
|
||||
setId(CppEditor::Constants::CURRENT_DOCUMENT_FILTER_ID);
|
||||
setDisplayName(::CppEditor::Tr::tr(CppEditor::Constants::CURRENT_DOCUMENT_FILTER_DISPLAY_NAME));
|
||||
setDescription(::CppEditor::Tr::tr(CppEditor::Constants::CURRENT_DOCUMENT_FILTER_DESCRIPTION));
|
||||
setDefaultShortcutString(".");
|
||||
setPriority(High);
|
||||
setDefaultIncludedByDefault(false);
|
||||
|
@@ -92,7 +92,7 @@ void CMakeTargetLocatorFilter::projectListUpdated()
|
||||
BuildCMakeTargetLocatorFilter::BuildCMakeTargetLocatorFilter()
|
||||
{
|
||||
setId("Build CMake target");
|
||||
setDisplayName(Tr::tr("Build CMake target"));
|
||||
setDisplayName(Tr::tr("Build CMake Target"));
|
||||
setDescription(Tr::tr("Builds a target of any open CMake project."));
|
||||
setDefaultShortcutString("cm");
|
||||
setPriority(High);
|
||||
@@ -139,8 +139,8 @@ void BuildCMakeTargetLocatorFilter::accept(const LocatorFilterEntry &selection,
|
||||
OpenCMakeTargetLocatorFilter::OpenCMakeTargetLocatorFilter()
|
||||
{
|
||||
setId("Open CMake target definition");
|
||||
setDisplayName(Tr::tr("Open CMake target"));
|
||||
setDescription(Tr::tr("Jumps to the definition of a target of any open CMake project."));
|
||||
setDisplayName(Tr::tr("Open CMake Target"));
|
||||
setDescription(Tr::tr("Locates the definition of a target of any open CMake project."));
|
||||
setDefaultShortcutString("cmo");
|
||||
setPriority(Medium);
|
||||
}
|
||||
|
@@ -75,7 +75,7 @@ DirectoryFilter::DirectoryFilter(Id id)
|
||||
setId(id);
|
||||
setDefaultIncludedByDefault(true);
|
||||
setDisplayName(defaultDisplayName());
|
||||
setDescription(Tr::tr("Matches all files from a custom set of directories. Append \"+<number>\" "
|
||||
setDescription(Tr::tr("Locates files from a custom set of directories. Append \"+<number>\" "
|
||||
"or \":<number>\" to jump to the given line number. Append another "
|
||||
"\"+<number>\" or \":<number>\" to jump to the column number as well."));
|
||||
|
||||
|
@@ -844,7 +844,10 @@ ILocatorFilter::Priority ILocatorFilter::priority() const
|
||||
*/
|
||||
void ILocatorFilter::setEnabled(bool enabled)
|
||||
{
|
||||
if (enabled == m_enabled)
|
||||
return;
|
||||
m_enabled = enabled;
|
||||
emit enabledChanged(m_enabled);
|
||||
}
|
||||
|
||||
/*!
|
||||
|
@@ -251,6 +251,9 @@ public:
|
||||
public slots:
|
||||
void setEnabled(bool enabled);
|
||||
|
||||
signals:
|
||||
void enabledChanged(bool enabled);
|
||||
|
||||
protected:
|
||||
void setHidden(bool hidden);
|
||||
void setId(Utils::Id id);
|
||||
|
@@ -66,6 +66,7 @@ public:
|
||||
|
||||
LocatorData::LocatorData()
|
||||
{
|
||||
m_urlFilter.setDescription(Tr::tr("Triggers a web search with the selected search engine."));
|
||||
m_urlFilter.setDefaultShortcutString("r");
|
||||
m_urlFilter.addDefaultUrl("https://www.bing.com/search?q=%1");
|
||||
m_urlFilter.addDefaultUrl("https://www.google.com/search?q=%1");
|
||||
@@ -75,6 +76,7 @@ LocatorData::LocatorData()
|
||||
"http://en.cppreference.com/mwiki/index.php?title=Special%3ASearch&search=%1");
|
||||
m_urlFilter.addDefaultUrl("https://en.wikipedia.org/w/index.php?search=%1");
|
||||
|
||||
m_bugFilter.setDescription(Tr::tr("Triggers a search in the Qt bug tracker."));
|
||||
m_bugFilter.setDefaultShortcutString("bug");
|
||||
m_bugFilter.addDefaultUrl("https://bugreports.qt.io/secure/QuickSearch.jspa?searchString=%1");
|
||||
}
|
||||
|
@@ -101,8 +101,10 @@ QVariant FilterItem::data(int column, int role) const
|
||||
break;
|
||||
}
|
||||
|
||||
if (role == Qt::ToolTipRole)
|
||||
return m_filter->description();
|
||||
if (role == Qt::ToolTipRole) {
|
||||
const QString description = m_filter->description();
|
||||
return description.isEmpty() ? QString() : ("<html>" + description.toHtmlEscaped());
|
||||
}
|
||||
return QVariant();
|
||||
}
|
||||
|
||||
|
@@ -26,6 +26,7 @@
|
||||
#include <utils/qtcassert.h>
|
||||
#include <utils/runextensions.h>
|
||||
#include <utils/stylehelper.h>
|
||||
#include <utils/tooltip/tooltip.h>
|
||||
#include <utils/utilsicons.h>
|
||||
|
||||
#include <QAction>
|
||||
@@ -599,6 +600,10 @@ LocatorWidget::LocatorWidget(Locator *locator)
|
||||
connect(m_filterMenu, &QMenu::aboutToShow, this, [this] {
|
||||
m_centeredPopupAction->setChecked(Locator::useCenteredPopupForShortcut());
|
||||
});
|
||||
connect(m_filterMenu, &QMenu::hovered, this, [this](QAction *action) {
|
||||
ToolTip::show(m_filterMenu->mapToGlobal(m_filterMenu->actionGeometry(action).topRight()),
|
||||
action->toolTip());
|
||||
});
|
||||
connect(m_centeredPopupAction, &QAction::toggled, locator, [locator](bool toggled) {
|
||||
if (toggled != Locator::useCenteredPopupForShortcut()) {
|
||||
Locator::setUseCenteredPopupForShortcut(toggled);
|
||||
@@ -672,12 +677,20 @@ void LocatorWidget::updatePlaceholderText(Command *command)
|
||||
void LocatorWidget::updateFilterList()
|
||||
{
|
||||
m_filterMenu->clear();
|
||||
const QList<ILocatorFilter *> filters = Locator::filters();
|
||||
const QList<ILocatorFilter *> filters = Utils::sorted(Locator::filters(),
|
||||
[](ILocatorFilter *a, ILocatorFilter *b) {
|
||||
return a->displayName()
|
||||
< b->displayName();
|
||||
});
|
||||
for (ILocatorFilter *filter : filters) {
|
||||
if (filter->shortcutString().isEmpty() || filter->isHidden())
|
||||
continue;
|
||||
QAction *action = m_filterMenu->addAction(filter->displayName());
|
||||
action->setToolTip(filter->description());
|
||||
action->setEnabled(filter->isEnabled());
|
||||
const QString description = filter->description();
|
||||
action->setToolTip(description.isEmpty() ? QString()
|
||||
: ("<html>" + description.toHtmlEscaped()));
|
||||
connect(filter, &ILocatorFilter::enabledChanged, action, &QAction::setEnabled);
|
||||
connect(action, &QAction::triggered, this, [this, filter] {
|
||||
Locator::showFilter(filter, this);
|
||||
});
|
||||
|
@@ -21,6 +21,7 @@ OpenDocumentsFilter::OpenDocumentsFilter()
|
||||
{
|
||||
setId("Open documents");
|
||||
setDisplayName(Tr::tr("Open Documents"));
|
||||
setDescription(Tr::tr("Switches to an open document."));
|
||||
setDefaultShortcutString("o");
|
||||
setPriority(High);
|
||||
setDefaultIncludedByDefault(true);
|
||||
|
@@ -225,10 +225,10 @@ SpotlightLocatorFilter::SpotlightLocatorFilter()
|
||||
setDefaultShortcutString("md");
|
||||
setDefaultIncludedByDefault(false);
|
||||
setDisplayName(Tr::tr("File Name Index"));
|
||||
setDescription(
|
||||
Tr::tr("Matches files from a global file system index (Spotlight, Locate, Everything). Append "
|
||||
"\"+<number>\" or \":<number>\" to jump to the given line number. Append another "
|
||||
"\"+<number>\" or \":<number>\" to jump to the column number as well."));
|
||||
setDescription(Tr::tr(
|
||||
"Locates files from a global file system index (Spotlight, Locate, Everything). Append "
|
||||
"\"+<number>\" or \":<number>\" to jump to the given line number. Append another "
|
||||
"\"+<number>\" or \":<number>\" to jump to the column number as well."));
|
||||
setConfigurable(true);
|
||||
reset();
|
||||
}
|
||||
|
@@ -24,6 +24,7 @@ CppCurrentDocumentFilter::CppCurrentDocumentFilter(CppModelManager *manager)
|
||||
{
|
||||
setId(Constants::CURRENT_DOCUMENT_FILTER_ID);
|
||||
setDisplayName(Tr::tr(Constants::CURRENT_DOCUMENT_FILTER_DISPLAY_NAME));
|
||||
setDescription(Tr::tr(Constants::CURRENT_DOCUMENT_FILTER_DESCRIPTION));
|
||||
setDefaultShortcutString(".");
|
||||
setPriority(High);
|
||||
setDefaultIncludedByDefault(false);
|
||||
|
@@ -110,12 +110,18 @@ const char CPP_SETTINGS_NAME[] = QT_TRANSLATE_NOOP("QtC::CppEditor", "C++");
|
||||
const char CURRENT_DOCUMENT_FILTER_ID[] = "Methods in current Document";
|
||||
const char CURRENT_DOCUMENT_FILTER_DISPLAY_NAME[]
|
||||
= QT_TRANSLATE_NOOP("QtC::CppEditor", "C++ Symbols in Current Document");
|
||||
const char CURRENT_DOCUMENT_FILTER_DESCRIPTION[]
|
||||
= QT_TRANSLATE_NOOP("QtC::CppEditor", "Locates C++ symbols in the current document.");
|
||||
|
||||
const char CLASSES_FILTER_ID[] = "Classes";
|
||||
const char CLASSES_FILTER_DISPLAY_NAME[] = QT_TRANSLATE_NOOP("QtC::CppEditor", "C++ Classes");
|
||||
const char CLASSES_FILTER_DESCRIPTION[]
|
||||
= QT_TRANSLATE_NOOP("QtC::CppEditor", "Locates C++ classes in any open project.");
|
||||
|
||||
const char FUNCTIONS_FILTER_ID[] = "Methods";
|
||||
const char FUNCTIONS_FILTER_DISPLAY_NAME[] = QT_TRANSLATE_NOOP("QtC::CppEditor", "C++ Functions");
|
||||
const char FUNCTIONS_FILTER_DESCRIPTION[]
|
||||
= QT_TRANSLATE_NOOP("QtC::CppEditor", "Locates C++ functions in any open project.");
|
||||
|
||||
const char INCLUDES_FILTER_ID[] = "All Included C/C++ Files";
|
||||
const char INCLUDES_FILTER_DISPLAY_NAME[] = QT_TRANSLATE_NOOP("QtC::CppEditor",
|
||||
@@ -124,6 +130,8 @@ const char INCLUDES_FILTER_DISPLAY_NAME[] = QT_TRANSLATE_NOOP("QtC::CppEditor",
|
||||
const char LOCATOR_FILTER_ID[] = "Classes and Methods";
|
||||
const char LOCATOR_FILTER_DISPLAY_NAME[]
|
||||
= QT_TRANSLATE_NOOP("QtC::CppEditor", "C++ Classes, Enums, Functions and Type Aliases");
|
||||
const char LOCATOR_FILTER_DESCRIPTION[] = QT_TRANSLATE_NOOP(
|
||||
"QtC::CppEditor", "Locates C++ classes, enums, functions and type aliases in any open project.");
|
||||
|
||||
const char SYMBOLS_FIND_FILTER_ID[] = "Symbols";
|
||||
const char SYMBOLS_FIND_FILTER_DISPLAY_NAME[] = QT_TRANSLATE_NOOP("QtC::CppEditor", "C++ Symbols");
|
||||
|
@@ -102,7 +102,7 @@ CppIncludesFilter::CppIncludesFilter()
|
||||
setId(Constants::INCLUDES_FILTER_ID);
|
||||
setDisplayName(Tr::tr(Constants::INCLUDES_FILTER_DISPLAY_NAME));
|
||||
setDescription(
|
||||
Tr::tr("Matches all files that are included by all C++ files in all projects. Append "
|
||||
Tr::tr("Locates files that are included by C++ files of any open project. Append "
|
||||
"\"+<number>\" or \":<number>\" to jump to the given line number. Append another "
|
||||
"\"+<number>\" or \":<number>\" to jump to the column number as well."));
|
||||
setDefaultShortcutString("ai");
|
||||
|
@@ -167,6 +167,7 @@ CppLocatorFilter::CppLocatorFilter()
|
||||
{
|
||||
setId(Constants::LOCATOR_FILTER_ID);
|
||||
setDisplayName(Tr::tr(Constants::LOCATOR_FILTER_DISPLAY_NAME));
|
||||
setDescription(Tr::tr(Constants::LOCATOR_FILTER_DESCRIPTION));
|
||||
setDefaultShortcutString(":");
|
||||
setDefaultIncludedByDefault(false);
|
||||
}
|
||||
@@ -263,6 +264,7 @@ CppClassesFilter::CppClassesFilter()
|
||||
{
|
||||
setId(Constants::CLASSES_FILTER_ID);
|
||||
setDisplayName(Tr::tr(Constants::CLASSES_FILTER_DISPLAY_NAME));
|
||||
setDescription(Tr::tr(Constants::CLASSES_FILTER_DESCRIPTION));
|
||||
setDefaultShortcutString("c");
|
||||
setDefaultIncludedByDefault(false);
|
||||
}
|
||||
@@ -283,6 +285,7 @@ CppFunctionsFilter::CppFunctionsFilter()
|
||||
{
|
||||
setId(Constants::FUNCTIONS_FILTER_ID);
|
||||
setDisplayName(Tr::tr(Constants::FUNCTIONS_FILTER_DISPLAY_NAME));
|
||||
setDescription(Tr::tr(Constants::FUNCTIONS_FILTER_DESCRIPTION));
|
||||
setDefaultShortcutString("m");
|
||||
setDefaultIncludedByDefault(false);
|
||||
}
|
||||
|
@@ -293,6 +293,7 @@ FossilPluginPrivate::FossilPluginPrivate()
|
||||
connect(&m_client, &VcsBase::VcsBaseClient::changed, this, &FossilPluginPrivate::changed);
|
||||
|
||||
m_commandLocator = new Core::CommandLocator("Fossil", "fossil", "fossil", this);
|
||||
m_commandLocator->setDescription(Tr::tr("Triggers a Fossil version control operation."));
|
||||
|
||||
ProjectExplorer::JsonWizardFactory::addWizardPath(Utils::FilePath::fromString(Constants::WIZARD_PATH));
|
||||
Core::JsExpander::registerGlobalObject("Fossil", [this] {
|
||||
|
@@ -25,6 +25,7 @@ HelpIndexFilter::HelpIndexFilter()
|
||||
{
|
||||
setId("HelpIndexFilter");
|
||||
setDisplayName(Tr::tr("Help Index"));
|
||||
setDescription(Tr::tr("Locates help topics, for example in the Qt documentation."));
|
||||
setDefaultIncludedByDefault(false);
|
||||
setDefaultShortcutString("?");
|
||||
setRefreshRecipe(Utils::Tasking::Sync([this] { invalidateCache(); return true; }));
|
||||
|
@@ -22,12 +22,23 @@ const char LANGUAGECLIENT_STDIO_SETTINGS_ID[] = "LanguageClient::StdIOSettingsID
|
||||
const char LANGUAGECLIENT_SETTINGS_TR[] = QT_TRANSLATE_NOOP("QtC::LanguageClient", "Language Client");
|
||||
const char LANGUAGECLIENT_DOCUMENT_FILTER_ID[] = "Current Document Symbols";
|
||||
const char LANGUAGECLIENT_DOCUMENT_FILTER_DISPLAY_NAME[] = QT_TRANSLATE_NOOP("QtC::LanguageClient", "Symbols in Current Document");
|
||||
const char LANGUAGECLIENT_DOCUMENT_FILTER_DESCRIPTION[]
|
||||
= QT_TRANSLATE_NOOP("QtC::LanguageClient",
|
||||
"Locates symbols in the current document, based on a language server.");
|
||||
const char LANGUAGECLIENT_WORKSPACE_FILTER_ID[] = "Workspace Symbols";
|
||||
const char LANGUAGECLIENT_WORKSPACE_FILTER_DISPLAY_NAME[] = QT_TRANSLATE_NOOP("QtC::LanguageClient", "Symbols in Workspace");
|
||||
const char LANGUAGECLIENT_WORKSPACE_FILTER_DESCRIPTION[]
|
||||
= QT_TRANSLATE_NOOP("QtC::LanguageClient", "Locates symbols in the language server workspace.");
|
||||
const char LANGUAGECLIENT_WORKSPACE_CLASS_FILTER_ID[] = "Workspace Classes and Structs";
|
||||
const char LANGUAGECLIENT_WORKSPACE_CLASS_FILTER_DISPLAY_NAME[] = QT_TRANSLATE_NOOP("QtC::LanguageClient", "Classes and Structs in Workspace");
|
||||
const char LANGUAGECLIENT_WORKSPACE_CLASS_FILTER_DESCRIPTION[]
|
||||
= QT_TRANSLATE_NOOP("QtC::LanguageClient",
|
||||
"Locates classes and structs in the language server workspace.");
|
||||
const char LANGUAGECLIENT_WORKSPACE_METHOD_FILTER_ID[] = "Workspace Functions and Methods";
|
||||
const char LANGUAGECLIENT_WORKSPACE_METHOD_FILTER_DISPLAY_NAME[] = QT_TRANSLATE_NOOP("QtC::LanguageClient", "Functions and Methods in Workspace");
|
||||
const char LANGUAGECLIENT_WORKSPACE_METHOD_FILTER_DESCRIPTION[]
|
||||
= QT_TRANSLATE_NOOP("QtC::LanguageClient",
|
||||
"Locates functions and methods in the language server workspace.");
|
||||
|
||||
const char CALL_HIERARCHY_FACTORY_ID[] = "LanguageClient.CallHierarchy";
|
||||
|
||||
|
@@ -114,8 +114,7 @@ DocumentLocatorFilter::DocumentLocatorFilter()
|
||||
{
|
||||
setId(Constants::LANGUAGECLIENT_DOCUMENT_FILTER_ID);
|
||||
setDisplayName(Tr::tr(Constants::LANGUAGECLIENT_DOCUMENT_FILTER_DISPLAY_NAME));
|
||||
setDescription(
|
||||
Tr::tr("Matches all symbols from the current document, based on a language server."));
|
||||
setDescription(Tr::tr(Constants::LANGUAGECLIENT_DOCUMENT_FILTER_DESCRIPTION));
|
||||
setDefaultShortcutString(".");
|
||||
setDefaultIncludedByDefault(false);
|
||||
setPriority(ILocatorFilter::Low);
|
||||
@@ -292,6 +291,7 @@ WorkspaceLocatorFilter::WorkspaceLocatorFilter(const QVector<SymbolKind> &filter
|
||||
{
|
||||
setId(Constants::LANGUAGECLIENT_WORKSPACE_FILTER_ID);
|
||||
setDisplayName(Tr::tr(Constants::LANGUAGECLIENT_WORKSPACE_FILTER_DISPLAY_NAME));
|
||||
setDescription(Tr::tr(Constants::LANGUAGECLIENT_WORKSPACE_FILTER_DESCRIPTION));
|
||||
setDefaultShortcutString(":");
|
||||
setDefaultIncludedByDefault(false);
|
||||
setPriority(ILocatorFilter::Low);
|
||||
@@ -388,6 +388,7 @@ WorkspaceClassLocatorFilter::WorkspaceClassLocatorFilter()
|
||||
{
|
||||
setId(Constants::LANGUAGECLIENT_WORKSPACE_CLASS_FILTER_ID);
|
||||
setDisplayName(Tr::tr(Constants::LANGUAGECLIENT_WORKSPACE_CLASS_FILTER_DISPLAY_NAME));
|
||||
setDescription(Tr::tr(Constants::LANGUAGECLIENT_WORKSPACE_CLASS_FILTER_DESCRIPTION));
|
||||
setDefaultShortcutString("c");
|
||||
}
|
||||
|
||||
@@ -396,6 +397,7 @@ WorkspaceMethodLocatorFilter::WorkspaceMethodLocatorFilter()
|
||||
{
|
||||
setId(Constants::LANGUAGECLIENT_WORKSPACE_METHOD_FILTER_ID);
|
||||
setDisplayName(Tr::tr(Constants::LANGUAGECLIENT_WORKSPACE_METHOD_FILTER_DISPLAY_NAME));
|
||||
setDescription(Tr::tr(Constants::LANGUAGECLIENT_WORKSPACE_METHOD_FILTER_DESCRIPTION));
|
||||
setDefaultShortcutString("m");
|
||||
}
|
||||
|
||||
|
@@ -20,9 +20,9 @@ AllProjectsFilter::AllProjectsFilter()
|
||||
{
|
||||
setId("Files in any project");
|
||||
setDisplayName(Tr::tr("Files in Any Project"));
|
||||
setDescription(Tr::tr("Matches all files of all open projects. Append \"+<number>\" or "
|
||||
"\":<number>\" to jump to the given line number. Append another "
|
||||
"\"+<number>\" or \":<number>\" to jump to the column number as well."));
|
||||
setDescription(Tr::tr("Locates files of all open projects. Append \"+<number>\" or "
|
||||
"\":<number>\" to jump to the given line number. Append another "
|
||||
"\"+<number>\" or \":<number>\" to jump to the column number as well."));
|
||||
setDefaultShortcutString("a");
|
||||
setDefaultIncludedByDefault(true);
|
||||
setRefreshRecipe(Tasking::Sync([this] { invalidateCache(); return true; }));
|
||||
|
@@ -20,9 +20,9 @@ CurrentProjectFilter::CurrentProjectFilter()
|
||||
{
|
||||
setId("Files in current project");
|
||||
setDisplayName(Tr::tr("Files in Current Project"));
|
||||
setDescription(Tr::tr("Matches all files from the current document's project. Append \"+<number>\" "
|
||||
"or \":<number>\" to jump to the given line number. Append another "
|
||||
"\"+<number>\" or \":<number>\" to jump to the column number as well."));
|
||||
setDescription(Tr::tr("Locates files from the current document's project. Append \"+<number>\" "
|
||||
"or \":<number>\" to jump to the given line number. Append another "
|
||||
"\"+<number>\" or \":<number>\" to jump to the column number as well."));
|
||||
setDefaultShortcutString("p");
|
||||
setDefaultIncludedByDefault(false);
|
||||
setRefreshRecipe(Tasking::Sync([this] { invalidateCache(); return true; }));
|
||||
|
@@ -4357,10 +4357,9 @@ AllProjectFilesFilter::AllProjectFilesFilter()
|
||||
setDefaultIncludedByDefault(false); // but not included in default
|
||||
setFilters({});
|
||||
setIsCustomFilter(false);
|
||||
setDescription(Tr::tr(
|
||||
"Matches all files from all project directories. Append \"+<number>\" or "
|
||||
"\":<number>\" to jump to the given line number. Append another "
|
||||
"\"+<number>\" or \":<number>\" to jump to the column number as well."));
|
||||
setDescription(Tr::tr("Locates files from all project directories. Append \"+<number>\" or "
|
||||
"\":<number>\" to jump to the given line number. Append another "
|
||||
"\"+<number>\" or \":<number>\" to jump to the column number as well."));
|
||||
|
||||
ProjectManager *projectManager = ProjectManager::instance();
|
||||
QTC_ASSERT(projectManager, return);
|
||||
@@ -4440,8 +4439,8 @@ static RunConfiguration *runConfigurationForDisplayName(const QString &displayNa
|
||||
RunRunConfigurationLocatorFilter::RunRunConfigurationLocatorFilter()
|
||||
{
|
||||
setId("Run run configuration");
|
||||
setDisplayName(Tr::tr("Run run configuration"));
|
||||
setDescription(Tr::tr("Run a run configuration of the current active project"));
|
||||
setDisplayName(Tr::tr("Run Run Configuration"));
|
||||
setDescription(Tr::tr("Runs a run configuration of the active project."));
|
||||
setDefaultShortcutString("rr");
|
||||
setPriority(Medium);
|
||||
}
|
||||
@@ -4463,8 +4462,8 @@ void RunRunConfigurationLocatorFilter::accept(const LocatorFilterEntry &selectio
|
||||
SwitchToRunConfigurationLocatorFilter::SwitchToRunConfigurationLocatorFilter()
|
||||
{
|
||||
setId("Switch run configuration");
|
||||
setDisplayName(Tr::tr("Switch run configuration"));
|
||||
setDescription(Tr::tr("Switch active run configuration"));
|
||||
setDisplayName(Tr::tr("Switch Run Configuration"));
|
||||
setDescription(Tr::tr("Switches the active run configuration of the active project."));
|
||||
setDefaultShortcutString("sr");
|
||||
setPriority(Medium);
|
||||
}
|
||||
|
@@ -20,6 +20,7 @@ FunctionFilter::FunctionFilter(LocatorData *data, QObject *parent)
|
||||
{
|
||||
setId("Functions");
|
||||
setDisplayName(Tr::tr("QML Functions"));
|
||||
setDescription(Tr::tr("Locates QML functions in any open project."));
|
||||
setDefaultShortcutString("m");
|
||||
setDefaultIncludedByDefault(false);
|
||||
}
|
||||
|
Reference in New Issue
Block a user