ILocatorFilter: Remove calls to setDefaultIncludedByDefault(false)

By default, setDefaultIncludedByDefault() is set to false, so
no need to repeat it now in direct subclasses.
Leave it only inside the AllProjectFilesFilter,
as the DirectoryFilter superclass sets it to true.

Change-Id: Ib66d112a3bfeed52315663f6898148cf5c5d88b1
Reviewed-by: <github-actions-qt-creator@cristianadam.eu>
Reviewed-by: Eike Ziller <eike.ziller@qt.io>
Reviewed-by: Qt CI Bot <qt_ci_bot@qt-project.org>
This commit is contained in:
Jarek Kobus
2023-05-03 19:05:23 +02:00
parent c8c48d899f
commit 4195b4e7e2
11 changed files with 0 additions and 18 deletions

View File

@@ -37,7 +37,6 @@ ClangdAllSymbolsFilter::ClangdAllSymbolsFilter()
setDisplayName(::CppEditor::Tr::tr(CppEditor::Constants::LOCATOR_FILTER_DISPLAY_NAME)); setDisplayName(::CppEditor::Tr::tr(CppEditor::Constants::LOCATOR_FILTER_DISPLAY_NAME));
setDescription(::CppEditor::Tr::tr(CppEditor::Constants::LOCATOR_FILTER_DESCRIPTION)); setDescription(::CppEditor::Tr::tr(CppEditor::Constants::LOCATOR_FILTER_DESCRIPTION));
setDefaultShortcutString(":"); setDefaultShortcutString(":");
setDefaultIncludedByDefault(false);
} }
LocatorMatcherTasks ClangdAllSymbolsFilter::matchers() LocatorMatcherTasks ClangdAllSymbolsFilter::matchers()
@@ -53,7 +52,6 @@ ClangdClassesFilter::ClangdClassesFilter()
setDisplayName(::CppEditor::Tr::tr(CppEditor::Constants::CLASSES_FILTER_DISPLAY_NAME)); setDisplayName(::CppEditor::Tr::tr(CppEditor::Constants::CLASSES_FILTER_DISPLAY_NAME));
setDescription(::CppEditor::Tr::tr(CppEditor::Constants::CLASSES_FILTER_DESCRIPTION)); setDescription(::CppEditor::Tr::tr(CppEditor::Constants::CLASSES_FILTER_DESCRIPTION));
setDefaultShortcutString("c"); setDefaultShortcutString("c");
setDefaultIncludedByDefault(false);
} }
LocatorMatcherTasks ClangdClassesFilter::matchers() LocatorMatcherTasks ClangdClassesFilter::matchers()
@@ -69,7 +67,6 @@ ClangdFunctionsFilter::ClangdFunctionsFilter()
setDisplayName(::CppEditor::Tr::tr(CppEditor::Constants::FUNCTIONS_FILTER_DISPLAY_NAME)); setDisplayName(::CppEditor::Tr::tr(CppEditor::Constants::FUNCTIONS_FILTER_DISPLAY_NAME));
setDescription(::CppEditor::Tr::tr(CppEditor::Constants::FUNCTIONS_FILTER_DESCRIPTION)); setDescription(::CppEditor::Tr::tr(CppEditor::Constants::FUNCTIONS_FILTER_DESCRIPTION));
setDefaultShortcutString("m"); setDefaultShortcutString("m");
setDefaultIncludedByDefault(false);
} }
LocatorMatcherTasks ClangdFunctionsFilter::matchers() LocatorMatcherTasks ClangdFunctionsFilter::matchers()
@@ -86,7 +83,6 @@ ClangdCurrentDocumentFilter::ClangdCurrentDocumentFilter()
setDescription(::CppEditor::Tr::tr(CppEditor::Constants::CURRENT_DOCUMENT_FILTER_DESCRIPTION)); setDescription(::CppEditor::Tr::tr(CppEditor::Constants::CURRENT_DOCUMENT_FILTER_DESCRIPTION));
setDefaultShortcutString("."); setDefaultShortcutString(".");
setPriority(High); setPriority(High);
setDefaultIncludedByDefault(false);
setEnabled(false); setEnabled(false);
connect(EditorManager::instance(), &EditorManager::currentEditorChanged, connect(EditorManager::instance(), &EditorManager::currentEditorChanged,
this, [this](const IEditor *editor) { setEnabled(editor); }); this, [this](const IEditor *editor) { setEnabled(editor); });

View File

@@ -31,7 +31,6 @@ ExecuteFilter::ExecuteFilter()
"environment variable if needed. Note that the command is run directly, not in a shell.")); "environment variable if needed. Note that the command is run directly, not in a shell."));
setDefaultShortcutString("!"); setDefaultShortcutString("!");
setPriority(High); setPriority(High);
setDefaultIncludedByDefault(false);
} }
ExecuteFilter::~ExecuteFilter() ExecuteFilter::~ExecuteFilter()

View File

@@ -127,7 +127,6 @@ FileSystemFilter::FileSystemFilter()
"path. \"~\" refers to your home directory. You have the option to create a " "path. \"~\" refers to your home directory. You have the option to create a "
"file if it does not exist yet.")); "file if it does not exist yet."));
setDefaultShortcutString("f"); setDefaultShortcutString("f");
setDefaultIncludedByDefault(false);
*sDeviceRootIcon = qApp->style()->standardIcon(QStyle::SP_DriveHDIcon); *sDeviceRootIcon = qApp->style()->standardIcon(QStyle::SP_DriveHDIcon);
} }

View File

@@ -359,7 +359,6 @@ JavaScriptFilter::JavaScriptFilter()
setId("JavaScriptFilter"); setId("JavaScriptFilter");
setDisplayName(Tr::tr("Evaluate JavaScript")); setDisplayName(Tr::tr("Evaluate JavaScript"));
setDescription(Tr::tr("Evaluates arbitrary JavaScript expressions and copies the result.")); setDescription(Tr::tr("Evaluates arbitrary JavaScript expressions and copies the result."));
setDefaultIncludedByDefault(false);
setDefaultShortcutString("="); setDefaultShortcutString("=");
} }

View File

@@ -102,7 +102,6 @@ SpotlightLocatorFilter::SpotlightLocatorFilter()
{ {
setId("SpotlightFileNamesLocatorFilter"); setId("SpotlightFileNamesLocatorFilter");
setDefaultShortcutString("md"); setDefaultShortcutString("md");
setDefaultIncludedByDefault(false);
setDisplayName(Tr::tr("File Name Index")); setDisplayName(Tr::tr("File Name Index"));
setDescription(Tr::tr( setDescription(Tr::tr(
"Locates files from a global file system index (Spotlight, Locate, Everything). Append " "Locates files from a global file system index (Spotlight, Locate, Everything). Append "

View File

@@ -159,7 +159,6 @@ UrlLocatorFilter::UrlLocatorFilter(const QString &displayName, Id id)
setId(id); setId(id);
m_defaultDisplayName = displayName; m_defaultDisplayName = displayName;
setDisplayName(displayName); setDisplayName(displayName);
setDefaultIncludedByDefault(false);
} }
LocatorMatcherTasks UrlLocatorFilter::matchers() LocatorMatcherTasks UrlLocatorFilter::matchers()

View File

@@ -338,7 +338,6 @@ CppAllSymbolsFilter::CppAllSymbolsFilter()
setDisplayName(Tr::tr(Constants::LOCATOR_FILTER_DISPLAY_NAME)); setDisplayName(Tr::tr(Constants::LOCATOR_FILTER_DISPLAY_NAME));
setDescription(Tr::tr(Constants::LOCATOR_FILTER_DESCRIPTION)); setDescription(Tr::tr(Constants::LOCATOR_FILTER_DESCRIPTION));
setDefaultShortcutString(":"); setDefaultShortcutString(":");
setDefaultIncludedByDefault(false);
} }
LocatorMatcherTasks CppAllSymbolsFilter::matchers() LocatorMatcherTasks CppAllSymbolsFilter::matchers()
@@ -353,7 +352,6 @@ CppClassesFilter::CppClassesFilter()
setDisplayName(Tr::tr(Constants::CLASSES_FILTER_DISPLAY_NAME)); setDisplayName(Tr::tr(Constants::CLASSES_FILTER_DISPLAY_NAME));
setDescription(Tr::tr(Constants::CLASSES_FILTER_DESCRIPTION)); setDescription(Tr::tr(Constants::CLASSES_FILTER_DESCRIPTION));
setDefaultShortcutString("c"); setDefaultShortcutString("c");
setDefaultIncludedByDefault(false);
} }
LocatorMatcherTasks CppClassesFilter::matchers() LocatorMatcherTasks CppClassesFilter::matchers()
@@ -367,7 +365,6 @@ CppFunctionsFilter::CppFunctionsFilter()
setDisplayName(Tr::tr(Constants::FUNCTIONS_FILTER_DISPLAY_NAME)); setDisplayName(Tr::tr(Constants::FUNCTIONS_FILTER_DISPLAY_NAME));
setDescription(Tr::tr(Constants::FUNCTIONS_FILTER_DESCRIPTION)); setDescription(Tr::tr(Constants::FUNCTIONS_FILTER_DESCRIPTION));
setDefaultShortcutString("m"); setDefaultShortcutString("m");
setDefaultIncludedByDefault(false);
} }
LocatorMatcherTasks CppFunctionsFilter::matchers() LocatorMatcherTasks CppFunctionsFilter::matchers()
@@ -382,7 +379,6 @@ CppCurrentDocumentFilter::CppCurrentDocumentFilter()
setDescription(Tr::tr(Constants::CURRENT_DOCUMENT_FILTER_DESCRIPTION)); setDescription(Tr::tr(Constants::CURRENT_DOCUMENT_FILTER_DESCRIPTION));
setDefaultShortcutString("."); setDefaultShortcutString(".");
setPriority(High); setPriority(High);
setDefaultIncludedByDefault(false);
} }
LocatorMatcherTasks CppCurrentDocumentFilter::matchers() LocatorMatcherTasks CppCurrentDocumentFilter::matchers()

View File

@@ -29,7 +29,6 @@ HelpIndexFilter::HelpIndexFilter()
setId("HelpIndexFilter"); setId("HelpIndexFilter");
setDisplayName(Tr::tr("Help Index")); setDisplayName(Tr::tr("Help Index"));
setDescription(Tr::tr("Locates help topics, for example in the Qt documentation.")); setDescription(Tr::tr("Locates help topics, for example in the Qt documentation."));
setDefaultIncludedByDefault(false);
setDefaultShortcutString("?"); setDefaultShortcutString("?");
setRefreshRecipe(Sync([this] { invalidateCache(); })); setRefreshRecipe(Sync([this] { invalidateCache(); }));

View File

@@ -175,7 +175,6 @@ LanguageCurrentDocumentFilter::LanguageCurrentDocumentFilter()
setDisplayName(Tr::tr(Constants::LANGUAGECLIENT_DOCUMENT_FILTER_DISPLAY_NAME)); setDisplayName(Tr::tr(Constants::LANGUAGECLIENT_DOCUMENT_FILTER_DISPLAY_NAME));
setDescription(Tr::tr(Constants::LANGUAGECLIENT_DOCUMENT_FILTER_DESCRIPTION)); setDescription(Tr::tr(Constants::LANGUAGECLIENT_DOCUMENT_FILTER_DESCRIPTION));
setDefaultShortcutString("."); setDefaultShortcutString(".");
setDefaultIncludedByDefault(false);
setPriority(ILocatorFilter::Low); setPriority(ILocatorFilter::Low);
} }
@@ -253,7 +252,6 @@ LanguageAllSymbolsFilter::LanguageAllSymbolsFilter()
setDisplayName(Tr::tr(Constants::LANGUAGECLIENT_WORKSPACE_FILTER_DISPLAY_NAME)); setDisplayName(Tr::tr(Constants::LANGUAGECLIENT_WORKSPACE_FILTER_DISPLAY_NAME));
setDescription(Tr::tr(Constants::LANGUAGECLIENT_WORKSPACE_FILTER_DESCRIPTION)); setDescription(Tr::tr(Constants::LANGUAGECLIENT_WORKSPACE_FILTER_DESCRIPTION));
setDefaultShortcutString(":"); setDefaultShortcutString(":");
setDefaultIncludedByDefault(false);
setPriority(ILocatorFilter::Low); setPriority(ILocatorFilter::Low);
} }

View File

@@ -20,7 +20,6 @@ CurrentProjectFilter::CurrentProjectFilter()
"or \":<number>\" to jump to the given line number. Append another " "or \":<number>\" to jump to the given line number. Append another "
"\"+<number>\" or \":<number>\" to jump to the column number as well.")); "\"+<number>\" or \":<number>\" to jump to the column number as well."));
setDefaultShortcutString("p"); setDefaultShortcutString("p");
setDefaultIncludedByDefault(false);
setRefreshRecipe(Tasking::Sync([this] { invalidate(); })); setRefreshRecipe(Tasking::Sync([this] { invalidate(); }));
connect(ProjectTree::instance(), &ProjectTree::currentProjectChanged, connect(ProjectTree::instance(), &ProjectTree::currentProjectChanged,

View File

@@ -25,7 +25,6 @@ QmlJSFunctionsFilter::QmlJSFunctionsFilter(LocatorData *data)
setDisplayName(Tr::tr("QML Functions")); setDisplayName(Tr::tr("QML Functions"));
setDescription(Tr::tr("Locates QML functions in any open project.")); setDescription(Tr::tr("Locates QML functions in any open project."));
setDefaultShortcutString("m"); setDefaultShortcutString("m");
setDefaultIncludedByDefault(false);
} }
static void matches(QPromise<void> &promise, const LocatorStorage &storage, static void matches(QPromise<void> &promise, const LocatorStorage &storage,