This makes it possible to save it for the session instead/in addition.
Task-number: QTCREATORBUG-793
Change-Id: I95bc20f4912a97863cb88849e32699a689ba6f3f
Reviewed-by: David Schulz <david.schulz@qt.io>
Now that we have the "build" directory in the source directory we need
to exclude it from the find in files search list.
Change-Id: I74b20f828ffed51b5d7be98efa662bcc4b420523
Reviewed-by: <github-actions-qt-creator@cristianadam.eu>
Reviewed-by: Eike Ziller <eike.ziller@qt.io>
The FindInFiles definition cannot go yet to the .cpp yet as there
are some exported functions.
Change-Id: I2d2f02ae80b560e3147f461fcbee0fa62b8085a3
Reviewed-by: David Schulz <david.schulz@qt.io>
Reviewed-by: <github-actions-qt-creator@cristianadam.eu>
Enhanced UI by introducing a button for users to easily set the
directory of the current document to the search path, addressing the
limitation of the existing 'Browse...' button.
Change-Id: If33f5c34428224ceb8854794b0dc222d588429cb
Reviewed-by: <github-actions-qt-creator@cristianadam.eu>
Reviewed-by: Eike Ziller <eike.ziller@qt.io>
The FileFindParameters::additionalParameters,
holding QVariant, was ambiguous. Since GitGrep and
SilverSearcher need a search directory input
unconditionally, replace the additionalParameters field
with searchDir of FilePath type. For Internal
search engine, this field isn't used - the searchDir
is already passed in FindInFiles::fileContainerProvider()
with lambda capture; for other BaseFileFind subclasses,
not combined with non-Internal search engine, the field
isn't used anyway.
This change closes the chain of patches to eliminate
the usage of ambiguous QVariant type inside FileFindParameters.
Change-Id: Icddd1cfe46e86ea892221862d9d267f9c9fa173c
Reviewed-by: Orgad Shaneh <orgads@gmail.com>
Reviewed-by: Qt CI Bot <qt_ci_bot@qt-project.org>
The fileContainerProvider() is called only once per
SearchResult instance, and the result (the provider)
is stored inside FileFindParameters.
In this way the extra data, like the name filters or
the search directory, are set just once. Whenever the
search is started (or started again), the stored provider
recreates the FileContainer according to the data that
has been captured by the lambda when the provider was created.
This patch eliminates the need for retrieving the custom
data from QVariant. It also eliminates the set of arbitrary
arguments for the removed files() method.
Remove the BaseFileFind * argument from the
SearchEngine::executeSearch() method.
Change-Id: I7211f503f82db12b5a99c9d342466daaaae0839f
Reviewed-by: <github-actions-qt-creator@cristianadam.eu>
Reviewed-by: Qt CI Bot <qt_ci_bot@qt-project.org>
Reviewed-by: Eike Ziller <eike.ziller@qt.io>
Reuse it in BaseFileFind::files() and in
InternalEngine::executeSearch().
Change-Id: I2fed4e6af37e83d76deaa8d847564aa4950fc223
Reviewed-by: Qt CI Bot <qt_ci_bot@qt-project.org>
Reviewed-by: Eike Ziller <eike.ziller@qt.io>
Since we also license under GPL-3.0 WITH Qt-GPL-exception-1.0,
this applies only to a hypothetical newer version of GPL, that doesn't
exist yet. If such a version emerges, we can still decide to relicense...
While at it, replace (deprecated) GPL-3.0 with more explicit GPL-3.0-only
Change was done by running
find . -type f -exec perl -pi -e "s/LicenseRef-Qt-Commercial OR GPL-3.0\+ OR GPL-3.0 WITH Qt-GPL-exception-1.0/LicenseRef-Qt-Commercial OR GPL-3.0-only WITH Qt-GPL-exception-1.0/g" {} \;
Change-Id: I5097e6ce8d10233993ee30d7e25120e2659eb10b
Reviewed-by: Eike Ziller <eike.ziller@qt.io>
The only consumer is gitgrep and doesn't expand the path by itself.
Change-Id: Ic05d29f82a6d277731439ffc032a79f7cbc6f496
Reviewed-by: Eike Ziller <eike.ziller@qt.io>
... by a new PathChooser::textChanged signal.
They were both emitted in reaction to the underlying line edit's
textChanged() signal.
Use 'textChanged()' as name to mimic/match the Qt side. This also
makes it more clear on the user code side, when this happens.
Some textChanged() consumers should probably use editingFinished()
instead, but that's left for later changes.
Change-Id: Ib07347f616cbf1c5d09bc2f8671ca860d185d1f9
Reviewed-by: Eike Ziller <eike.ziller@qt.io>
Reviewed-by: Christian Stenger <christian.stenger@qt.io>
Replace the current license disclaimer in files by
a SPDX-License-Identifier.
Task-number: QTBUG-67283
Change-Id: I708fd1f9f2b73d60f57cc3568646929117825813
Reviewed-by: Eike Ziller <eike.ziller@qt.io>
It's returning a FilePath, so it's a better fit.
Keep the old versions as inline function now to ease downstream migration.
Change-Id: I535887928018f42b92895c8b0c82527f0d55e5ca
Reviewed-by: Eike Ziller <eike.ziller@qt.io>
Reviewed-by: André Hartmann <aha_1980@gmx.de>
More in line with QFileInfo terminonlogy which appears to be
best-of-breed within Qt.
Change-Id: I1d051ff1c8363ebd4ee56376451df45216c4c9ab
Reviewed-by: Christian Kandeler <christian.kandeler@qt.io>
Deprecated in Qt 5.14, alternative has been around since Qt 4 at least.
Change-Id: I4e3a53c289088368609e0d0ce2405a832d311308
Reviewed-by: Eike Ziller <eike.ziller@qt.io>
Reviewed-by: Orgad Shaneh <orgads@gmail.com>
Mainly to get rid of the QProcess::finished deprecation warning.
Also adjust coding style in the surrounding connects when needed.
Change-Id: I12f9b248c7974b892c4a069356e578e80f8c59e9
Reviewed-by: Christian Stenger <christian.stenger@qt.io>
When doing a "Files in File System" search. Also make sure that the
default filter is always available in the drop down.
Fixes: QTCREATORBUG-21541
Change-Id: Id8b315691b78e5d956cebf73067683dea8f8ca51
Reviewed-by: David Schulz <david.schulz@qt.io>
All files with full file path matching one of the exclusion patterns are
ignored in the search.
Searching with "git grep" now requires git >= 1.9
Change-Id: Ied5d11499bc1ff21247e50f8e146e8e5011dd2c1
Reviewed-by: David Schulz <david.schulz@qt.io>
Reviewed-by: Orgad Shaneh <orgads@gmail.com>
IFindFilter: Separate enabledChanged and validChanged
SearchEngine: Add enabledChanged
GitGrep: Enable widget based on enabled state
FindInFiles: Update validity on search engine enabledChanged instead of
hardcoding it to when the search path changed
Change-Id: I0c684423b871a3a4f1f164574f42e23b64cf9da0
Reviewed-by: David Schulz <david.schulz@qt.io>
This change adds a possibility to add more than
one external tool which can be used instead of internal finder.
Currently there is one extension: 'gitgrep'.
By default we use internal finder.
Change-Id: If644358552f3cea9ebda8308539322a1b6d3ab77
Reviewed-by: Orgad Shaneh <orgads@gmail.com>
Also, rename it to Core::Find. It hasn't been a plugin for a while.
Change-Id: I845885ccf18bdc1440258d523b033758d5583881
Reviewed-by: Eike Ziller <eike.ziller@theqtcompany.com>
In case of searching in scope: "Files on File System" when specified
directory does not exist, "Search" and "Search & Replace" buttons
should be disabled.
Task-number: QTCREATORBUG-5959
Change-Id: I1905cbea08aa07d72b96e9ad893ef3928d633c4f
Reviewed-by: Robert Loehning <robert.loehning@theqtcompany.com>
The current actually means "files about the file system".
Yes, I know it has been there forever and a day :).
Change-Id: Ica99118b902c9ba08a1434fc97820348b3312a87
Reviewed-by: Eike Ziller <eike.ziller@theqtcompany.com>