Check if the full search text matches a device root and suggest them at
the end of the results.
Change-Id: I6e6e201597a9824b5e0c342cbc930baf2ac5ffea
Reviewed-by: Marcus Tillmanns <marcus.tillmanns@qt.io>
When loading a Qt project, after the Scanning For Tests
finished, the scanForTests() blocks the main thread for
about 2.5 seconds on the call to m_taskTree->start().
The reason is that created task tree contains about 8000
asynchronous tasks. If all they run in parallel it means
that we start them all synchronously.
Don't use internal QThreadPool, as it doesn't prevent
the freeze when more than maxTreadCount() threads
are started. Instead, use the parallel limit with the
same constraint that was used for thread pool.
It means that only constrained number of tasks are being
run in parallel and the rest is being postponed until
some of the running tasks finished. In this way starting
the constrained number of tasks reduces the GUI freeze
to ~0 ms on task tree start().
In general: this patch divides the overall freeze of
2.5 seconds evenly into many very small pieces and
distributes them evenly in time, so the GUI stays responsive.
This patch, when applied together with 2 bottom patches,
reduces the GUI freeze spent inside scanForTests() after loading
a Qt project and after Scanning For Tests finished
from about 23 seconds into 160 ms.
Change-Id: If33076d4f042c3d96434b9f3cc305776fb30906d
Reviewed-by: Christian Stenger <christian.stenger@qt.io>
When loading a Qt project, after the Scanning For Tests
finished, the scanForTests() blocks the main thread for
about 3.5 seconds on the calls to parser->init().
Refactor the code so that it operates on QSet<FilePath>
instead of QList<FilePaths>.
This patch constraints the freeze to about 40 ms.
Change-Id: I219b3e2abf2b7e5166eec08d83f4cdcb8e4a8098
Reviewed-by: Jarek Kobus <jaroslaw.kobus@qt.io>
Reviewed-by: Christian Stenger <christian.stenger@qt.io>
The global synchronizer will be destructed after the
asynchronous shutdown phase and prior to deleting
all the plugins (i.e. synchronously). It's assumed that
between deleting the synchronizer and the point when all
plugin destructors are finished no new futures are added
to the global future synchronizer.
Change-Id: Ibc839b04f2c2bbd35980b8baed51b29c2c4f7c76
Reviewed-by: Eike Ziller <eike.ziller@qt.io>
between old and new API, so I can continue with changes on top.
Change-Id: Ic7b807c9b57296499f1a622bc4e3bc60fbba6865
Reviewed-by: Jarek Kobus <jaroslaw.kobus@qt.io>
Removal of a project file is done as a rename with an empty filename.
Fixes: QTCREATORBUG-25922
Change-Id: I4443d4a31723eb1ac93f02bad633bcfaf99a9573
Reviewed-by: <github-actions-qt-creator@cristianadam.eu>
Reviewed-by: hjk <hjk@qt.io>
This includes both with source files explicitly specified or
resulted from a file(GLOB|GLOB_RECOURSE) call.
Fixes: QTCREATORBUG-27538
Change-Id: I5ee113af168bdb8cd0a96e8ab2ae603c0607fb0b
Reviewed-by: hjk <hjk@qt.io>
Reviewed-by: <github-actions-qt-creator@cristianadam.eu>
FilePath::fileContents always uses "binary" mode when reading files.
FileReader::fetch previously used QFile with QIODevice::Text mode to
read (local) files, which converts \r\n to \n. This patch re-introduces
the conversion.
Fixes: QTCREATORBUG-29040
Change-Id: I0a16b056bea456512e6526497b725c73b0a1bd11
Reviewed-by: Christian Kandeler <christian.kandeler@qt.io>
Do not send qml document updated unnecessarily in case we know
that nothing had changed at all.
Change-Id: I1d6b94dcd68753e0f451a2812a752ff92f4860af
Reviewed-by: David Schulz <david.schulz@qt.io>
Reviewed-by: Jarek Kobus <jaroslaw.kobus@qt.io>
Make it possible to hide the preview, by having a toggle button for
"Show Preview" and "Show Editor", and ensure that at least one is always
on and they are in the order as the views themselves. Disable the "Swap
Views" button if only one is shown.
Change-Id: I0ec1e06c2a8ec94e34bf52eae45ba009fd8cd1b5
Reviewed-by: David Schulz <david.schulz@qt.io>
Reviewed-by: André Hartmann <aha_1980@gmx.de>
Reviewed-by: Qt CI Bot <qt_ci_bot@qt-project.org>
Reviewed-by: <github-actions-qt-creator@cristianadam.eu>
In case of loading a Creator project, after the Scanning
For Tests finished, the scanForTests() called by
TestCodeParser::onFinished() freezed the main thread for
about 1 second. In this case requestRemoval() signal was
emitted nearly 1000 times.
Optimize the internals:
1. Don't emit requestRemoval() for every single file but
emit it just once passing a QSet<FilePath> instead.
2. Adapt some other callees and callers to work on
QSet<FilePath> instead on a single FilePath.
This change constraints the freeze to about 2 ms.
Change-Id: If23b85b495c125d82eb3c8b5a6912349df122745
Reviewed-by: Christian Stenger <christian.stenger@qt.io>
Also fixes a crash when the state check returns after the widget
was already deleted.
Change-Id: I04256e6ba686469f18ebdb75c73e12cecf330bed
Reviewed-by: David Schulz <david.schulz@qt.io>
Reviewed-by: <github-actions-qt-creator@cristianadam.eu>
Previously "getClangIncludeDirAndVersion" would fail
on the QTC_CHECK and print out a warning each time.
Change-Id: Id67b0c7f4c4e52b030d52ad5140f48e0a19770e0
Reviewed-by: Christian Kandeler <christian.kandeler@qt.io>
Reviewed-by: <github-actions-qt-creator@cristianadam.eu>
Can be used to turn off the automatic completion insertion, so a user
only can request suggestions explicitly via the shortcut.
Change-Id: I0c4d9e2f41d30312b0870facdd80dc1d3d03d809
Reviewed-by: <github-actions-qt-creator@cristianadam.eu>
Reviewed-by: Marcus Tillmanns <marcus.tillmanns@qt.io>
Prepare for LocatorMatcher implementation.
Change-Id: I3d78045a06c8ebefacb033f0eabb5f7a2457ab06
Reviewed-by: Qt CI Bot <qt_ci_bot@qt-project.org>
Reviewed-by: Christian Kandeler <christian.kandeler@qt.io>
The automatic handling of the document inside the language client
manager is normally done after a document was opened successfully. Since
the QML document registers the document manually on construction before
the file was tried to be opened the automatic cleanup inside the manager
does not work. Postpone the document registration like in the
PythonDocument after the document was opened successfully.
Fixes: QTCREATORBUG-29021
Change-Id: I2dd9e2da9c9ed6d38414ad991df3c03b62e9d611
Reviewed-by: Eike Ziller <eike.ziller@qt.io>
Introduce QTC_USE_MATCHER env var temporarily. When
this var is set, the locator will use LocatorMatcher
internally.
It's very hard to migrate all the matchesFor() implementations
into the LocatorMatcherTask in one patch, so this var
is going to be removed when all filters are migrated.
Whenever a new patch providing the filter's migration
is added, it may be tested by setting this env var.
Add a temporary printout with info about which implementation
is selected in runtime.
Change-Id: If2d6006a89f3669ea4f6f8f171e59e00917419c4
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>
Users still want to create new Qt Quick Application applications
targeting Qt 5 and with other build systems than cmake.
Fixes: QTCREATORBUG-28964
Change-Id: Ib87b7128f0b34eb4126ec771f324c70a960b2a03
Reviewed-by: Eike Ziller <eike.ziller@qt.io>
They are now in WEBP format.
Also, move some text and images around and add a reference to
screenshot that shows a list of found files.
Change-Id: I219e2b94fe22ffc6d36b0de34529d3849a76ff1b
Reviewed-by: Eike Ziller <eike.ziller@qt.io>