Commit Graph

72643 Commits

Author SHA1 Message Date
Miikka Heikkinen
a3596e6527 QmlDesigner: Fix 3D import crash and import statement insertion
Sometimes importing 3D models would crash because null process output
callback, so just make an empty dummy callback.

Import statement insertion to the qml document for the asset also
failed, because new import creation is no longer automatically detected
by qmljs, probably due to some optimization.
Fixed by explicitly scanning the import target directory for new
content. This also allows us to know when scan is completed,
so we can reduce mandatory waiting time.
Also added check to see when the new imports are available in the model
to reduce mandatory waiting for that step, too.

Change-Id: I8d8757efea5481e0d3f15add2b93e6f0f5b155cb
Reviewed-by: Thomas Hartmann <thomas.hartmann@qt.io>
Reviewed-by: <github-actions-qt-creator@cristianadam.eu>
Reviewed-by: Mahmoud Badri <mahmoud.badri@qt.io>
Reviewed-by: Samuel Ghinet <samuel.ghinet@qt.io>
2022-02-10 08:49:16 +00:00
Alessandro Portale
d84c5da4e9 Core: Limit rendering of tag rows in ListItemDelegate
Unlimited rows make the tags flow over the lower edge. Two rows should
be enough for proper tagging.

All tags are still used for searching, even if some are omitted in the
rendering.

Change-Id: Ia731031f362165c75ef5fa34a80200c85d2f93aa
Reviewed-by: Christian Stenger <christian.stenger@qt.io>
2022-02-10 08:41:50 +00:00
Christian Kandeler
64fee150ef ClangCodeModel: Consider whitespace in preprocessor directives
... when highlighting with clangd. That is, treat "# ifdef" the same as
"#ifdef".

Fixes: QTCREATORBUG-27021
Change-Id: Ic57ed42e09f95611dd85ca3c112e23b52a3f91fc
Reviewed-by: <github-actions-qt-creator@cristianadam.eu>
Reviewed-by: Qt CI Bot <qt_ci_bot@qt-project.org>
Reviewed-by: David Schulz <david.schulz@qt.io>
2022-02-10 08:09:49 +00:00
Christian Kandeler
105e591060 ProjectExplorer: Delay project parsing until it's part of the session
E.g. code model logic relies on the session manager knowing about the
project currently being parsed.

Fixes: QTCREATORBUG-26987
Change-Id: I4d9a1c21ab8474f7ac21edaeebe667fc4f3a6c4e
Reviewed-by: hjk <hjk@qt.io>
Reviewed-by: <github-actions-qt-creator@cristianadam.eu>
2022-02-10 08:06:09 +00:00
David Schulz
a1cc9b4e5c Editor: fix internal cursor position after backspace
Fixes: QTCREATORBUG-27035
Change-Id: Id39d8832c5e3327cd42ce10447da98ca78fe476d
Reviewed-by: Christian Stenger <christian.stenger@qt.io>
2022-02-10 08:00:42 +00:00
David Schulz
d59047a4c2 LanguageClient: do not disconnect client from manager
The previously connected signals should be safe to stay connected while
the server restarts. This fixes restarting crashed clients more than once.

Change-Id: I161d41418e10b7e3bd3e17141720f4a5f399841c
Reviewed-by: Christian Stenger <christian.stenger@qt.io>
2022-02-10 08:00:26 +00:00
hjk
385367cfd7 QmlJS: Fix compiulation with namespaces
Amends 125d7c0cce.

Change-Id: I75f2c562aca2e3a00bb0284f39c3951664e2c956
Reviewed-by: Christian Stenger <christian.stenger@qt.io>
2022-02-10 07:10:32 +00:00
Alessandro Portale
d61069b90f LanguageClient: Prevent extra frame border around outline view
For consistency with other views.

Change-Id: I3d495a3bd037fe917c99bf5e9916651ca48c03fd
Reviewed-by: <github-actions-qt-creator@cristianadam.eu>
Reviewed-by: David Schulz <david.schulz@qt.io>
2022-02-10 07:06:15 +00:00
Alessandro Portale
08c25aef25 TextEditor: Fix High-DPI+Qt6 drawing of the refactor marker icon
Subtle devicePixelRatio-related changes in Qt require to restrict one
division by a Qt 5 specific #ifdef.

Fixes: QTCREATORBUG-26905
Change-Id: Ic5eecef5c7cb355abc8a5391708c5cd1050af282
Reviewed-by: <github-actions-qt-creator@cristianadam.eu>
Reviewed-by: David Schulz <david.schulz@qt.io>
2022-02-10 06:38:46 +00:00
Christian Stenger
bafea94402 Clangd: Fix possible crash in inspector
When fast switching between clients listed inside the inspector
the message response for memory usage may arrive after the model
has been destroyed.

Change-Id: I0503bb334cf21b0919316f0ac2e731472f3433bd
Reviewed-by: David Schulz <david.schulz@qt.io>
2022-02-10 05:52:51 +00:00
Christian Stenger
d408726023 Tests: Include flamegraphview test
Change-Id: Id30d171d43c7b5adf5bb7b45fda99364662c93be
Reviewed-by: Alessandro Portale <alessandro.portale@qt.io>
2022-02-10 05:52:07 +00:00
Knud Dollereder
b36bba03ba QmlDesigner: Improve performance of ConnectionManager
This is a pertial cherry-pick from master.
See commit: b9d59edeb1
I removed the changes to the process deletion.
This requires an extra cleanup patch in master.

Change-Id: If845ea44f483c5d3c646595ff9298bcdd3dfd59a
Reviewed-by: Qt CI Bot <qt_ci_bot@qt-project.org>
Reviewed-by: Thomas Hartmann <thomas.hartmann@qt.io>
2022-02-09 17:50:13 +00:00
Thomas Hartmann
cea31a2c4f QmlDesigner: Add cache for instances
When detaching the NodeInstanceView from a model
we insert all instances for this model into a cache.
The cache currently takes a maximum of 20 models.
If the model is reattached we use the existing instances, instead
of creating new ones.
We also recycle the state previews. Outdated data will be overridden by
new data once the puppet is sending the respective commands.

Task-number: QDS-6121
Change-Id: I15b5628afc5579ba8a03dca23ba5809e55022f3d
Reviewed-by: Marco Bubke <marco.bubke@qt.io>
Reviewed-by: <github-actions-qt-creator@cristianadam.eu>
2022-02-09 17:49:59 +00:00
Leena Miettinen
3bd96e7e73 Doc: Move creating files into a separate topic
"New File" is now a separate menu item in the "File" menu.
This way the topics are a bit shorter.

Task-number: QTCREATORBUG-26610
Change-Id: Iedfc79f196fc9c3b28f8613f7d8a5ed057770b9a
Reviewed-by: <github-actions-qt-creator@cristianadam.eu>
Reviewed-by: Eike Ziller <eike.ziller@qt.io>
2022-02-09 15:29:01 +00:00
hjk
0b131fae72 Docker: Use repo + tag for image identification
Makes configurations a bit better exchangable (sdktool...).

Change-Id: Ia566a516afea2205c973527e02ce5664634ebbdc
Reviewed-by: Christian Stenger <christian.stenger@qt.io>
2022-02-09 15:02:25 +00:00
Alessandro Portale
a6fcb4b3ce Tests: Fix crashing of tst_flamegraphview on Windows
...by setting the RHI backend to "opengl". That is preliminary.
QQuickWidget will work with other backends such as "d3d11", soon (likely
with Qt 6.4).

Change-Id: I57e1869e837794fa887894cae0905a548f9e436c
Reviewed-by: Christian Stenger <christian.stenger@qt.io>
2022-02-09 14:44:00 +00:00
Eike Ziller
aac0e8ef6e Fix finding python development package for cdb extension
Amends e9f3f8cc64

We switched to find_package(Python3 ...) and that doesn't use
PYTHON_LIBRARY and PYTHON_INCLUDE_DIR. Simply provide the root path for
find_package(Python3 ...).

Change-Id: If862151c095af358be5f35d3d8002d77dcd17aa6
Reviewed-by: Christian Stenger <christian.stenger@qt.io>
2022-02-09 13:18:49 +00:00
Antti Määttä
cdeb3ae13f Add quick3d memory consumption to profiler
Change-Id: I300ef808793fafc7328118dcc694ab67e90f9f52
Reviewed-by: Qt CI Bot <qt_ci_bot@qt-project.org>
Reviewed-by: Janne Koskinen <janne.p.koskinen@qt.io>
Reviewed-by: Miikka Heikkinen <miikka.heikkinen@qt.io>
Reviewed-by: Thomas Hartmann <thomas.hartmann@qt.io>
2022-02-09 12:51:15 +00:00
Jarek Kobus
072750a284 Fix crash reporting in output pane when remote run in terminal
Fixes: QTCREATORBUG-27007
Change-Id: I6e409eb6489530dc6c48c90d20e28ff019eff187
Reviewed-by: <github-actions-qt-creator@cristianadam.eu>
Reviewed-by: hjk <hjk@qt.io>
2022-02-09 12:34:57 +00:00
Jarek Kobus
ff68923846 Fix stopping the remote app run in terminal
It amends 9ec997b376
were in case of runInTerminal() we were not connected
to self started() signal anymore, so we were missing
a call to setState(SshDeviceProcessPrivate::ProcessRunning)
after start.

Amends 9ec997b376

Fixes: QTCREATORBUG-27014
Change-Id: I48bd2c223f36cd12b0b66bdc62f735b12cf7bdeb
Reviewed-by: <github-actions-qt-creator@cristianadam.eu>
Reviewed-by: hjk <hjk@qt.io>
2022-02-09 12:28:30 +00:00
hjk
cfbf083089 Docker: Allow use of local access only as compile time switch
That's sufficient for testing/working on the feature and removes
accidental use by users.

Change-Id: Ic0fb3076f769ab9ab7ff74973f0129402db7f142
Reviewed-by: Christian Stenger <christian.stenger@qt.io>
2022-02-09 12:23:54 +00:00
Leena Miettinen
4e781e7915 Doc: Describe new Clang compiler options
The target triple can be viewed and overridden if Clang
does not understand the target architecture.

Task-number: QTCREATORBUG-26610
Change-Id: I3420f09ae5227c3aa4be3baf9cb2383e9bdac135
Reviewed-by: Christian Kandeler <christian.kandeler@qt.io>
2022-02-09 12:09:34 +00:00
Jarek Kobus
3bb4483288 Remove unneeded declaration of Connection class
There is no such a class in ProjectExplorer namespace.

Change-Id: Ib82c154795bd120b4d3ec696b6553863a0bf7566
Reviewed-by: Qt CI Bot <qt_ci_bot@qt-project.org>
Reviewed-by: hjk <hjk@qt.io>
2022-02-09 11:33:24 +00:00
hjk
76eb84e72d Docker: Also mention the logging category used for debugging/testing
Change-Id: I3f3c34e6102a6225539f3ad3b32d2e1e0026bc3a
Reviewed-by: <github-actions-qt-creator@cristianadam.eu>
Reviewed-by: Christian Stenger <christian.stenger@qt.io>
2022-02-09 11:02:15 +00:00
Andre Hartmann
eb7aad198f VcsOutputLineParser: Allow copying links to clipboard
Change-Id: I193225ed42db61966db9cc9cdf3db7e9dca26672
Reviewed-by: Orgad Shaneh <orgads@gmail.com>
Reviewed-by: <github-actions-qt-creator@cristianadam.eu>
2022-02-09 10:40:52 +00:00
Mahmoud Badri
2f08f2bc11 QmlDesigner: Fix image drop to a navigator material issue
When dropping an image from the assets library to a material in the
navigator, and then cancelling the texture property dialog, don't create
an image.
Also some styling fixes.

Change-Id: I49a3e7f154110de7b8a99e2a334b6c1753a98840
Reviewed-by: <github-actions-qt-creator@cristianadam.eu>
Reviewed-by: Qt CI Bot <qt_ci_bot@qt-project.org>
Reviewed-by: Thomas Hartmann <thomas.hartmann@qt.io>
2022-02-09 09:29:26 +00:00
Cristian Adam
4075b793c0 CMakePM: Use the right type for the few kit CMake variables
Use FILEPATH for CMAKE_C|CXX_COMPILER variables, and PATH for directory
variables like CMAKE_PREFIX_PATH.

Task-number: QTCREATORBUG-27005
Change-Id: I906de43ab97d2dbad0374469c4576d901d2f6339
Reviewed-by: Eike Ziller <eike.ziller@qt.io>
2022-02-09 09:15:21 +00:00
Eike Ziller
3c1a87290e Register some more windows
So they get an entry in the Window menu, and window related shortcuts
are registered correctly.

Change-Id: Ie7e882a009f928f1268fdd312e7fb5362f6a837f
Reviewed-by: Christian Stenger <christian.stenger@qt.io>
2022-02-09 09:12:29 +00:00
Aaron Barany
035b8aa5f7 Debugger: Read remaining data before shutting down output collector
Make sure any last data is read before shutting down the output collector.
Prevents situations where output can be truncated when many lines of output
are written before the program terminates.

Task-number: QTCREATORBUG-27010
Change-Id: I33fd84281c371a68cccb195fa21b76a9e94482f0
Reviewed-by: hjk <hjk@qt.io>
2022-02-09 08:21:57 +00:00
hjk
fa7a60eed7 Docker: Update manual/docker/README.md
Change-Id: I2c8f713bc1d32191fd52765d3e82733a460b2fbf
Reviewed-by: Christian Stenger <christian.stenger@qt.io>
2022-02-09 08:00:13 +00:00
Thomas Hartmann
2f29b9886a QmlDesigner: Extend DebugView
Change-Id: I7a0d52b215762794511ecf60993bca1cebc185bb
Reviewed-by: Qt CI Bot <qt_ci_bot@qt-project.org>
Reviewed-by: Thomas Hartmann <thomas.hartmann@qt.io>
2022-02-09 07:13:37 +00:00
Thomas Hartmann
46e2683f0d QmlDesigner: Collect usage statistics for contex help
Change-Id: Ie1a1250abc6e55c13d71d8545a50d539f4360392
Reviewed-by: Qt CI Bot <qt_ci_bot@qt-project.org>
Reviewed-by: Thomas Hartmann <thomas.hartmann@qt.io>
2022-02-09 07:12:54 +00:00
Thomas Hartmann
9e1c2232a4 QmlDesigner: Remove Studio3D item from metainfo
Change-Id: I682e655e4369bb4d59a8a7b2c74be2427dbf14a0
Reviewed-by: Thomas Hartmann <thomas.hartmann@qt.io>
2022-02-08 18:11:43 +00:00
hjk
2962da2255 CMake: Prevent crash if kit has no toolchain
Amends beb167a963.

(cherry picked from commit b3375cfd56)
Fixes: QTCREATORBUG-26777
Change-Id: I65feee771a21bdfbb2a102419a0d778af97a22eb
Reviewed-by: Christiaan Janssen <christiaan.janssen@qt.io>
Reviewed-by: Eike Ziller <eike.ziller@qt.io>
2022-02-08 18:01:19 +00:00
Mahmoud Badri
9c5e6e2d8c QmlDesigner: Split components and assets libraries
Fixes: QDS-6151
Change-Id: Id6f79a2d1fcff5fb55d3ba3f1b1394f1f55ca36b
Reviewed-by: <github-actions-qt-creator@cristianadam.eu>
Reviewed-by: Samuel Ghinet <samuel.ghinet@qt.io>
Reviewed-by: Miikka Heikkinen <miikka.heikkinen@qt.io>
Reviewed-by: Qt CI Bot <qt_ci_bot@qt-project.org>
Reviewed-by: Thomas Hartmann <thomas.hartmann@qt.io>
2022-02-08 17:09:40 +00:00
Cristian Adam
93f4659533 CMakePM: Add "Close" button for Kit Configuration dialog
This looks more in sync with other dialogs that we display.

Change-Id: I445da900982b7bdcc12d810e69170b0a7695b30c
Reviewed-by: Alessandro Portale <alessandro.portale@qt.io>
2022-02-08 15:47:29 +00:00
Thomas Hartmann
93a9345fdd QmlDesigner: Improve finding node for cursor position
Using nodeLength(node) is very slow, while searching for the next closing
bracket is nearly always sufficient.

Task-number: QDS-6110
Change-Id: I22f710f4cf90302192285a8cadd6ea6fc698b2a6
Reviewed-by: Henning Gründl <henning.gruendl@qt.io>
Reviewed-by: <github-actions-qt-creator@cristianadam.eu>
Reviewed-by: Qt CI Bot <qt_ci_bot@qt-project.org>
2022-02-08 15:32:12 +00:00
Leena Miettinen
67e4e4f5a7 Doc: Describe new option in Qt Quick Autotest project wizard
The "Generate setup code" check box executes C++ code before
any of the QML tests are run.

Task-number: QTCREATORBUG-26741
Task-number: QTCREATORBUG-26610
Change-Id: Ica4d0391e3624196b3327267f5a3082ca57b58cd
Reviewed-by: <github-actions-qt-creator@cristianadam.eu>
Reviewed-by: Christian Stenger <christian.stenger@qt.io>
2022-02-08 14:58:33 +00:00
Christian Stenger
d8bd4e8e05 Tests: Fix pluginspec test on Windows
Change-Id: Ie72131f2e85b999ef8aaefd773407b2c5ce23019
Reviewed-by: Eike Ziller <eike.ziller@qt.io>
2022-02-08 13:41:06 +00:00
Christian Stenger
ade68514ff PE: Tweak clang detection
Helps to detect clang on docker devices.

Change-Id: I9340900e205e767d8b058f6e69c61abf41c25726
Reviewed-by: Christian Kandeler <christian.kandeler@qt.io>
2022-02-08 13:40:56 +00:00
Leena Miettinen
68592ad59e Doc: Update info on clangd, which is now used by default
Update the text and screenshot.

Task-number: QTCREATORBUG-26610
Change-Id: Ie35f3b6885df49029ac0dbc54677e9e6f472d2c4
Reviewed-by: Christian Kandeler <christian.kandeler@qt.io>
2022-02-08 13:21:41 +00:00
Leena Miettinen
3926e708a9 Doc: Update info on Android settings
Fixes: QTCREATORBUG-26672
Change-Id: Ifaf9f28b485f965302bca9aa2ec2a308b96d4b34
Reviewed-by: Assam Boudjelthia <assam.boudjelthia@qt.io>
2022-02-08 12:39:57 +00:00
Thomas Hartmann
5c9e64a2a4 QmlDesigner: Increase delay for text editor
This increases the delay from 400ms to 800ms until
the model and GUI is synced with the QML code.
This means the user has to stop typing for 800ms
until the form editor and property editor are updated.

Change-Id: Ia250dec39cd8051d25619310024b718ad1cf9815
Reviewed-by: Thomas Hartmann <thomas.hartmann@qt.io>
2022-02-08 12:08:50 +00:00
hjk
a89e43d502 ScreenshotCropper: Compile with namespaces
Change-Id: I5c3516071327a2f70bbbac84cc94e9acdecd2673
Reviewed-by: Christian Stenger <christian.stenger@qt.io>
2022-02-08 12:03:40 +00:00
Alessandro Portale
8c7eee4ff7 Core: Fix "reactiveness" of FindToolBar
The recently added "Select All" button needs to be included in the
width calculation.
If the find buttons switch to icon mode, "Select All" gets hidden.

Also, if the replace buttons are visible, they define whether all
buttons are shwon in full text or get hidden. No icon mode at all in
that case.

Change-Id: Ie85a68c7f7c3f1a6ca51ed3f91d64124eeb7aa1a
Reviewed-by: Eike Ziller <eike.ziller@qt.io>
2022-02-08 11:29:33 +00:00
Eike Ziller
210334218b Add change log for Qt Creator 7
Change-Id: I7e624e6dc6d6a8e0bd8974511724d9c2d24ce738
Reviewed-by: Leena Miettinen <riitta-leena.miettinen@qt.io>
2022-02-08 09:25:06 +00:00
hjk
a8092c9708 Doc: Add a hint on what to do when stuck with older CMake versions
Change-Id: Ia68b0ae94f69eca8fd674d7537f35af1b0f685bb
Reviewed-by: <github-actions-qt-creator@cristianadam.eu>
Reviewed-by: Leena Miettinen <riitta-leena.miettinen@qt.io>
2022-02-08 08:58:17 +00:00
hjk
57afbae543 CMakeProjectManager: Move some markup out of translated strings
Eases the pain of translators.

Change-Id: I7327958ee0628698ab326b3c8d6518d3330b83dd
Reviewed-by: Eike Ziller <eike.ziller@qt.io>
Reviewed-by: <github-actions-qt-creator@cristianadam.eu>
2022-02-08 08:57:59 +00:00
hjk
f308bb3cae Debugger: Fix value assignment in locals and expressions
For booleans and numbers.

Change-Id: I5ff1660faee1bf0ed21211d5fe98462f660fb417
Reviewed-by: <github-actions-qt-creator@cristianadam.eu>
Reviewed-by: Christian Stenger <christian.stenger@qt.io>
2022-02-08 08:44:57 +00:00
Xiaofeng Wang
0d17063e82 macOS: use string array to be compatible with both bash and zsh
By default, zsh does not split words in string by spaces.
See https://zsh.sourceforge.io/FAQ/zshfaq03.html

Change-Id: I167bae2af628be5b2fc9429a090628b6049f7ce4
Reviewed-by: <github-actions-qt-creator@cristianadam.eu>
Reviewed-by: Eike Ziller <eike.ziller@qt.io>
2022-02-08 08:04:18 +00:00