Commit Graph

74059 Commits

Author SHA1 Message Date
Thomas Hartmann
1f7f3144c3 QmlDesigner: Allow setting AuxiliaryData without lock
Change-Id: I63344aa240a2d1198195ff4130690131efe18a43
Reviewed-by: Henning Gründl <henning.gruendl@qt.io>
Reviewed-by: Qt CI Bot <qt_ci_bot@qt-project.org>
Reviewed-by: <github-actions-qt-creator@cristianadam.eu>
2021-11-22 10:10:50 +00:00
Christian Kandeler
f4070c4b43 ClangCodeModel: Do not report symbol references from non-existing files
... which we get from clangd's textDocument/references.
This works around https://github.com/clangd/clangd/issues/935.

Fixes: QTCREATORBUG-26574
Change-Id: I3933f30fdaca024a6e240bd0962de3d97acd0dbf
Reviewed-by: David Schulz <david.schulz@qt.io>
2021-11-22 09:56:59 +00:00
Christian Kandeler
799ffe7e0e ClangCodeModel: Fix possible crash in clangd test
Change-Id: Ifb68b62f1076fa6b086717d7a5db939e52e5e9f2
Reviewed-by: <github-actions-qt-creator@cristianadam.eu>
Reviewed-by: David Schulz <david.schulz@qt.io>
2021-11-22 09:50:56 +00:00
Leena Miettinen
1d57f755c2 Doc: Document "Prefer single line comments"
Update the screenshot.

Task-number: QTCREATORBUG-26278
Change-Id: I8c7eb57b189a1984be72ba4f15a224c1d80f9610
Reviewed-by: Jacopo Martellini <jack.lilhammers@gmail.com>
Reviewed-by: David Schulz <david.schulz@qt.io>
2021-11-22 08:58:17 +00:00
Cristian Adam
d177a20bb8 GitHub Actions: Separate ccache cache based on ide major version
This way master, which now is version 7 won't interfere with 6.0 branch
which will have version 6.

When branches share the same cache the ccache hit rate is now ~40%,
which is too low.

Reduce the ccache size so that the 5GB would host multiple branch
versions.

Change-Id: If29c917fb47f4e1fdab4b4257af8b0625f6f219e
Reviewed-by: <github-actions-qt-creator@cristianadam.eu>
Reviewed-by: Cristian Adam <cristian.adam@qt.io>
2021-11-21 11:08:17 +00:00
hjk
1a6e6825e6 SdkTool: Allow remote paths in various operations
QDir::cleanPath() doesn't work well with the scheme://... syntax.

Change-Id: I2d2a86e416251ea2396b67ab1e5831444d4a979a
Reviewed-by: Qt CI Bot <qt_ci_bot@qt-project.org>
Reviewed-by: Eike Ziller <eike.ziller@qt.io>
2021-11-19 13:56:01 +00:00
David Schulz
2dbe5c72d8 TextEditor: fix crash after removing hover handler
If we remove a hover handler from the editor we have to reset the last
cached hover result in the runner to prevent using this removed and
potentially deleted hover handler.

Change-Id: I2bbdbee9d018aac426832552d036926be9ff198e
Reviewed-by: Eike Ziller <eike.ziller@qt.io>
2021-11-19 12:30:26 +00:00
Jarek Kobus
b62fbe3ab9 Fix a crash when setting up toolbar editor actions
LanguageClient::updateEditorToolBar() contained the static
hashes that were keeping raw pointers to different
objects. However, the lifetime of these objects wasn't
controlled, so it could happen that we were operating
on dangling pointers.

In fact, like in the bugreport, some text editor widget could have
been deleted (together with his outline action), while later another
one (coincidently with the same address) could have appeared.
The old mapped widget still pointed to the removed action
so we crash.

Instead of keeping a static hashes we attach the custom
child object to the widget and keep there QPointers to all objects
we are interested in.

Fixes: QTCREATORBUG-26588
Change-Id: I335d9848ea85372baf3328772f0a249cee242dcd
Reviewed-by: David Schulz <david.schulz@qt.io>
2021-11-19 12:29:49 +00:00
David Schulz
897fbd8317 ClangCodeModel: show specific client name in diagnostic
Task-number: QTCREATORBUG-26585
Change-Id: I5edbe3ab40e91e2e5f8455b7a8d484a82c5cf6e6
Reviewed-by: Christian Kandeler <christian.kandeler@qt.io>
2021-11-19 12:29:00 +00:00
The Qt Project
1d785d6687 Merge "Merge remote-tracking branch 'origin/6.0'" 2021-11-19 11:15:43 +00:00
Miikka Heikkinen
ff891e3132 QmlDesigner: Don't enable position or layout menu if no content
Changed node position and layout context menu enabled checks to
correspond to checks that are used to determine the enabled
state of their contents.

Fixes: QDS-5483
Change-Id: I71a26ffce9cc12036397b62658a08d9895f7cb63
Reviewed-by: Mahmoud Badri <mahmoud.badri@qt.io>
Reviewed-by: Qt CI Bot <qt_ci_bot@qt-project.org>
2021-11-19 10:48:47 +00:00
David Schulz
f16a473b3b LanguageClient: make sure to send a response to a request
Restructure the message handling in the client, so if we get a message
with an id always send a response to the server either with the result
or with an error. Also make sure to not send responses to unreachable
server.

Change-Id: Ie74128069c1678af60871896d5dce45c08e71b05
Reviewed-by: Christian Kandeler <christian.kandeler@qt.io>
2021-11-19 10:32:11 +00:00
David Schulz
67971d2855 LSP: rename ApplyWorkspaceEditResponse -> ApplyWorkspaceEditResult
Change-Id: Ib30891a76b37d9013fb7a0cd7a787ef56d725668
Reviewed-by: Christian Kandeler <christian.kandeler@qt.io>
2021-11-19 10:32:07 +00:00
David Schulz
73e30f782d LanguageClient: prevent crash in LanguageClientManager
This also prevents assigning a client to a nullptr document.

Change-Id: Iacefe141a08fd47e69faacd4b0cd156c264ac19b
Reviewed-by: Jarek Kobus <jaroslaw.kobus@qt.io>
2021-11-19 10:09:37 +00:00
Eike Ziller
eba4115b82 Merge remote-tracking branch 'origin/6.0'
Change-Id: I3bab4e31bc5993c59c7025ebde0846bf6c75810e
2021-11-19 10:44:15 +01:00
Leena Miettinen
b569041709 Doc: Update Meson screenshots
And add alt text for them.

Task-number: QTCREATORBUG-26278
Change-Id: Ibe40f284e3162a77982fc3731313a6f2bc9492b5
Reviewed-by: Alessandro Portale <alessandro.portale@qt.io>
2021-11-19 08:47:58 +00:00
Miikka Heikkinen
afe77aa646 QmlDesigner: Fix 3D edit view rendering logic
If we have more than one render in queue for 3D edit view, we know the
current render is not good, so do not send it to creator side but
instead wait until we have just one render in the queue.

Also changed the timeout for queued renders to closely correspond to
60fps frame time as there is no point rendering any faster than that.
This also means we never need to queue more than two frames to ensure
correct results.

Fixes: QDS-5467
Change-Id: I49a3a7aeaff24484f48784d0391414165ce50748
Reviewed-by: Mahmoud Badri <mahmoud.badri@qt.io>
Reviewed-by: Qt CI Bot <qt_ci_bot@qt-project.org>
2021-11-19 08:19:02 +00:00
Leena Miettinen
727d1afa6d Doc: Describe "Find References with Access Type"
Task-number: QTCREATORBUG-26278
Change-Id: I08dbea1dd505f818ba2e4e5809e9ca6f37409750
Reviewed-by: Eike Ziller <eike.ziller@qt.io>
2021-11-19 08:16:15 +00:00
Jonathan Mouchou
d9addef725 QmlEditorWidgets: Fix missing character escape for transparent
When selecting transparency in the qt quick toolbar, the text inserted
is missing quotes around transparent.

Add missing quotes around transparent.

Fixes: QTCREATORBUG-10769
Change-Id: Ibc5d10b2276b44aee8afad60c33f0394a7d75ba7
Reviewed-by: Thomas Hartmann <thomas.hartmann@qt.io>
2021-11-19 04:23:38 +00:00
Christiaan Janssen
51c2ee8714 McuSupport: fix false positive when detecting upgradeable kit on Windows
Cause was: mismatched slashes-vs-backslashes in path comparison

Task-number: QTCREATORBUG-26584
Change-Id: I74ec18d33b8138ecc75a5b4928bd67f856b4c4c1
Reviewed-by: Dawid Śliwa <dawid.sliwa@qt.io>
Reviewed-by: hjk <hjk@qt.io>
Reviewed-by: Alessandro Portale <alessandro.portale@qt.io>
2021-11-18 16:50:11 +00:00
Leena Miettinen
9576c34366 Doc: Update info about Valgrind tools
Describe the toolbar options.

Task-number: QTCREATORBUG-26278
Change-Id: I51ebd08a42ba696a3d76f709ff894181d4e9bb7d
Reviewed-by: hjk <hjk@qt.io>
qds/v2.3-beta1
2021-11-18 15:49:22 +00:00
Leena Miettinen
75f9c91c76 Doc: Describe enabling the Qt Quick Designer plugin
The plugin has been disabled by default in 6.0, and
some users have already asked us about it.

Task-number: QTCREATORBUG-26278
Change-Id: I6085b17b0e78592eff285d2d0fc55107593202da
Reviewed-by: Eike Ziller <eike.ziller@qt.io>
2021-11-18 14:40:04 +00:00
Leena Miettinen
67674bca36 Doc: Add alternatives for installing Conan
The installation has been temporarily removed from Qt Installer.

Task-number: QTCREATORBUG-26278
Change-Id: I8de557045857ddaa73e984cce37f31f3d93690bd
Reviewed-by: Cristian Adam <cristian.adam@qt.io>
Reviewed-by: hjk <hjk@qt.io>
2021-11-18 14:39:52 +00:00
Samuel Ghinet
c2a4bebad4 Fix: QDS New Project dialog shows incorrect items in the screen size combobox
The index in the backend wizard's combobox was not loaded when
initializing the QML combobox.

Task-number: QDS-5523
Change-Id: I48583ff1ca85f840e9b7314a4e0ed734364c326a
Reviewed-by: Miikka Heikkinen <miikka.heikkinen@qt.io>
Reviewed-by: Mahmoud Badri <mahmoud.badri@qt.io>
2021-11-18 11:38:22 +00:00
Christian Stenger
8368b4ed64 QmlDesigner: Fix build on Windows
Use Qt styled enum values to avoid clashing global defines.
Amends 06a6549075.

Change-Id: I85d3ec4192c1c55f231b6e2e81ec114480c03a5c
Reviewed-by: Thomas Hartmann <thomas.hartmann@qt.io>
2021-11-18 10:18:09 +00:00
Vikas Pachdha
a86e693b4a Fix index out of range crash
Change-Id: Ifa943d3d240c7ffab0bd21f50ff66d796c78401e
Reviewed-by: Tim Jenssen <tim.jenssen@qt.io>
Reviewed-by: Marco Bubke <marco.bubke@qt.io>
2021-11-18 10:04:45 +00:00
Samuel Ghinet
00d186ce10 QDS NewProject dialog: use friendly error message when regex does not match
Instead of telling the user that the project name does not match a
complex regular expression, we can tell him in English words what the
rules are.

Also, updates the icon of the status message so that, when the status is
multiline, the icon appears at the top, rather than vertical center, on
the left side of the text.

Change-Id: I848b3858f5f92a09588b9646c56cbf743b06ea09
Reviewed-by: Qt CI Bot <qt_ci_bot@qt-project.org>
Reviewed-by: Eike Ziller <eike.ziller@qt.io>
2021-11-18 09:50:41 +00:00
Tapani Mattila
06a6549075 CMake generator: Add sanity checks
Task-number: QDS-5410
Change-Id: I8f3cd130d7f5bfac3656e8d006661a81a5412abd
Reviewed-by: Thomas Hartmann <thomas.hartmann@qt.io>
Reviewed-by: Leena Miettinen <riitta-leena.miettinen@qt.io>
2021-11-18 09:27:23 +00:00
Anton Alimoff
d06183d9cc Add debug helper for std::variant
Change-Id: Ifb2f47203fb5c101be5b2180693e39ba07b90c2e
Reviewed-by: hjk <hjk@qt.io>
2021-11-18 09:03:31 +00:00
David Schulz
e68e2a3159 QMake: fix gui thread lock
Do not look up windows network paths in profile editor when looking for
links under the cursor. The QFileInfo::exists check can take up to a
minute here if this network path does not exists.

Fixes: QTCREATORBUG-26579
Change-Id: I2648bc398e25bcc660f1161a187c4d92c3def28e
Reviewed-by: Qt CI Bot <qt_ci_bot@qt-project.org>
Reviewed-by: Christian Stenger <christian.stenger@qt.io>
Reviewed-by: Eike Ziller <eike.ziller@qt.io>
2021-11-18 08:11:51 +00:00
Eike Ziller
db1d3f3c94 Fix locator popup on Windows
When the locator popup gets focus on Windows, we need to handle the
escape key explicitly and also need to make sure that it isn't
considered as a "base window" when requesting locator again.

On other platforms the locator popup never gets focus, so the issue
doesn't appear.

Fixes: QTCREATORBUG-22119
Change-Id: I1e1a74332c174bc20f961ebe0709c591f82f2829
Reviewed-by: David Schulz <david.schulz@qt.io>
Reviewed-by: André Hartmann <aha_1980@gmx.de>
2021-11-18 07:38:49 +00:00
Christian Stenger
93d67dd6ac Utils: Fix missing include
Amends 5967dd52ed.

Change-Id: I0fe1f8f9967eac679c32c9e6288249f8a0c575ae
Reviewed-by: Christian Stenger <christian.stenger@qt.io>
2021-11-18 05:45:13 +00:00
Andre Hartmann
1b57bee32b Debugger: Remove ancient enum without usage
Change-Id: Ifd303bc822a850d6b28d8fb31475af54a25601a4
Reviewed-by: hjk <hjk@qt.io>
2021-11-17 18:10:48 +00:00
Christian Kandeler
037d2b3889 ClangCodeModel: Fix clangd highlighting of string literals
... passed to macros defined in a different file.
This amends e77e57420a. Contrary to our expectation, it is possible that
AST nodes that are marked as belonging (only) to a header file can
contain child nodes that belong to the main file.

Fixes: QTCREATORBUG-26553
Change-Id: I4d1d877d8e1e2dcf7d81b63aa98e1149b5514e3f
Reviewed-by: David Schulz <david.schulz@qt.io>
2021-11-17 14:46:37 +00:00
Jarek Kobus
d4ddd6754d Remove unused SshRemoteProcessRunner::writeDataToProcess()
Change-Id: Ib07c7c9cd19b498f84382d2c9c11b927533e4d85
Reviewed-by: Christian Kandeler <christian.kandeler@qt.io>
2021-11-17 14:01:52 +00:00
Alessandro Portale
9cc2b7aaf3 qmake/qbs/CMake builds: Remove "recommended" dependency on Designer
Recommendation of Designer is the artifact from an earlier solution
for adding code of .ui files to the code model. The refactoring of
extra compilers made that superfluous, this change removes the
left-over traces.

The CMake build of Qt Creator breaks because of the recommendation
if the qttols module is not installed.

Amends: 78d3191363

Change-Id: I64827492d79a9238dc8512047abd581f9da3189e
Reviewed-by: Eike Ziller <eike.ziller@qt.io>
2021-11-17 13:46:07 +00:00
Christian Kandeler
03e6351c0e ClangCodeModel: Provide clangd memory usage in language inspector
Change-Id: I8a87cb5f267571584b2eecac06be65b841592c7a
Reviewed-by: David Schulz <david.schulz@qt.io>
2021-11-17 13:43:59 +00:00
Christian Kandeler
78562d4925 LanguageClient: Allow clients to provide extra tabs for inspector
Change-Id: I530eca50393289dbf85fb0088d2a62c2729d28b2
Reviewed-by: David Schulz <david.schulz@qt.io>
2021-11-17 13:43:29 +00:00
Marco Bubke
9d24d886e2 QmlDesigner: Add imports for qml document parser
Task-number: QDS-5174
Change-Id: I78b7b31108b498035eccb8385ffab621c727cd89
Reviewed-by: Qt CI Bot <qt_ci_bot@qt-project.org>
Reviewed-by: Thomas Hartmann <thomas.hartmann@qt.io>
2021-11-17 13:41:28 +00:00
Thomas Hartmann
607f70f0f9 QmlProject: Use QtcProcess instead of QProcess
Change-Id: Ie80ed4bd3d831718e7f246d6b8ab9df9db8c67d1
Reviewed-by: hjk <hjk@qt.io>
Reviewed-by: Qt CI Bot <qt_ci_bot@qt-project.org>
2021-11-17 13:15:01 +00:00
Thomas Hartmann
dad7deccc4 QmlProject: Use fromUserInput for settings
Change-Id: Ib591c703e8badc2f12337680a788c051e1a7d974
Reviewed-by: Alessandro Portale <alessandro.portale@qt.io>
Reviewed-by: Qt CI Bot <qt_ci_bot@qt-project.org>
2021-11-17 11:44:10 +00:00
Cristian Adam
be9f7313b6 CMakePM: Remove UNINITIALIZED SOFT_ASSERT
Fixes: QTCREATORBUG-26582
Change-Id: I2a453a3044f2cb6eed0fd3f27ceae97fe347fdba
Reviewed-by: Eike Ziller <eike.ziller@qt.io>
2021-11-17 11:18:08 +00:00
Jarek Kobus
5967dd52ed CommandLine: implement debug streaming operator
Change-Id: I09a47d70d5bea315efa1af505f7afc69c8075310
Reviewed-by: hjk <hjk@qt.io>
2021-11-17 10:48:45 +00:00
hjk
898210f0a1 Debugger: Fix passing tooltips from to toolbuttons
Visible in the O and <> buttons of the Callgrind toolbar.

Change-Id: I1016f853335bfc243f7e934e7a0cd430922c8af6
Reviewed-by: Christian Stenger <christian.stenger@qt.io>
2021-11-17 08:54:42 +00:00
Antti Määttä
96db947c81 Fix particles play button state when scene changes
Add play button state to the scene state.

Task-number: QDS-5499
Change-Id: Id3035de439aa80fd782348cf89a1d8456a7dd006
Reviewed-by: Miikka Heikkinen <miikka.heikkinen@qt.io>
Reviewed-by: Qt CI Bot <qt_ci_bot@qt-project.org>
2021-11-17 07:13:25 +00:00
Leena Miettinen
e6e69ad07b Doc: Update info about qmake build settings
Task-number: QTCREATORBUG-26278
Change-Id: Ifa7cd0349ca31c97f8f8db28461db6a4200180fe
Reviewed-by: Christian Kandeler <christian.kandeler@qt.io>
2021-11-16 17:04:43 +00:00
David Schulz
899a4d1f10 LanguageClient: Reopen document after restarting crashed server
Change-Id: I7c8518a631a45ea784ff849b703ae1e9abfba396
Reviewed-by: Christian Kandeler <christian.kandeler@qt.io>
2021-11-16 16:16:14 +00:00
Alessandro Portale
dd1882b817 WebAssembly: fix the running of targets with name != project.name
The new QtQuick application wizard for Qt 6.2-based applications now
uses different names for the project and for the main target.

The WebAssembly plugin cannot construct the html file name for launching
like <projectname>.html, anymore. It instead would need to use
<targetname>.html for that.

The author of this patch did not manage to programmatically retrieve the
target name or buildkey. So, as a hack, we simply chose the first html
file that we find in the build directory.

Fixes: QTCREATORBUG-26562
Change-Id: I7e929fe265a15501c7275e2c76b7f5fa4ed1e6b5
Reviewed-by: hjk <hjk@qt.io>
Reviewed-by: Alessandro Portale <alessandro.portale@qt.io>
2021-11-16 13:39:21 +00:00
Eike Ziller
531f3ada2c CMake: Add xcodebuild parser for "Darwin" targets
Similar to the qmake make build step, so build issues are parsed for iOS
builds.

Task-number: QTCREATORBUG-26541
Change-Id: Ie71a3087feab2720f6d8b4974d221a70c3fe76fa
Reviewed-by: Christian Kandeler <christian.kandeler@qt.io>
2021-11-16 13:02:33 +00:00
Eike Ziller
5a07396205 XcodebuildParser: Fix parsing for newer Xcode versions
The output of xcodebuild changed, and no longer contains
"BUILD (AGGREGATE ...)". Instead it prints various "note:"s.
Use "note: Build preparation complete" to trigger parsing the following
output on stdout for error messages.

Task-number: QTCREATORBUG-26541
Change-Id: I9dabcc30389352aa5f78dae31104a8c9cf56eb19
Reviewed-by: Christian Kandeler <christian.kandeler@qt.io>
2021-11-16 13:02:20 +00:00