Commit Graph

62421 Commits

Author SHA1 Message Date
Christian Kandeler
137d3367cf CppEditor: Do not crash on doxygen comment creation
... for templates that were not parsed entirely successfully.
Amends a437539096.

Fixes: QTCREATORBUG-27207
Change-Id: I4d7935b30cac9ce14f442977d07417a343ecae11
Reviewed-by: Christian Stenger <christian.stenger@qt.io>
2022-03-22 11:01:18 +00:00
Christian Stenger
59cb70e61f Python: Fix compile on Linux
Change-Id: I193fb8e5c8e6815fbd1b358c1dda1918ff2be6f0
Reviewed-by: Cristian Adam <cristian.adam@qt.io>
Reviewed-by: <github-actions-qt-creator@cristianadam.eu>
2022-03-21 15:47:17 +00:00
Thomas Hartmann
638b93591b QmlDesigner: Remove unrequired event filter
This event filter was introduced because other wise
actions in QML like CTRL+C or CTRL+UP were intercepted
by QWidget::QAction. With Qt 6.2.x this workaround is not
required anymore.

Change-Id: I43a84ae13cca58840afacabe85c36c5f2235cf39
Reviewed-by: Mahmoud Badri <mahmoud.badri@qt.io>
Reviewed-by: <github-actions-qt-creator@cristianadam.eu>
Reviewed-by: Tim Jenssen <tim.jenssen@qt.io>
Reviewed-by: Qt CI Bot <qt_ci_bot@qt-project.org>
Reviewed-by: Thomas Hartmann <thomas.hartmann@qt.io>
2022-03-21 13:58:58 +00:00
Thomas Hartmann
675875c3b4 QmlDesigner: Block more imports
Change-Id: I839fb320df61bad0a39ff98e1274201f5a99a8ed
Reviewed-by: Thomas Hartmann <thomas.hartmann@qt.io>
2022-03-21 13:58:37 +00:00
Samuel Ghinet
fb1c6fbfe2 Qds: New Project dialog in new Welcome screen should close on Esc
Task-number: QDS-5697
Change-Id: I26f2e65bbb98b15b3867e0774a1bf8f78409b430
Reviewed-by: Miikka Heikkinen <miikka.heikkinen@qt.io>
Reviewed-by: Mahmoud Badri <mahmoud.badri@qt.io>
2022-03-21 13:34:02 +00:00
Artem Sokolovskii
b06db48869 Wizard: Improve QtQuick2 extension plugin
- Added options for Kit version
- Added CMake support for Qt6.2
- Added options for creating example project,
which uses the plugin

Task-number: QTCREATORBUG-26982
Change-Id: I808c01bce6e4015a679f2fd69767c13179a25ee5
Reviewed-by: Eike Ziller <eike.ziller@qt.io>
2022-03-21 12:47:11 +00:00
Cristian Adam
a1929bd9d7 ClangCodeModel: Add some more timing debug information
By setting QT_LOGGING_RULES=qtc.clangcodemodel.clangd.timing=true I can get
values like:

qtc.clangcodemodel.clangd.timing: highlighting: Start to end: 2953 ms
qtc.clangcodemodel.clangd.timing: ClangdCompletionAssistProcessor took: 7343 ms

The first tells you how long Creator took to turn clangd's semantic tokens into
full highlighting info, and the second how long it took for Ctrl+Space.

Change-Id: I99bd04c2889bb7da98c04537eab06d6ed6117167
Reviewed-by: Christian Kandeler <christian.kandeler@qt.io>
2022-03-21 12:40:33 +00:00
David Schulz
6f520f8783 Python: extract pip installation task
Make it reusable for pyside and other packages.

Change-Id: If97e65a506d36916aaa61f48b9a2f71c458d4fe9
Reviewed-by: Christian Stenger <christian.stenger@qt.io>
2022-03-21 11:38:06 +00:00
Jarek Kobus
c94564d910 LinuxDevice: Get rid of a marker for outputForRunInShell()
Don't rely on a synthetic marker when running a shell
command and expecting any output. The marker might always
be a part of the output data from the running command.
That's unreliable.

A solution is to do a similar thing that we are doing
inside runInShell(). We ignore the error channel there,
so it means that when calling outputForRunInShell() we
have two channels for our purposes. So, the output from
the command we pass through, and its error channel we
redirect to /dev/null. Later, we run "echo $?", which
prints the return code from the last command and we
redirect it to standard error channel. Inside
outputForRunInShell() we read the error channel as long
as we detect something there. We assert if it's being
convertible to int and we also assert that the command
itself succeeded. Afterwards we break the endless loop
and read the output channel for the first time - it
should contain all the output gathered from the running
command.

Change-Id: Ia0ad73623f813ef593c11dff9bdba4df9e524315
Reviewed-by: hjk <hjk@qt.io>
2022-03-21 11:32:31 +00:00
Christian Stenger
162fc2708c McuSupport: Fix qbs build and build with Qt5
Amends 8c04c2ea55.

Change-Id: I27f2c900cddfd79b52d4989fa321e6f86177c89e
Reviewed-by: Piotr Mućko <piotr.mucko@qt.io>
Reviewed-by: hjk <hjk@qt.io>
2022-03-21 10:13:46 +00:00
Thomas Hartmann
648e659356 QmlDesigner: Simplify naming of views
* Curve Editor -> Curves
* 3D Editor -> 3D
* Form Editor -> 2D
* Text Editor -> Text
* Transition Editor -> Transitions

Most view titles are now a single word and all superfluous "Editor"
as part of the title have been removed.
"File System" and "Open Documents" stay as they are.

Task-number: QDS-6325
Change-Id: I8fb6477f9e07c324f76a49796f550a8b8799fedd
Reviewed-by: <github-actions-qt-creator@cristianadam.eu>
Reviewed-by: Eike Ziller <eike.ziller@qt.io>
Reviewed-by: Leena Miettinen <riitta-leena.miettinen@qt.io>
Reviewed-by: Thomas Hartmann <thomas.hartmann@qt.io>
2022-03-21 10:04:08 +00:00
Christian Stenger
5474495acd Utils: Fix build with Qt5
Amends 2b286c755b.

Change-Id: I7f28cb4ac0d5b515df1e46c1f514a0275472d438
Reviewed-by: David Schulz <david.schulz@qt.io>
2022-03-21 10:02:55 +00:00
Fawzi Mohamed
6b270b8dc9 qmljs: correctly handle js string templates
In most cases we do want to visit the expressions in a function
template. Changing its accept0 would force those not wanting to visit
it to iterate on the templates (currently a linked list), so we add a
visit method explicitly visiting the expression in all the needed
places.

Fixes: QTCREATORBUG-21869
Change-Id: I47733544bfd32eec357810b97242608b8f7de572
Reviewed-by: Qt CI Bot <qt_ci_bot@qt-project.org>
Reviewed-by: Fabian Kosmale <fabian.kosmale@qt.io>
Reviewed-by: Henning Gründl <henning.gruendl@qt.io>
2022-03-21 09:32:29 +00:00
David Schulz
9d1fe1df14 Python: ensure opened file is inside a workspace
The Python language server seems to dislike files that are not part of a
workspace resulting in very long lookup times for specific symbols.

Fixes: QTCREATORBUG-26230
Fixes: QTCREATORBUG-24704
Fixes: QTCREATORBUG-24140
Change-Id: Iceb7a2b3d57aea6554225a74587f619e530e10c9
Reviewed-by: Christian Stenger <christian.stenger@qt.io>
2022-03-21 09:08:19 +00:00
David Schulz
d824c276df LanguageClient: constify createClient
Change-Id: I4b9aba1388a31b6d1531cb4a6346a394c5aab150
Reviewed-by: Christian Stenger <christian.stenger@qt.io>
2022-03-21 08:48:29 +00:00
David Schulz
1a88f26d8b LanguageClient: rename clientForSetting -> clientsForSetting
Change-Id: Idf4055769fba4c2551ac968c0232ddb3916acb6c
Reviewed-by: Christian Stenger <christian.stenger@qt.io>
2022-03-21 08:48:24 +00:00
David Schulz
5924268568 LanguageClient: unify client container
Change-Id: I17b5e7ca4999cd5a9ca8e79577f29854082b6c6b
Reviewed-by: Christian Stenger <christian.stenger@qt.io>
2022-03-21 08:48:17 +00:00
David Schulz
2b286c755b Utils: allow passing data via info bar combo box
Change-Id: I47daa83a533a76eb4ad0ab3f5cf8c04faf389b98
Reviewed-by: Eike Ziller <eike.ziller@qt.io>
2022-03-21 07:57:10 +00:00
hjk
1960799be2 Utils: Add bits of process output when debugging QtcProcess
Change-Id: I03b7825e29be5dd5a78768c5831756703ce7fdf1
Reviewed-by: Jarek Kobus <jaroslaw.kobus@qt.io>
2022-03-18 15:29:49 +00:00
Jarek Kobus
dabe2e1493 ProcessLauncher: Don't emit error twice on process crash
Behave the same as QProcess in this circumstances.

Change-Id: If8175ccb7102d6a561584ee73c2e5c5844f2770d
Reviewed-by: hjk <hjk@qt.io>
Reviewed-by: Qt CI Bot <qt_ci_bot@qt-project.org>
2022-03-18 15:19:35 +00:00
Eike Ziller
b6f679d777 Merge remote-tracking branch 'origin/7.0'
Conflicts:
	src/plugins/webassembly/webassemblytoolchain.cpp

Change-Id: Ia75c783e3ecab1f97de2b5c73a0979c49da82009
2022-03-18 16:07:51 +01:00
Christian Stenger
7012aa621c RemoteLinux: Allow open remote shell from Windows as well
Was originally restricted to UNIX hosts, but works for Windows
as well.

Change-Id: I233ec73760134256723a927de5e9e6cc9aefa8ac
Reviewed-by: Jarek Kobus <jaroslaw.kobus@qt.io>
Reviewed-by: hjk <hjk@qt.io>
2022-03-18 14:39:30 +00:00
Piotr Mućko
88342a6bba McuSupport: chop RTOS environment variable suffix
Change-Id: Iba35246af403a00bd0f750e3769e22a5010825eb
Reviewed-by: Alessandro Portale <alessandro.portale@qt.io>
Reviewed-by: <github-actions-qt-creator@cristianadam.eu>
2022-03-18 11:35:46 +00:00
Thomas Hartmann
1651efaee7 QmlDesigner: Hide puppet building unless showDebugSettings is enabled
Change-Id: I9c437bcbf4e4a255fd5ed81852f53d0a46dbcf1f
Reviewed-by: Qt CI Bot <qt_ci_bot@qt-project.org>
Reviewed-by: <github-actions-qt-creator@cristianadam.eu>
Reviewed-by: Miikka Heikkinen <miikka.heikkinen@qt.io>
Reviewed-by: Tim Jenssen <tim.jenssen@qt.io>
2022-03-18 10:36:30 +00:00
Thomas Hartmann
44f7bf09b5 QmlDesigner: Clear errors when starting the puppet
Change-Id: I25d163ae48d094d6e7ba5059f7832d1b48ffec65
Reviewed-by: Qt CI Bot <qt_ci_bot@qt-project.org>
Reviewed-by: Tim Jenssen <tim.jenssen@qt.io>
2022-03-18 10:35:28 +00:00
Thomas Hartmann
8867fd2a9b QmlDesigner: Quailfy library and directory imports
This unifies the behavior with the TextToModelMerger for consistency.
When parsing QML documents the types are already qualified in the same way.
The plan is to use NodeMetaInfo also in the TextToModelMerger in the future.

Change-Id: I046f39d87f1be0506740e3a4afdfbff9b13eca4b
Reviewed-by: Tim Jenssen <tim.jenssen@qt.io>
Reviewed-by: <github-actions-qt-creator@cristianadam.eu>
Reviewed-by: Thomas Hartmann <thomas.hartmann@qt.io>
2022-03-18 10:35:00 +00:00
Eike Ziller
b303afa4ec Fix black text in Search Results toolbar
In case the LicenseChecker plugin is enabled. That runs some event loop
during initialize() and it looks like that somehow leads to a wrong
palette for these two, at that time parent-less widgets.

Creating the widgets at a later time, just before they are added to the
toolbar, helps.

Fixes: QTCREATORBUG-27200
Change-Id: I00dc9c8981a0572d7b9f726ec870eb2afb188cc1
Reviewed-by: Alessandro Portale <alessandro.portale@qt.io>
Reviewed-by: <github-actions-qt-creator@cristianadam.eu>
2022-03-18 10:26:30 +00:00
Jarek Kobus
7c39617324 Make the setup info visually more noticeable
By adding two leading newlines we separate it nicely
from the other part of the test log.

Amends 66c5b1e11e

Change-Id: Ic260cdc4cc2421ddb04bc5027082521800b268e8
Reviewed-by: Christian Stenger <christian.stenger@qt.io>
2022-03-18 08:55:42 +00:00
Piotr Mućko
8c04c2ea55 McuSupport: Introduce new implementation stub
New/legacy implementation will be chosen based on contents
of input json file.

Change-Id: I989fa667c43123f831cc77320684413cab7652df
Reviewed-by: hjk <hjk@qt.io>
Reviewed-by: Alessandro Portale <alessandro.portale@qt.io>
2022-03-18 08:38:43 +00:00
Jarek Kobus
481df466e2 Fix FileSystemAccessTest::testFileActions() flakiness
Always add " > /dev/null 2>&1" infix so that the
output of e.g. "rm" command, when failed, is redirected
to dev/null.

Enclose the input data in runInShell() with quotation
marks and escape all the characters in passed data
accordingly. Pass the "-e" option to echo in order to
turn on the escaping mode.

Add a new test for testCreateRemoteFile().

Change-Id: I7db07b57035242279cac7dd77a80ac6dd05bfb1f
Reviewed-by: Christian Stenger <christian.stenger@qt.io>
Reviewed-by: hjk <hjk@qt.io>
2022-03-18 08:36:59 +00:00
Miikka Heikkinen
de8a67a412 QmlDesigner: Add drag support to empty asset library placeholder item
Fixes: QDS-6430
Change-Id: I561f4ed51ccb1e47472adb9baa6e5594eb93eafb
Reviewed-by: Mahmoud Badri <mahmoud.badri@qt.io>
2022-03-18 08:24:04 +00:00
hjk
a23c4ce014 Docker: Fix searching compilers in custom directories
Previously, detection (mostly) only used path.

Change-Id: If382205c2ff39cabfe21953e877e152dc952a84c
Reviewed-by: <github-actions-qt-creator@cristianadam.eu>
Reviewed-by: Eike Ziller <eike.ziller@qt.io>
2022-03-18 08:21:51 +00:00
Miikka Heikkinen
c865481068 QmlDesigner: Add particle attractor visualization to 3D editor
Particle attractors are visualized similarly to particle emitters,
except that they are shown as blue instead of yellow when parent system
is active.

Fixes: QDS-6426
Change-Id: I085727dac7f3b4fa968e313b78db3f476941a7da
Reviewed-by: Mahmoud Badri <mahmoud.badri@qt.io>
Reviewed-by: Thomas Hartmann <thomas.hartmann@qt.io>
2022-03-18 08:17:37 +00:00
Miikka Heikkinen
d6718fa838 QmlDesigner: Remove unnecessary import dialog for complex assets
Also remove target folder highlights for dragged complex assets.

Fixes: QDS-6433
Change-Id: I499da9444e9f153672fb38b66a6841fb6035cbbd
Reviewed-by: Mahmoud Badri <mahmoud.badri@qt.io>
Reviewed-by: <github-actions-qt-creator@cristianadam.eu>
2022-03-18 08:16:24 +00:00
Jarek Kobus
2d33425cd5 Revert "Android: Make the device watcher process terminate on shutdown"
This reverts commit e45e16d904.

Reason for revert: This one should look different in master

Change-Id: I4fbf3a9d046e5fe5a6a45d5ba93b685f5967498c
Reviewed-by: Eike Ziller <eike.ziller@qt.io>
2022-03-18 08:13:25 +00:00
Eike Ziller
e914f42458 Merge remote-tracking branch 'origin/7.0'
Change-Id: I9c4ef46084fd392663c7c21c4ecdbc578ea28577
2022-03-18 08:42:02 +01:00
Assam Boudjelthia
5454dda249 Android: keep up with sdk tools changing folder structure
The cmdline-tools package used to have the folder structure "tools/bin".
However, latest packages are using the structure "cmdline-tools/bin".
And since subsequent updates we are installing "cmdline-tools;latest"
package, it will be put in "cmdline-tools/latest" folder, so we cannot
extract to that path, or otherwise sdkmanager will complain that the
path is in use.

Currently we extract it and put it under the SDK path, then use it to
install the essential packages, then it won't be used at all. This patch
changes that by extracting the downloaded package into a temporary
location, and use sdkmanager from there directly.

Also, this patch updates the links to the cmdline-tools along the way.

Fixes: QTCREATORBUG-27174
Change-Id: I1f5d0e38f5a026631e8a3852821d85a69d543c32
Reviewed-by: Alessandro Portale <alessandro.portale@qt.io>
2022-03-17 20:45:07 +00:00
Alessandro Portale
e45e16d904 Android: Make the device watcher process terminate on shutdown
Terminate on IPlugin::aboutToShutdown instead of
QCoreApplication::aboutToQuit. If needed synchronously.

Added "ADB device watcher started" logging.

Fixes: QTCREATORBUG-27118
Change-Id: I483659b018c74d179b64a5a4f17cc2c27c9598a8
Reviewed-by: <github-actions-qt-creator@cristianadam.eu>
Reviewed-by: Jarek Kobus <jaroslaw.kobus@qt.io>
2022-03-17 15:12:55 +00:00
hjk
188544052c Mimetypes: Make compile with namespaced Qt
Change-Id: I022b4cedee85b60a444241dc3b373aaa2fb924af
Reviewed-by: Eike Ziller <eike.ziller@qt.io>
2022-03-17 15:09:48 +00:00
Miikka Heikkinen
68d30df703 QmlDesigner: Add some basic on-drag property bindings for particles
Dragging Particle3D based items from component library will highlight
particle emitters for automatic property binding. Similarly,
dragging particle shapes will highlight emitters and attractors for
automatic binding.

Change-Id: I0e5a8d066beaa6d84e8665e7ae985287de32ceea
Reviewed-by: Mahmoud Badri <mahmoud.badri@qt.io>
2022-03-17 14:50:57 +00:00
David Schulz
519804a0d2 QmlJSEditor: prevent possible crash on font settings change
Fixes: QTCREATORBUG-27116
Change-Id: Iac38bd4ef20e739da4c4b8b1c072fd2cd648a66a
Reviewed-by: Eike Ziller <eike.ziller@qt.io>
2022-03-17 13:55:10 +00:00
David Schulz
2d3d66c115 Editor: limit painter path calculation for overlay selections
Only calculate a painter path if it is inside the paint event rect.

Task-number: QTCREATORBUG-26812
Change-Id: I9e7026b70251347fe8c38fc5b9278de943786956
Reviewed-by: Christian Stenger <christian.stenger@qt.io>
2022-03-17 11:03:00 +00:00
Assam Boudjelthia
03abdcda9f Android: don't fail if device abi list is empty
If for some reason the device abi list is empty, don't stop the
deployment, let it continue and potentially fail later.

Amends c1512dce87.

Task-number: QTCREATORBUG-27103
Change-Id: I484fbd1ddb365d5e96686eebc3ba76032684e506
Reviewed-by: Alessandro Portale <alessandro.portale@qt.io>
2022-03-17 09:21:10 +00:00
Jarek Kobus
b822a9462e Be more verbose when destroying process launcher
Process launcher: Reap all running processes in
LauncherSocketHandler destructor. Do it only once.
Warn about running processes.

From Creator side: Don't disconnect launcher's process
until it goes into the Creator's reaper.

Change-Id: I8af8e0247290cc07846fbf88b1521307293eed39
Reviewed-by: <github-actions-qt-creator@cristianadam.eu>
Reviewed-by: Eike Ziller <eike.ziller@qt.io>
2022-03-17 08:49:36 +00:00
Eike Ziller
be0c2600f8 DirectoryFilter: Fix missing file entries before first refresh
After re-starting Qt Creator, the filter was reading the file path cache
from the settings, but it didn't set the corresponding file iterator
that is used when actually invoking Locator.
That lead to the files only being available after the first (automatic)
refresh after a few minutes of Qt Creator running (depending on
settings).

Fixes: QTCREATORBUG-26381
Change-Id: I819961ad3b146d339e760f6648b8b01f437040f7
Reviewed-by: <github-actions-qt-creator@cristianadam.eu>
Reviewed-by: David Schulz <david.schulz@qt.io>
2022-03-17 08:47:15 +00:00
Eike Ziller
9fd2a059f6 Merge remote-tracking branch 'origin/7.0'
Conflicts:
	src/plugins/android/androiddevice.cpp
	src/plugins/docker/dockerdevice.cpp

Change-Id: Id16ba0d9993c9f608242622aceae0a2a6691e05e
2022-03-17 08:48:28 +01:00
David Schulz
976653cd93 QmlProjectManager: fix crash
Fixes: QTCREATORBUG-27190
Change-Id: I188930f6e5cca5d32a91e9c6ce8ca6a798273bf2
Reviewed-by: Eike Ziller <eike.ziller@qt.io>
2022-03-17 07:28:49 +00:00
Alessandro Portale
c170e4fa57 Android: Use const & in a range-based for loop
Change-Id: Ib769d5133383ed30717e479107b6a74c53b72a58
Reviewed-by: Assam Boudjelthia <assam.boudjelthia@qt.io>
Reviewed-by: <github-actions-qt-creator@cristianadam.eu>
2022-03-16 18:33:25 +00:00
Christian Stenger
66c5b1e11e RemoteLinux: Avoid unexpected password dialog in tests
Make the test depend on environment variables and give some
hint how to run the test correctly.
Beside this make the test work on Windows and share the setup
with ssh unit test.

Change-Id: I6bbf1ec863449512646ca2c51d13fec537beedbc
Reviewed-by: hjk <hjk@qt.io>
2022-03-16 16:44:27 +00:00
Thomas Hartmann
e9074792d2 QmlDesigner: Add mutex
Creating models can trigger this initialization potentially from
multiple threads.

Task-number: QDS-6429
Change-Id: I1e9f715c150e37e6381c3f4e94fe6de1aaec7556
Reviewed-by: Tim Jenssen <tim.jenssen@qt.io>
2022-03-16 13:55:17 +00:00