forked from qt-creator/qt-creator
Doc: Split up "Searching with the Locator"
Hide the locator docs from the QDS Manual because the locator is not visible in the Code view. Task-number: QTCREATORBUG-29361 Change-Id: Iecbbaece78b0cd6a496289fd9a00acfdd054d41f Reviewed-by: Eike Ziller <eike.ziller@qt.io>
This commit is contained in:
@@ -198,8 +198,8 @@
|
||||
\uicontrol Projects view and select \uicontrol {Open With} >
|
||||
\uicontrol {CMake Editor}.
|
||||
|
||||
You can also use the \c cmo filter in the \l {Searching with the Locator}
|
||||
{locator} to open the CMakeLists.txt file for the current run configuration
|
||||
You can also use the \c cmo filter in the \l {Navigate with locator}{locator}
|
||||
to open the CMakeLists.txt file for the current run configuration
|
||||
in the editor. This is the same build target as when you select
|
||||
\uicontrol Build > \uicontrol {Build for Run Configuration}.
|
||||
|
||||
|
@@ -1,325 +0,0 @@
|
||||
// Copyright (C) 2023 The Qt Company Ltd.
|
||||
// SPDX-License-Identifier: LicenseRef-Qt-Commercial OR GFDL-1.3-no-invariants-only
|
||||
|
||||
/*!
|
||||
\page creator-editor-locator.html
|
||||
\previouspage creator-how-to-advanced-search.html
|
||||
\if defined(qtdesignstudio)
|
||||
\nextpage creator-jump-to-the-code.html
|
||||
\else
|
||||
\nextpage creator-how-tos.html
|
||||
\endif
|
||||
|
||||
\title Searching with the Locator
|
||||
|
||||
The locator is the fastest way to find a particular project, file, class, or
|
||||
function, or almost anything else in your project.
|
||||
|
||||
By default, you can find the locator in the bottom left of the \QC window.
|
||||
To open it as a centered popup, click \inlineimage icons/magnifier.png
|
||||
(\uicontrol Options) in it and select \uicontrol {Open as Centered Popup}.
|
||||
|
||||
\image qtcreator-locator.webp "List of locator filters"
|
||||
|
||||
\section1 Activating the Locator
|
||||
|
||||
To activate the locator:
|
||||
|
||||
\list
|
||||
|
||||
\li Press \key {Ctrl+K} (\key {Cmd+K} on \macos).
|
||||
|
||||
\li Select \uicontrol Tools > \uicontrol Locate.
|
||||
|
||||
\li Select \uicontrol Edit > \uicontrol {Go to Line}.
|
||||
\if defined(qtcreator)
|
||||
\li Click the line and column indicator on the
|
||||
\l{Edit Mode}{editor toolbar}.
|
||||
\endif
|
||||
\endlist
|
||||
|
||||
\section1 Using Locator Filters
|
||||
|
||||
You can locate not only files, but any items defined by \e{locator filters},
|
||||
as well as trigger global actions and perform other tasks, such as build
|
||||
projects or run external tools.
|
||||
|
||||
The filters that are available depend on the file type. For more information
|
||||
about what a particular locator filter does, see the tooltips that appear
|
||||
when you hover over a filter in the locator. For longer descriptions of the
|
||||
filters, select \uicontrol Configure to open the \uicontrol Locator
|
||||
\l{Creating Locator Filters}{preferences}.
|
||||
|
||||
To use a locator filter, type its prefix followed by \key Space. The prefix
|
||||
is usually short, from one to three characters. Then type the search string
|
||||
(for example, a filename or class name) or the command to execute.
|
||||
|
||||
You can also double-click a locator filter in the filter list to use it. Use
|
||||
the up and down arrow keys or the \key Ctrl+P and \key Ctrl+N
|
||||
keyboard shortcuts to move up and down the list, and then press \key Enter
|
||||
to use the selected filter.
|
||||
|
||||
As you type a search string,
|
||||
the locator shows the occurrences of that string regardless of where in the
|
||||
name of an component it appears. Some locator filters, such as colon, \c m,
|
||||
and \c t, support \e fuzzy matching, which means that you can enter the
|
||||
uppercase letters to locate a symbol when using camel case or the letters
|
||||
after the underscore when using snake case.
|
||||
|
||||
To narrow down the search results, use the following wildcard characters:
|
||||
|
||||
\list
|
||||
|
||||
\li To match any number of any or no characters, enter \c{*}.
|
||||
|
||||
\li To match a single instance of any character, enter \c{?}.
|
||||
|
||||
\endlist
|
||||
|
||||
\section2 Locating Lines and Columns
|
||||
|
||||
To move directly to a particular line and column in the document when you
|
||||
open the document, append the line and column number to the file name in
|
||||
the locator, separated by plus signs (+) or colons (:).
|
||||
|
||||
For example, to open \e HelloWorld.qml to line
|
||||
41 and column 2, enter:
|
||||
|
||||
\code
|
||||
HelloWorld.qml:41:2
|
||||
\endcode
|
||||
|
||||
\section2 Creating Files and Directories from Locator
|
||||
|
||||
To create a new file and open it in the editor, type \c f
|
||||
followed by \key Space, followed by path and file name, and then press
|
||||
\key Enter or select \uicontrol {Create and Open File}. To create a
|
||||
directory, select \uicontrol {Create Directory}.
|
||||
|
||||
\section2 Opening Sessions from Locator
|
||||
|
||||
You can use the filter that triggers menu commands to open
|
||||
\l{Manage sessions}{sessions}. Enter
|
||||
\c {t yoursess} or \c {t sess yoursess} to trigger \uicontrol File >
|
||||
\uicontrol Sessions > \e <session_name>.
|
||||
|
||||
\section2 Default Filters
|
||||
|
||||
By default, you can use the following preset locator filters without a
|
||||
prefix:
|
||||
|
||||
\list
|
||||
|
||||
\li Going to a line and column in the current file (\c {l}).
|
||||
|
||||
\li Going to an open file (\c {o}).
|
||||
|
||||
\li Going to a file in any open project (\c {a}).
|
||||
|
||||
\endlist
|
||||
|
||||
\section1 Changing Locator Filters
|
||||
|
||||
You can change the preset locator filters to match your use case. For
|
||||
example, you can change the filter prefix and restrict the search to
|
||||
items that match the filter.
|
||||
|
||||
\image qtcreator-locator-filter-edit-ai.webp {Filter Configuration dialog}
|
||||
|
||||
To configure a locator filter:
|
||||
|
||||
\list 1
|
||||
|
||||
\li In the locator, click \inlineimage icons/magnifier.png
|
||||
(\uicontrol Options) and select \uicontrol Configure to open the
|
||||
\uicontrol Locator preferences.
|
||||
|
||||
\li Select a filter, and then select \uicontrol Edit.
|
||||
|
||||
\li Specify the prefix string.
|
||||
|
||||
\li To implicitly include the filter even when not typing a prefix as a
|
||||
part of the search string, select \uicontrol {Include by default}.
|
||||
|
||||
\li Set other available preferences.
|
||||
|
||||
\endlist
|
||||
|
||||
\section2 Adding Web Search Engines
|
||||
|
||||
You can use the \uicontrol {Web Search (r)} locator filter to perform
|
||||
web searches. URLs and search commands for Bing, Google, Yahoo! Search,
|
||||
cplusplus.com, and Wikipedia are configured by default.
|
||||
|
||||
To find out the format of the search command to use for your favorite
|
||||
web search engine, perform a search in your browser and copy the resulting
|
||||
URL to the locator filter configuration. Replace the search term with the
|
||||
variable \c {%1}.
|
||||
|
||||
To add URLs and search commands to the list:
|
||||
|
||||
\list 1
|
||||
|
||||
\li Select \preferences > \uicontrol Environment > \uicontrol Locator >
|
||||
\uicontrol {Web Search} > \uicontrol Edit.
|
||||
|
||||
\li Select \uicontrol Add to add a new entry to the list.
|
||||
|
||||
\image qtcreator-add-online-doc.webp "List of URLs in Filter Configuration dialog"
|
||||
|
||||
\li Double-click the new entry to specify a URL and a search command.
|
||||
For example, \c {http://www.google.com/search?q=%1}.
|
||||
|
||||
\li Click \uicontrol OK.
|
||||
|
||||
\endlist
|
||||
|
||||
\section1 Creating Locator Filters
|
||||
|
||||
You can create custom locator filters for searching in a directory structure
|
||||
or on the web.
|
||||
|
||||
To quickly access files not directly mentioned in your project, you can
|
||||
create your own directory filters. That way you can locate files in a
|
||||
directory structure you have defined.
|
||||
|
||||
To create custom locator filters:
|
||||
|
||||
\list 1
|
||||
|
||||
\li In the locator, select \uicontrol Options >
|
||||
\uicontrol Configure to open the \uicontrol Locator preferences.
|
||||
|
||||
\image qtcreator-locator-customize.webp "Locator preferences"
|
||||
|
||||
\li Select \uicontrol Add > \uicontrol {Files in Directories} to add
|
||||
a directory filter or \uicontrol {URL Template} to add a URL
|
||||
filter. The settings to specify depend on the filter type.
|
||||
|
||||
\image qtcreator-locator-generic-directory-filter.png "Filter Configuration dialog"
|
||||
|
||||
\li In the \uicontrol Name field, enter a name for your filter.
|
||||
|
||||
\li In the \uicontrol Directories field, select at least one
|
||||
directory. The locator searches directories recursively.
|
||||
|
||||
\li In the \uicontrol {File pattern} field, specify file patterns to
|
||||
restrict the search to files that match the pattern.
|
||||
Separate the patterns with commas. For example, to search for all
|
||||
\c {.qml} and \c {.ui.qml} files, enter \c{*.qml,*.ui.qml}
|
||||
|
||||
\li In the \uicontrol {Exclusion pattern} field, specify file
|
||||
patterns to omit files from the search.
|
||||
|
||||
\li In the \uicontrol Prefix field, specify the prefix string.
|
||||
|
||||
To implicitly include the filter even when not typing a prefix
|
||||
as a part of the search string, select
|
||||
\uicontrol {Include by default}.
|
||||
|
||||
\li Select \uicontrol OK.
|
||||
|
||||
\endlist
|
||||
|
||||
\section1 Configuring Locator Cache
|
||||
|
||||
The locator searches the files matching your file pattern in the directories
|
||||
you have selected and caches that information. \QC updates the cache for all
|
||||
preset filters as you write code. By default, \QC updates your custom
|
||||
filters once an hour.
|
||||
|
||||
To update the cached information manually, select \uicontrol Options >
|
||||
\uicontrol Refresh in the locator.
|
||||
|
||||
To set a new cache update time:
|
||||
|
||||
\list 1
|
||||
|
||||
\li Select \preferences > \uicontrol Environment > \uicontrol Locator.
|
||||
|
||||
\li In \uicontrol {Refresh interval}, define new time in minutes.
|
||||
|
||||
\endlist
|
||||
|
||||
\section1 Executing JavaScript
|
||||
|
||||
The locator has a JavaScript interpreter for performing calculations.
|
||||
|
||||
Beside simple mathematical operations, like ((1 + 2) * 3), the following
|
||||
built-in functions exist:
|
||||
|
||||
\table
|
||||
\header
|
||||
\li Function
|
||||
\li Purpose
|
||||
\row
|
||||
\li abs(x)
|
||||
\li Returns the absolute value of x
|
||||
\row
|
||||
\li acos(x)
|
||||
\li Returns the arccosine of x, in radians
|
||||
\row
|
||||
\li asin(x)
|
||||
\li Returns the arcsine of x, in radians
|
||||
\row
|
||||
\li atan(x)
|
||||
\li Returns the arctangent of x, in radians
|
||||
\row
|
||||
\li atan2(x, y)
|
||||
\li Returns the arctangent of the quotient of its arguments
|
||||
\row
|
||||
\li bin(x)
|
||||
\li Returns the binary representation of x
|
||||
\row
|
||||
\li ceil(x)
|
||||
\li Returns the value of x rounded up to the next integer
|
||||
\row
|
||||
\li cos(x)
|
||||
\li Returns the cosine of x (x is in radians)
|
||||
\row
|
||||
\li exp(x)
|
||||
\li Returns the value of E to the power of x
|
||||
\row
|
||||
\li e()
|
||||
\li Returns Euler's number E (2.71828...)
|
||||
\row
|
||||
\li floor(x)
|
||||
\li Returns the value of x rounded down to the next integer
|
||||
\row
|
||||
\li hex(x)
|
||||
\li Returns the hexadecimal representation of x
|
||||
\row
|
||||
\li log(x)
|
||||
\li Returns the natural logarithm (base E) of x
|
||||
\row
|
||||
\li max([value1[, value2[, ...]]])
|
||||
\li Returns the highest value of the given numbers
|
||||
\row
|
||||
\li min([value1[, value2[, ...]]])
|
||||
\li Returns the lowest value of the given numbers
|
||||
\row
|
||||
\li oct(x)
|
||||
\li Returns the octal representation of x
|
||||
\row
|
||||
\li pi()
|
||||
\li Returns PI (3.14159...)
|
||||
\row
|
||||
\li pow(x, y)
|
||||
\li Returns the value of x to the power of y
|
||||
\row
|
||||
\li random()
|
||||
\li Returns a random number between 0 and 1
|
||||
\row
|
||||
\li round(x)
|
||||
\li Returns the value of x rounded to the next integer
|
||||
\row
|
||||
\li sin(x)
|
||||
\li Returns the sine of x (x is in radians)
|
||||
\row
|
||||
\li sqrt(x)
|
||||
\li Returns the square root of x
|
||||
\row
|
||||
\li tan(x)
|
||||
\li Returns the tangent of x (x is in radians)
|
||||
\endtable
|
||||
*/
|
@@ -27,7 +27,7 @@
|
||||
|
||||
\li Syntactic and \l{Semantic Highlighting}{semantic highlighting}
|
||||
|
||||
\li Navigating in the code by using the \l{Searching with the Locator}
|
||||
\li Navigating in the code by using the \l{Navigate with locator}
|
||||
{locator}, \l{Move to symbol definition or declaration}
|
||||
{following symbols}, and so on
|
||||
|
||||
|
@@ -173,7 +173,7 @@
|
||||
|
||||
\sa {Edit Code}{How To: Edit Code},
|
||||
{Manage Language Servers}{How To: Manage Language Servers},
|
||||
{Searching with the Locator}, {Keyboard Shortcuts}, {Sidebar Views}
|
||||
{Navigate with locator}, {Keyboard Shortcuts}, {Sidebar Views}
|
||||
*/
|
||||
|
||||
/*!
|
||||
@@ -258,7 +258,7 @@
|
||||
\endlist
|
||||
|
||||
\sa {Edit Code}{How To: Edit Code}, {Edit Mode},
|
||||
{Searching with the Locator}, {File System}, {Projects}
|
||||
{Navigate with locator}, {File System}, {Projects}
|
||||
*/
|
||||
|
||||
/*!
|
||||
@@ -378,7 +378,7 @@
|
||||
\image qtcreator-add-resource.png {Resource Browser}
|
||||
|
||||
\sa {Edit Code}{How To: Edit Code}, {Edit Mode}, {Editing Keyboard Shortcuts},
|
||||
{Searching with the Locator}
|
||||
{Navigate with locator}
|
||||
*/
|
||||
|
||||
/*!
|
||||
|
@@ -78,7 +78,7 @@
|
||||
|
||||
To manually request a suggestion at the current editor's cursor position,
|
||||
enter \uicontrol {t} (\uicontrol {Request Copilot Suggestion}) in the
|
||||
\l{Searching with the Locator}{locator}.
|
||||
\l{Navigate with locator}{locator}.
|
||||
|
||||
Hover the mouse over a suggestion to show a toolbar with
|
||||
\inlineimage icons/prev.png
|
||||
|
@@ -29,7 +29,7 @@
|
||||
\li \l{Semantic Highlighting}{Semantic highlighting}, as defined in
|
||||
\l{https://github.com/microsoft/vscode-languageserver-node/pull/367}
|
||||
{Proposal of the semantic highlighting protocol extension}
|
||||
\li Navigating in the code by using the \l{Searching with the Locator}
|
||||
\li Navigating in the code by using the \l{Navigate with locator}
|
||||
{locator} or \l{Move to symbol definition or declaration}
|
||||
{moving to the symbol definition}
|
||||
\li Inspecting code by viewing the document outline in the
|
||||
|
265
doc/qtcreator/src/editors/creator-only/creator-locator.qdoc
Normal file
265
doc/qtcreator/src/editors/creator-only/creator-locator.qdoc
Normal file
@@ -0,0 +1,265 @@
|
||||
// Copyright (C) 2024 The Qt Company Ltd.
|
||||
// SPDX-License-Identifier: LicenseRef-Qt-Commercial OR GFDL-1.3-no-invariants-only
|
||||
|
||||
/*!
|
||||
\page creator-editor-locator.html
|
||||
\previouspage creator-how-tos.html
|
||||
|
||||
\ingroup creator-how-to-search
|
||||
|
||||
\title Navigate with locator
|
||||
|
||||
Locate not only files, but any items defined by \e{locator filters},
|
||||
as well as trigger global actions and perform other tasks, such as build
|
||||
projects or run external tools.
|
||||
|
||||
\image qtcreator-locator.webp {List of locator filters}
|
||||
|
||||
\section1 Go to the locator
|
||||
|
||||
To activate the locator:
|
||||
|
||||
\list
|
||||
|
||||
\li Press \key {Ctrl+K} (\key {Cmd+K} on \macos).
|
||||
|
||||
\li Go to \uicontrol Tools, and then select \uicontrol Locate.
|
||||
|
||||
\li Go to \uicontrol Edit, and then select \uicontrol {Go to Line}.
|
||||
|
||||
\li Click the line and column indicator on the
|
||||
\l{Edit Mode}{editor toolbar}.
|
||||
|
||||
\endlist
|
||||
|
||||
By default, you can find the locator in the bottom left of the \QC window.
|
||||
To open it as a centered popup, select \inlineimage icons/magnifier.png, and
|
||||
then select \uicontrol {Open as Centered Popup}.
|
||||
|
||||
\section1 Use locator filters
|
||||
|
||||
The filters that are available depend on the file type. For more information
|
||||
about what a particular locator filter does, see the tooltips that appear
|
||||
when you hover over a filter in the locator. For longer descriptions of the
|
||||
filters, select \inlineimage icons/magnifier.png > \uicontrol Configure to
|
||||
open the \l{Locator} preferences.
|
||||
|
||||
To use a locator filter:
|
||||
|
||||
\list
|
||||
\li Type the locator filter prefix followed by \key Space. The prefix
|
||||
is usually short, from one to three characters. Then type the search
|
||||
string (for example, a filename or class name) or the command to
|
||||
execute.
|
||||
|
||||
\li Double-click a locator filter in the filter list to use it. Press
|
||||
the up and down arrow keys or press \key Ctrl+P and \key Ctrl+N
|
||||
to move up and down the list, and then press \key Enter to use the
|
||||
selected filter.
|
||||
\endlist
|
||||
|
||||
As you type a search string,
|
||||
the locator shows the occurrences of that string regardless of where in the
|
||||
name of an object it appears. Some locator filters, such as colon, \c m,
|
||||
and \c t, support \e fuzzy matching, which means that you can enter the
|
||||
uppercase letters to locate a symbol when using camel case or the letters
|
||||
after the underscore when using snake case.
|
||||
|
||||
\section2 Use wildcard characters in search strings
|
||||
|
||||
To narrow down the search results, use the following wildcard characters:
|
||||
|
||||
\list
|
||||
|
||||
\li To match any number of any or no characters, enter \c{*}.
|
||||
|
||||
\li To match a single instance of any character, enter \c{?}.
|
||||
|
||||
\endlist
|
||||
|
||||
\section1 Omit default filters
|
||||
|
||||
By default, you can use the following preset locator filters without a
|
||||
prefix:
|
||||
|
||||
\list
|
||||
|
||||
\li Going to a line and column in the current file (\c {l}).
|
||||
|
||||
\li Going to an open file (\c {o}).
|
||||
|
||||
\li Going to a file in any open project (\c {a}).
|
||||
|
||||
\endlist
|
||||
|
||||
\section1 Locate lines and columns
|
||||
|
||||
To move directly to a particular line and column in the document when you
|
||||
open the document, append the line and column number to the file name in
|
||||
the locator, separated by plus signs (+) or colons (:).
|
||||
|
||||
For example, to open \e HelloWorld.qml to line
|
||||
41 and column 2, enter:
|
||||
|
||||
\code
|
||||
HelloWorld.qml:41:2
|
||||
\endcode
|
||||
|
||||
\section1 Search the web
|
||||
|
||||
Use the \uicontrol {Web Search (r)} locator filter to perform web searches.
|
||||
|
||||
URLs and search commands for Bing, Google, Yahoo! Search, cplusplus.com, and
|
||||
Wikipedia are configured by default. Add search commands for other web search
|
||||
engines in the locator preferences.
|
||||
|
||||
\section1 Create files and directories from the locator
|
||||
|
||||
To create a new file and open it in the editor:
|
||||
|
||||
\list 1
|
||||
\li Type \c f followed by \key Space, followed by path and file name
|
||||
\li Press \key Enter or select \uicontrol {Create and Open File}.
|
||||
\endlist
|
||||
|
||||
To create a directory, select \uicontrol {Create Directory}.
|
||||
|
||||
\sa {Search}{How To: Search}, {Manage sessions}, {Perform calculations},
|
||||
{Locator}
|
||||
|
||||
*/
|
||||
|
||||
/*!
|
||||
\page creator-preferences-locator.html
|
||||
\previouspage creator-reference.html
|
||||
|
||||
\ingroup creator-reference-preferences
|
||||
|
||||
\title Locator
|
||||
|
||||
\brief Add and change locator filters.
|
||||
|
||||
To set locator preferences, go to \preferences > \uicontrol Environment >
|
||||
\uicontrol Locator.
|
||||
|
||||
\image qtcreator-locator-customize.webp {Locator preferences}
|
||||
|
||||
\section1 Changing Locator Filters
|
||||
|
||||
You can change the preset locator filters to match your use case. For
|
||||
example, change the filter prefix and restrict the search to
|
||||
items that match the filter.
|
||||
|
||||
To configure a locator filter:
|
||||
|
||||
\list 1
|
||||
|
||||
\li Go to \preferences > \uicontrol Environment > \uicontrol Locator.
|
||||
|
||||
\li Select a filter, and then select \uicontrol Edit.
|
||||
|
||||
\li Specify the prefix string.
|
||||
|
||||
\image qtcreator-locator-filter-edit-ai.webp {Filter Configuration dialog}
|
||||
|
||||
\li To implicitly include the filter even when not typing a prefix as a
|
||||
part of the search string, select \uicontrol {Include by default}.
|
||||
|
||||
\endlist
|
||||
|
||||
\section1 Adding Web Search Engines
|
||||
|
||||
By default, the \uicontrol {Web Search (r)} locator filter includes the URLs
|
||||
and search commands for Bing, Google, Yahoo! Search, cplusplus.com, and
|
||||
Wikipedia.
|
||||
|
||||
To find out the format of the search command to use for your favorite
|
||||
web search engine, perform a search in your browser and copy the resulting
|
||||
URL to the locator filter configuration. Replace the search term with the
|
||||
variable \c {%1}.
|
||||
|
||||
To add URLs and search commands to the list:
|
||||
|
||||
\list 1
|
||||
|
||||
\li Go to \preferences > \uicontrol Environment > \uicontrol Locator.
|
||||
|
||||
\li Select \uicontrol {Web Search} > \uicontrol Edit.
|
||||
|
||||
\li Select \uicontrol Add to add a URL filter to the list.
|
||||
|
||||
\image qtcreator-add-online-doc.webp {List of URLs in Filter Configuration dialog}
|
||||
|
||||
\li Double-click the new entry to specify a URL and a search command.
|
||||
For example, \c {http://www.google.com/search?q=%1}.
|
||||
|
||||
\li Click \uicontrol OK.
|
||||
|
||||
\endlist
|
||||
|
||||
To add a new separate web search locator filter instead of updating the
|
||||
default filter, select \uicontrol Add > \uicontrol {URL Template}.
|
||||
|
||||
\section1 Creating Locator Filters
|
||||
|
||||
To quickly access files not directly mentioned in your project,
|
||||
create your own directory filters. That way you can locate files in a
|
||||
directory structure you have defined.
|
||||
|
||||
To create custom locator filters:
|
||||
|
||||
\list 1
|
||||
|
||||
\li Go to \preferences > \uicontrol Environment > \uicontrol Locator.
|
||||
|
||||
\li Select \uicontrol Add > \uicontrol {Files in Directories} to add
|
||||
a directory filter.
|
||||
|
||||
\image qtcreator-locator-generic-directory-filter.png {Filter Configuration dialog}
|
||||
|
||||
\li In \uicontrol Name, enter a name for your filter.
|
||||
|
||||
\li Select \uicontrol Add to add directories to \uicontrol Directories.
|
||||
The locator searches directories recursively.
|
||||
|
||||
\li In \uicontrol {File pattern}, specify file patterns to
|
||||
restrict the search to files that match the pattern.
|
||||
Separate the patterns with commas. For example, to search for all
|
||||
\c {.qml} and \c {.ui.qml} files, enter \c{*.qml,*.ui.qml}
|
||||
|
||||
\li In \uicontrol {Exclusion pattern}, specify file
|
||||
patterns to omit files from the search.
|
||||
|
||||
\li In \uicontrol Prefix, specify the prefix string.
|
||||
|
||||
To implicitly include the filter even when not typing a prefix
|
||||
as a part of the search string, select
|
||||
\uicontrol {Include by default}.
|
||||
|
||||
\li Select \uicontrol OK.
|
||||
|
||||
\endlist
|
||||
|
||||
\section1 Configuring Locator Cache
|
||||
|
||||
The locator searches the files matching your file pattern in the directories
|
||||
you have selected and caches that information. \QC updates the cache for all
|
||||
preset filters as you write code. By default, \QC updates your custom
|
||||
filters once an hour.
|
||||
|
||||
To update the cached information manually, select
|
||||
\inlineimage icons/magnifier.png > \uicontrol Refresh in the locator.
|
||||
|
||||
To set a new cache update time:
|
||||
|
||||
\list 1
|
||||
|
||||
\li Go to \preferences > \uicontrol Environment > \uicontrol Locator.
|
||||
|
||||
\li In \uicontrol {Refresh interval}, set a new time in minutes.
|
||||
|
||||
\endlist
|
||||
|
||||
\sa {Navigate with locator}, {Search}{How To: Search}, {Perform calculations},
|
||||
{Locator}
|
||||
*/
|
@@ -28,7 +28,7 @@
|
||||
\uicontrol Keyboard. For more information, see \l{Assign keyboard shortcuts}.
|
||||
|
||||
You can also use the \c rm locator filter to run a macro. For more
|
||||
information, see \l{Searching with the Locator}.
|
||||
information, see \l{Navigate with locator}.
|
||||
|
||||
To view and remove saved macros, select \preferences >
|
||||
\uicontrol {Text Editor} > \uicontrol Macros.
|
||||
|
@@ -131,7 +131,7 @@
|
||||
\page creator-how-to-advanced-search.html
|
||||
\if defined(qtdesignstudio)
|
||||
\previouspage creator-editor-finding.html
|
||||
\nextpage creator-editor-locator.html
|
||||
\nextpage creator-how-to-rename-symbols.html
|
||||
\else
|
||||
\previouspage creator-how-tos.html
|
||||
\endif
|
||||
|
@@ -40,12 +40,16 @@
|
||||
|
||||
\image qtcreator-preferences.webp {Filtering preferences}
|
||||
|
||||
\if defined(qtcreator)
|
||||
\section1 Go to tabs in Preferences
|
||||
|
||||
To go to a tab in the \uicontrol Preferences dialog from anywhere in \QC,
|
||||
use the \c t \l{Searching with the Locator}{locator} filter. For example,
|
||||
use the \c t \l{Navigate with locator}{locator} filter. For example,
|
||||
to open the \uicontrol Interface tab, enter \c {t preferences interface}
|
||||
in the locator.
|
||||
|
||||
\image qtcreator-locator-filter-t.webp {Using the locator to open a tab in Preferences}
|
||||
|
||||
\sa {Navigate with locator}
|
||||
\endif
|
||||
*/
|
||||
|
@@ -230,13 +230,99 @@
|
||||
|
||||
\title Perform calculations
|
||||
|
||||
Open the \uicontrol Locator with \key {Ctrl+K} and type =, followed by a space.
|
||||
You can now do basic calculations, with options to copy the results to the clipboard
|
||||
by navigating through the entries and pressing \key {Enter}.
|
||||
To do basic calculations in the locator:
|
||||
|
||||
\image qtcreator-locator.webp "List of locator filters"
|
||||
\list 1
|
||||
\li Press \key {Ctrl+K} (\key {Cmd+K} on \macos) to activate the locator.
|
||||
\li Enter \c =, followed by a space.
|
||||
\image qtcreator-locator.webp {List of locator filters}
|
||||
\li Perform calculations.
|
||||
\endlist
|
||||
|
||||
\sa {Executing JavaScript}
|
||||
Navigate through the entries and press \key {Enter} to copy the results to
|
||||
the clipboard
|
||||
|
||||
\section1 Built-in functions
|
||||
|
||||
Beside simple mathematical operations, like ((1 + 2) * 3), the following
|
||||
built-in functions exist:
|
||||
|
||||
\table
|
||||
\header
|
||||
\li Function
|
||||
\li Purpose
|
||||
\row
|
||||
\li abs(x)
|
||||
\li Returns the absolute value of x
|
||||
\row
|
||||
\li acos(x)
|
||||
\li Returns the arccosine of x, in radians
|
||||
\row
|
||||
\li asin(x)
|
||||
\li Returns the arcsine of x, in radians
|
||||
\row
|
||||
\li atan(x)
|
||||
\li Returns the arctangent of x, in radians
|
||||
\row
|
||||
\li atan2(x, y)
|
||||
\li Returns the arctangent of the quotient of its arguments
|
||||
\row
|
||||
\li bin(x)
|
||||
\li Returns the binary representation of x
|
||||
\row
|
||||
\li ceil(x)
|
||||
\li Returns the value of x rounded up to the next integer
|
||||
\row
|
||||
\li cos(x)
|
||||
\li Returns the cosine of x (x is in radians)
|
||||
\row
|
||||
\li exp(x)
|
||||
\li Returns the value of E to the power of x
|
||||
\row
|
||||
\li e()
|
||||
\li Returns Euler's number E (2.71828...)
|
||||
\row
|
||||
\li floor(x)
|
||||
\li Returns the value of x rounded down to the next integer
|
||||
\row
|
||||
\li hex(x)
|
||||
\li Returns the hexadecimal representation of x
|
||||
\row
|
||||
\li log(x)
|
||||
\li Returns the natural logarithm (base E) of x
|
||||
\row
|
||||
\li max([value1[, value2[, ...]]])
|
||||
\li Returns the highest value of the given numbers
|
||||
\row
|
||||
\li min([value1[, value2[, ...]]])
|
||||
\li Returns the lowest value of the given numbers
|
||||
\row
|
||||
\li oct(x)
|
||||
\li Returns the octal representation of x
|
||||
\row
|
||||
\li pi()
|
||||
\li Returns PI (3.14159...)
|
||||
\row
|
||||
\li pow(x, y)
|
||||
\li Returns the value of x to the power of y
|
||||
\row
|
||||
\li random()
|
||||
\li Returns a random number between 0 and 1
|
||||
\row
|
||||
\li round(x)
|
||||
\li Returns the value of x rounded to the next integer
|
||||
\row
|
||||
\li sin(x)
|
||||
\li Returns the sine of x (x is in radians)
|
||||
\row
|
||||
\li sqrt(x)
|
||||
\li Returns the square root of x
|
||||
\row
|
||||
\li tan(x)
|
||||
\li Returns the tangent of x (x is in radians)
|
||||
\endtable
|
||||
|
||||
\sa {Navigate with locator}, {Locator}
|
||||
*/
|
||||
|
||||
/*!
|
||||
@@ -281,7 +367,7 @@
|
||||
\li Go to \uicontrol {Follow Symbol Under Cursor} in the context menu.
|
||||
\endlist
|
||||
|
||||
\sa {Edit Code}{How To: Edit Code}, {Edit Mode}, {Searching with the Locator}
|
||||
\sa {Edit Code}{How To: Edit Code}, {Edit Mode}, {Navigate with locator}
|
||||
*/
|
||||
|
||||
/*!
|
||||
|
@@ -82,7 +82,12 @@
|
||||
|
||||
\section1 Open sessions
|
||||
|
||||
To switch between sessions, select \uicontrol {Open}.
|
||||
To switch between sessions:
|
||||
|
||||
\list
|
||||
\li Go to \uicontrol File > \uicontrol Sessions, and select a session.
|
||||
\li Select \uicontrol {Open} in \uicontrol {Session Manager}.
|
||||
\endlist
|
||||
|
||||
\if defined(qtcreator)
|
||||
|
||||
@@ -93,17 +98,30 @@
|
||||
|
||||
\image qtcreator-welcome-session.png
|
||||
|
||||
You can also use the \c t locator filter to open a session. For more
|
||||
information, see \l{Searching with the Locator}.
|
||||
|
||||
To view more information about a session, select the down arrow icon that
|
||||
appears when you move the mouse cursor over the session name. Select actions
|
||||
to clone, rename, and delete sessions.
|
||||
|
||||
When you start \QC from the command line, you can give the name of
|
||||
a session as an argument and \QC will start with this session.
|
||||
a session as an argument to start \QC with this session.
|
||||
|
||||
\sa {Command-Line Options}, {Searching with the Locator}
|
||||
\section1 Open sessions from the locator
|
||||
|
||||
Use the \c t filter that triggers menu commands to open sessions.
|
||||
|
||||
To locate a session:
|
||||
|
||||
\list 1
|
||||
\li Press \key {Ctrl+K} (\key {Cmd+K} on \macos) to activate the locator.
|
||||
\li Enter:
|
||||
\list
|
||||
\li \c {t} \e {<session_name>}
|
||||
\li \c {t sess} \e {<session_name>}
|
||||
\endlist
|
||||
where \e <session_name> is the name of the session to open.
|
||||
\li Double-click the session name to open it.
|
||||
\endlist
|
||||
|
||||
\sa {Navigate with locator}, {Command-Line Options}
|
||||
\endif
|
||||
|
||||
*/
|
||||
|
@@ -18,9 +18,8 @@
|
||||
\image qtcreator-new-file.webp {New File wizard}
|
||||
|
||||
\note You can also use the \c f locator filter to create a new
|
||||
file and open it in the editor. For more information, see
|
||||
\l {Creating Files and Directories from Locator}. However, you must
|
||||
manually add the created file to a project.
|
||||
file and open it in the editor. However, you must manually add
|
||||
the created file to a project.
|
||||
|
||||
\section1 Select file type
|
||||
|
||||
@@ -74,8 +73,9 @@
|
||||
\li Empty Nim source and script files.
|
||||
\endtable
|
||||
|
||||
\sa {Add Files}{How To: Add Files}, {Add tests to existing test projects},
|
||||
{Create UML-style models}, {Use project wizards}
|
||||
\sa {Navigate with locator}, {Add Files}{How To: Add Files},
|
||||
{Add tests to existing test projects}, {Create UML-style models},
|
||||
{Use project wizards}
|
||||
*/
|
||||
|
||||
/*!
|
||||
|
@@ -81,7 +81,7 @@
|
||||
|
||||
Select \uicontrol {Build for Run Configuration} to
|
||||
build the executable that corresponds to the selected run configuration.
|
||||
You can also use the \c cm filter in the \l {Searching with the Locator}
|
||||
You can also use the \c cm filter in the \l {Navigate with locator}
|
||||
{locator}.
|
||||
|
||||
To remove all build artifacts, select one of \uicontrol {Clean} menu commands.
|
||||
|
@@ -198,7 +198,7 @@
|
||||
directory in the \l {File System} view.
|
||||
|
||||
Declaring files as a part of the project also makes them visible to the
|
||||
\l{Searching with the Locator}{locator} and
|
||||
\l{Navigate with locator}{locator} and
|
||||
\l{Search in projects or file systems}{project-wide search}.
|
||||
|
||||
\section1 CMake Projects
|
||||
|
@@ -18,7 +18,7 @@
|
||||
\brief Shows all the files in the current directory.
|
||||
|
||||
\if defined(qtcreator)
|
||||
\note Usually, \l{Searching with the Locator}{searching with the locator}
|
||||
\note Usually, \l{Navigate with locator}{searching with the locator}
|
||||
is the fastest way to find a particular project, file, class, or function,
|
||||
or almost anything else in your project. Use the \e {file system (f)} filter
|
||||
to open files from anywhere in the file system.
|
||||
|
@@ -25,7 +25,7 @@
|
||||
|
||||
\image qtcreator-projects-view-edit.png {Projects view in the sidebar}
|
||||
|
||||
\note Usually, \l{Searching with the Locator}{searching with the locator}
|
||||
\note Usually, \l{Navigate with locator}{searching with the locator}
|
||||
is the fastest way to find a particular project, file, class, or function,
|
||||
or almost anything else in your project.
|
||||
\else
|
||||
|
@@ -55,7 +55,7 @@
|
||||
\li \inlineimage numbers/06.png
|
||||
\li Locator
|
||||
\li Find a particular project, file, class, or function.
|
||||
\li \l{Searching with the Locator}
|
||||
\li \l{Navigate with locator}
|
||||
\row
|
||||
\li \inlineimage numbers/07.png
|
||||
\li Output
|
||||
|
@@ -2,7 +2,7 @@
|
||||
// SPDX-License-Identifier: LicenseRef-Qt-Commercial OR GFDL-1.3-no-invariants-only
|
||||
|
||||
/*!
|
||||
\previouspage creator-editor-locator.html
|
||||
\previouspage creator-how-to-rename-symbols.html
|
||||
\page creator-jump-to-the-code.html
|
||||
\nextpage creator-editor-quick-fixes.html
|
||||
|
||||
|
@@ -24,12 +24,6 @@
|
||||
|
||||
Search for QML types and rename them in all files in a project.
|
||||
|
||||
\li \l{Searching with the Locator}
|
||||
|
||||
Use the locator to browse
|
||||
through projects, files, classes, functions, documentation and
|
||||
file systems.
|
||||
|
||||
\li \l{Jump to the Code}
|
||||
|
||||
Jump to the code for a specific component directly from
|
||||
|
@@ -214,7 +214,6 @@
|
||||
\li \l{Search in current file}
|
||||
\li \l{Search in projects or file systems}
|
||||
\li \l{Rename symbols}
|
||||
\li \l{Searching with the Locator}
|
||||
\li \l{Jump to the Code}
|
||||
\endlist
|
||||
\li \l{Apply quick fixes}
|
||||
|
Reference in New Issue
Block a user