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>
Avoid the separate line above the heading, which also doesn't
make much sense for the first item.
Change-Id: I2cb4aa270f805552215f4f3dc114103f9f3c313f
Reviewed-by: Alessandro Portale <alessandro.portale@qt.io>
It's going to be used as task item inside a filter for
LanguageClient::DocumentLocatorFilter.
Change-Id: Icf091af83e9e6979628a7c01f3fcc5bd4cd95a9a
Reviewed-by: David Schulz <david.schulz@qt.io>
To create connections between the UI and the different chapters
of the manual.
Remove the SVG source files for the old front page icons.
Task-number: QTCREATORBUG-28996
Change-Id: I9bd977df1005a4f8d6d60b438a66ec02ebb2bfb3
Reviewed-by: Eike Ziller <eike.ziller@qt.io>
This way the check if the target is enabled and the condition is met
doesn't have to be done manually.
Change-Id: If490a84fd5f1ede2d032c3800f69ede4f755bc2c
Reviewed-by: Marco Bubke <marco.bubke@qt.io>
Opening remote files can pop up a ssh prompt, and before that happens we
need to hide the locator popup, which otherwise can stay on front of
that ssh prompt window, preventing the user from entering their password
and opening the file.
Otherwise for example modal error dialogs could also be shown.
So, delay the EditorManager::open call to after the popup is hidden.
Amends 07b1e1c5fe and
7f49d93fc1
Change-Id: If2dd9e745d5d98615b851ee4315e7de9a75afb00
Reviewed-by: Jarek Kobus <jaroslaw.kobus@qt.io>
Connect to LocatorMatcher::done() signal instead of to
serialOutputDataReady() in order to get all the results
available (not just 1st partial results).
Give locator matcher a parent to avoid possible leak.
Amends 1cc7342ef1
Change-Id: Ie4a73a5b2dd25f22616bd30a13eb7393c96a890f
Reviewed-by: Christian Kandeler <christian.kandeler@qt.io>
Considering the case that a locator task is running
its task in a separate thread, at least 3 threads are
involved:
1. Main thread
2. Task's thread
3. OutputFilter's thread (the thread that removes
duplicates from tasks' results)
State before this patch:
The task (2) was always delivering the results into
the main thread (1), and when main thread received
the result it was passed to the OutputFilter's thread (3).
The drawback is that we needlessly block the main thread
for intermediate handling.
State after this patch:
The task (2) is delivering the results directly to
the OutputFilter's thread (3), without blocking
the main thread (1).
Currently the common object shared between all 3
threads is OutputDataProvider.
Rename addOutput() into reportOutput().
Make ILocatorFilter::matchers() private.
Change-Id: Ie8ad7d82ae02825e232f65b82fe329e780f58626
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>
The "product" qualification was missing for "sourceDirectory". This
currently happens to work due to scope pollution in the qbs
implementation.
Change-Id: I61758023d39d00505c586c1e5ad78185a69c0db1
Reviewed-by: <github-actions-qt-creator@cristianadam.eu>
Reviewed-by: Christian Stenger <christian.stenger@qt.io>