Commit Graph

62421 Commits

Author SHA1 Message Date
Mahmoud Badri
3b3e2e1baa QmlDesigner: Add "Create" submenu to the 3D Editor's context menu
Allow adding Quick3D Node-based items to the 3D scene using the contxt
menu.

Fixes: QDS-7397
Fixes: QDS-7399
Fixes: QDS-7400
Change-Id: Ib0a9b1c0243e3e945b4925262f68d80d2460f516
Reviewed-by: Qt CI Bot <qt_ci_bot@qt-project.org>
Reviewed-by: Samuel Ghinet <samuel.ghinet@qt.io>
Reviewed-by: Miikka Heikkinen <miikka.heikkinen@qt.io>
2022-08-26 09:39:18 +00:00
Jarek Kobus
a50afa486a VcsCommand: Remove unused SshPasswordPrompt
Change-Id: I402d619656d8339b1e81bc9ae96acf56178505d2
Reviewed-by: Orgad Shaneh <orgads@gmail.com>
2022-08-26 08:36:34 +00:00
Miikka Heikkinen
3e17d8eed4 QmlDesigner: Change default material preview env to studio env
Since "Default" option is no longer default, it was changed to "Basic"

Change-Id: I8654efbd98fe62f6c4817141fc8559757f5e58e8
Reviewed-by: <github-actions-qt-creator@cristianadam.eu>
Reviewed-by: Mahmoud Badri <mahmoud.badri@qt.io>
2022-08-26 08:15:15 +00:00
Eike Ziller
aa361b886e SshKeyCreationDialog: Use QDialogButtonBox
This makes the buttons conform to the platform guidelines.

Change-Id: Ide0d7460867e632550c08bc78301d12b66c1f474
Reviewed-by: Leena Miettinen <riitta-leena.miettinen@qt.io>
Reviewed-by: Christian Kandeler <christian.kandeler@qt.io>
2022-08-26 08:08:37 +00:00
Eike Ziller
025bdfe702 VCS: Use qtcEnvironmentVariable* instead of qEnvironmentVariable*
And instead of qgetenv.
Takes Qt Creator's setting at "Environment > System > Environment" into
account, which makes it easier on some platforms to set them (e.g.
macOS), can be configured differently in different settings paths, and
potentially can be changed at runtime (depending on usage).

Change-Id: I364e5b663353f37121279a58f4a9fd514cddbbf0
Reviewed-by: Qt CI Bot <qt_ci_bot@qt-project.org>
Reviewed-by: Orgad Shaneh <orgads@gmail.com>
2022-08-26 08:03:01 +00:00
Christian Kandeler
d454184467 ClangCodeModel: Use central functions for getting token positions
Change-Id: I192e2807067467906b38e164933755f763133cb4
Reviewed-by: Qt CI Bot <qt_ci_bot@qt-project.org>
Reviewed-by: <github-actions-qt-creator@cristianadam.eu>
Reviewed-by: David Schulz <david.schulz@qt.io>
2022-08-26 07:44:21 +00:00
David Schulz
5f0270ae4a Utils: clean file name before creating fs engine
Change-Id: I9c4c8132ad509820e0388787ab34bf11b3c4465b
Reviewed-by: Marcus Tillmanns <marcus.tillmanns@qt.io>
Reviewed-by: <github-actions-qt-creator@cristianadam.eu>
Reviewed-by: David Schulz <david.schulz@qt.io>
2022-08-26 07:36:49 +00:00
The Qt Project
92c529b4a6 Merge "Merge remote-tracking branch 'origin/8.0'" 2022-08-26 07:02:52 +00:00
Eike Ziller
c6c92ec096 Merge remote-tracking branch 'origin/8.0'
Conflicts:
	src/libs/qmljs/qmljsmodelmanagerinterface.cpp
	src/plugins/clangcodemodel/clangdclient.cpp
	src/plugins/qmldesigner/components/edit3d/edit3dwidget.cpp
	src/plugins/qmldesigner/components/materialbrowser/materialbrowserview.cpp
	src/plugins/qmldesigner/designercore/include/modelnode.h
	src/plugins/qmldesigner/designercore/model/modelnode.cpp
	src/plugins/qmldesigner/designercore/model/rewriterview.cpp

Change-Id: I93c57879b79f27325321bfc045ca618bd835af93
2022-08-26 08:40:23 +02:00
Jarek Kobus
278589a014 GitClient: Reuse VcsCommand::NoOutput
Change-Id: If30d78a34ae77a7397af6374f8b733809ecaab20
Reviewed-by: <github-actions-qt-creator@cristianadam.eu>
Reviewed-by: Orgad Shaneh <orgads@gmail.com>
2022-08-26 06:38:38 +00:00
David Schulz
c10f23a5c6 Git: add shortcuts to uncommitted changes dialog
Change-Id: Ifde8158b7902fb6a280545349ab8d8c0a723782c
Reviewed-by: Orgad Shaneh <orgads@gmail.com>
2022-08-26 06:05:12 +00:00
David Schulz
86b451f71e CppEditor: rename overview -> outline
There is now a clean border border between outline and overview.
Everything defined in CppEditor uses outline and everything in cplusplus
uses overview.

Change-Id: Ic6637dc53fca3401417180b1873303012a813113
Reviewed-by: Christian Kandeler <christian.kandeler@qt.io>
Reviewed-by: <github-actions-qt-creator@cristianadam.eu>
2022-08-26 04:48:56 +00:00
Eike Ziller
327e229ce0 Utils: Export the qtcEnvironmentVariable* functions
Change-Id: I10e0fc7380b281f0b7bab1835ef7a349843bc65f
Reviewed-by: Cristian Adam <cristian.adam@qt.io>
Reviewed-by: Qt CI Bot <qt_ci_bot@qt-project.org>
2022-08-25 13:02:59 +00:00
David Schulz
0bc3d74ea4 Editor: add and use editor toolbar outline setter
Simplifies switching between c++ builtin code model and clangd since we
can now react on new outlines in the c++ editor widget.

Fixes: QTCREATORBUG-27594
Change-Id: I76bdc301d78572cbdf4196658f751b5204743fbb
Reviewed-by: <github-actions-qt-creator@cristianadam.eu>
Reviewed-by: Christian Kandeler <christian.kandeler@qt.io>
2022-08-25 12:29:17 +00:00
Christian Stenger
10c7b810b2 Squish: Support scripted objects map
Change-Id: I3ad0e43dcd7e542ac51eb7be8add0f55ee6e090d
Reviewed-by: David Schulz <david.schulz@qt.io>
2022-08-25 10:50:11 +00:00
Christian Stenger
2141b9945f Squish: Fix handling of changing properties
If a property changes or gets removed we need to propagate
this change correctly to mark an objects map as modified.

Change-Id: If6dfc94f05020a5741683a28a49a59b952b49cb0
Reviewed-by: David Schulz <david.schulz@qt.io>
2022-08-25 10:50:03 +00:00
Cristian Adam
152c01bd86 ProjectExplorer: Allow "c++" for MinGW imported compiler
Usually GCC on Linux is providing a symlink for "c++" as "g++". MinGW on
Windows is providing a copy of the executable, which gets ignored by Qt
Creator.

CMake is preferring "c++" instead of "g++" and Qt Creator will ignore
such a detected compiler at import time.

Change-Id: I3e19e1f1c29cad50cdc92c17a15f246188411597
Reviewed-by: Christian Kandeler <christian.kandeler@qt.io>
2022-08-25 10:45:30 +00:00
Jarek Kobus
70343084ba Fix key deployment on Windows
It looks like there is no way of setting a command line
on Windows according to Linux rules when there is no
Linux-associated device.

Workaround it by using ProcessArgs explicitly.

Fixes: QTCREATORBUG-28092
Change-Id: I5ce23d33547993ed7c7733809187027084ff4c3b
Reviewed-by: Qt CI Bot <qt_ci_bot@qt-project.org>
Reviewed-by: Christian Kandeler <christian.kandeler@qt.io>
Reviewed-by: <github-actions-qt-creator@cristianadam.eu>
2022-08-25 10:18:36 +00:00
Mahmoud Badri
8656bafbd4 QmlDesigner: Add delete action to 3D Editor's context menu
This entails selecting a model upon right-clicking if it is not selected.
Also fixed a memory leak and small tweaks.

Fixes: QDS-7401
Change-Id: I592acb3fff30ecc3236f3cf2fbe126de4fb389dc
Reviewed-by: <github-actions-qt-creator@cristianadam.eu>
Reviewed-by: Miikka Heikkinen <miikka.heikkinen@qt.io>
2022-08-25 09:55:32 +00:00
Alessandro Portale
da446d0d15 MarketPlace: Use HighDpi resolution for thumbnails
Let's create the thumbnail in the highest possible resolution for better
visual quality.

Change-Id: I35f67829ed6232cd3a139161e5695661b3adf271
Reviewed-by: <github-actions-qt-creator@cristianadam.eu>
Reviewed-by: Christian Stenger <christian.stenger@qt.io>
Reviewed-by: Eike Ziller <eike.ziller@qt.io>
2022-08-25 09:30:19 +00:00
Tasuku Suzuki
251d56a9c1 Remove html tag from Setting Filter for Kits
'CMake <a href="generator">generator</a>' is there.

Change-Id: I3ceb6617b4044b24e38614822280e9985691f1d8
Reviewed-by: <github-actions-qt-creator@cristianadam.eu>
Reviewed-by: Christian Kandeler <christian.kandeler@qt.io>
2022-08-25 08:49:22 +00:00
Christian Kandeler
fa13f48c2b CPlusPlus: Fix mis-parsing array-related constructs
... as structured bindings.
Also add a safety check to Bind that might be needed for invalid code.
Amends ca00b874a7.

Change-Id: I7b174b80ad97ed7424f1e369b876c99acf7e95d2
Reviewed-by: Qt CI Bot <qt_ci_bot@qt-project.org>
Reviewed-by: <github-actions-qt-creator@cristianadam.eu>
Reviewed-by: Christian Stenger <christian.stenger@qt.io>
2022-08-25 08:09:23 +00:00
Christian Stenger
3172bba63c Squish: Use history completer for suites base directory
Change-Id: I31fd69b7db0f4db38ad739b30234f0247f0b8fd2
Reviewed-by: David Schulz <david.schulz@qt.io>
2022-08-25 08:06:23 +00:00
Piotr Mućko
3ec085b4f4 McuSupport: Use constants for qt MCUs package variables
Change-Id: I7ca83a6ed3981005bf562d4937d6b27bbcfd53eb
Reviewed-by: <github-actions-qt-creator@cristianadam.eu>
Reviewed-by: Alessandro Portale <alessandro.portale@qt.io>
2022-08-25 07:52:00 +00:00
Piotr Mućko
6a8a6d937c McuSupport: Create freeRTOS package from JSON
Adjust test JSONs.
Write unit tests.
Adjust existing package creation to support freeRTOS package.

Example JSON:
"freeRTOS": {
    "cmakeVar": "FREERTOS_DIR",
    "defaultValue": "$QUL_BOARD_SDK_DIR/rtos/freertos/freertos_kernel",
    "envVar": "IMXRT1064_FREERTOS_DIR",
    "id": "NXP_FREERTOS_DIR",
    "label": "FreeRTOS SDK for MIMXRT1064-EVK",
    "optional": false,
    "setting": "FreeRTOSSourcePackage_IMXRT1064",
    "type": "path"
}

Change-Id: I25ca9f732cd3a54eebb23b73b7950e11976c0f68
Reviewed-by: Dawid Śliwa <dawid.sliwa@qt.io>
Reviewed-by: Alessandro Portale <alessandro.portale@qt.io>
2022-08-25 07:51:52 +00:00
Thomas Hartmann
1bfd078071 QmlDesigner: Fix crash
Tracking the target with a QPointer in case the target gets deleted.

Change-Id: I9cca4a5017b7fc77941fd46653847a00363c060e
Reviewed-by: Qt CI Bot <qt_ci_bot@qt-project.org>
Reviewed-by: Tim Jenssen <tim.jenssen@qt.io>
2022-08-24 19:31:21 +00:00
Piotr Mućko
ae69073fc1 McuSupport: Add override keyword to McuPackage::setPath()
Change-Id: Ib982d9e9da4dd6e9ae0d5f87ae29d884c556ebbb
Reviewed-by: <github-actions-qt-creator@cristianadam.eu>
Reviewed-by: Marcus Tillmanns <marcus.tillmanns@qt.io>
Reviewed-by: Alessandro Portale <alessandro.portale@qt.io>
2022-08-24 15:26:51 +00:00
Yasser Grimes
cd36947561 McuSupport: Handle projects with "-" in their name
Using "-" in a McuSupport project's name will result in errors. This
commit fixes that by changing the occurrences of "-" with "_" in the
templates used for generating the project.

Task-number: QTCREATORBUG-26512
Change-Id: I7e65e3992bf1fa139d008ff5c2221a1098c12b92
Reviewed-by: <github-actions-qt-creator@cristianadam.eu>
Reviewed-by: hjk <hjk@qt.io>
Reviewed-by: Piotr Mućko <piotr.mucko@qt.io>
2022-08-24 15:26:07 +00:00
Artem Sokolovskii
2d375eb776 ClangFormat: Move override checkbox to global settings
Moved override checkbox to global settings groupbox.

Change-Id: I70c97486a61f69274d059edc5095fe02c86fb04d
Reviewed-by: Christian Kandeler <christian.kandeler@qt.io>
2022-08-24 15:11:40 +00:00
Eike Ziller
d3354d1999 Optionally show locator popup centered
when using the menu item or shortcut.
Turn on with "Open as Centered Popup" in the "filter" menu in
the locator input field. Default is off.

Change-Id: Ic1e0d2188aba924d25fe5b6f0048ae8c3adf1aa8
Reviewed-by: <github-actions-qt-creator@cristianadam.eu>
Reviewed-by: Leena Miettinen <riitta-leena.miettinen@qt.io>
Reviewed-by: David Schulz <david.schulz@qt.io>
2022-08-24 12:40:16 +00:00
Thomas Hartmann
83e1e4c2d6 QmlDesigner: Ignore properties when making document as modified
Change-Id: I659fc3e035c4b98500e700779e4e2a2627a18eb2
Reviewed-by: <github-actions-qt-creator@cristianadam.eu>
Reviewed-by: Mahmoud Badri <mahmoud.badri@qt.io>
2022-08-24 08:28:43 +00:00
David Schulz
60f5275edf Client: rerequest document highlight if server is unreachable
Makes sure the highlight is properly updated and prevents assert in
Client::sendMessage.

Change-Id: Ie7ad54c34272867e17f6e20654f27e2fd8711fdc
Reviewed-by: Christian Stenger <christian.stenger@qt.io>
2022-08-24 07:53:21 +00:00
David Schulz
09f0ddb50c CppEditor: fix crash in outline
Make sure the document lives as long as the generated symbol items.

Fixes: QTCREATORBUG-28091
Change-Id: I515748ab7fd198699434ac5c19585afa20df613d
Reviewed-by: Eike Ziller <eike.ziller@qt.io>
2022-08-24 07:04:00 +00:00
Eike Ziller
c0a0daf588 Environment: Add convenience wrappers similar to qEnvironmentVariable*
Adds corresponding wrappers that work on
Environment::systemEnvironment(), which can be different to the
environment that Qt Creator currently runs in, depending on the settings
in Preferences > Environment > System > Environment.

Change-Id: Ib1db37d2828b686d9a3233d170612beea9d12946
Reviewed-by: hjk <hjk@qt.io>
Reviewed-by: <github-actions-qt-creator@cristianadam.eu>
2022-08-24 06:46:29 +00:00
Christian Stenger
26e5e74561 QmlJS: Fix compile
Amends 8310a2f0a9.

Change-Id: I062a377c9d6f1993f23c5b7e56cca93ad6c3eac5
Reviewed-by: David Schulz <david.schulz@qt.io>
2022-08-24 05:00:26 +00:00
Thomas Hartmann
83ce87a625 StudioWelcome: Fix QTC_ASSERT
Deleting QtcProcess instance directly from
one of its signal handlers will lead to crash.

Change-Id: Ida231f29dc6a717dfe4971da9743b1fb9b225495
Reviewed-by: Tim Jenssen <tim.jenssen@qt.io>
Reviewed-by: <github-actions-qt-creator@cristianadam.eu>
2022-08-23 17:21:45 +00:00
Thomas Hartmann
daabcbbf73 QmlDesigner: Fix crash
isBlocked seems to be called in rare cases if the model is null.

Change-Id: Ie8fa6007a0891f4204c35600084025ca52f079e9
Reviewed-by: Tim Jenssen <tim.jenssen@qt.io>
2022-08-23 17:21:30 +00:00
Tim Jenssen
8310a2f0a9 qmljs: reduce used threads
Change-Id: I8f27037d0cfefd65f1ac060e1505328ea705a670
Reviewed-by: Thomas Hartmann <thomas.hartmann@qt.io>
Reviewed-by: <github-actions-qt-creator@cristianadam.eu>
2022-08-23 17:20:14 +00:00
hjk
20400b263e ProjectExplorer: Code cosmetics
Namespaces, white space in jsonwizard.

Change-Id: I92f724d170380cb27f478a7e43d2ea9e6b35c03b
Reviewed-by: Christian Kandeler <christian.kandeler@qt.io>
Reviewed-by: <github-actions-qt-creator@cristianadam.eu>
2022-08-23 15:19:08 +00:00
Christian Kandeler
ca00b874a7 CPlusPlus: Support structured bindings
While we do recommend clangd for modern code bases, we should still be
able to parse basic language constructs.

Fixes: QTCREATORBUG-27975
Change-Id: I189b991685a5cd5f62f2afce77878b60c895e8f9
Reviewed-by: <github-actions-qt-creator@cristianadam.eu>
Reviewed-by: hjk <hjk@qt.io>
2022-08-23 13:52:11 +00:00
Cristian Adam
9102452272 clangd: Use QtC system environment for environment variables
Users would set QTC_CLANGD_COMPLETION_RESULTS in the Qt Creator
system environment variable dialog and expect that clangd would
the be configured with the corresponding --limit-results value.

Task-number: QTCREATORBUG-28071
Change-Id: Ia7a9b6a96fabe7ba16906c547a15716f0b83f0ec
Reviewed-by: Christian Kandeler <christian.kandeler@qt.io>
Reviewed-by: Eike Ziller <eike.ziller@qt.io>
2022-08-23 13:41:11 +00:00
Marcus Tillmanns
5fab54d95a SSH Device: Add SSH port to Device wizard
Change-Id: Ia4cc3b7bb0074930f32d58393651f6c961c69b28
Reviewed-by: hjk <hjk@qt.io>
2022-08-23 10:55:37 +00:00
Thomas Hartmann
6a3933c87a StudioWelcome: Fix QTC_ASSERT
Deleting QtcProcess instance directly from
one of its signal handlers will lead to crash!

I cannot confirm this crash actually happened, but we should play save
and delete the archive from the event loop.

Change-Id: Ie27291c9ac8b300478ed8396d25a76b343f238be
Reviewed-by: Tim Jenssen <tim.jenssen@qt.io>
2022-08-23 10:35:10 +00:00
Marco Bubke
84c1d6572b Utils: Remove variant.h
Since we are now requiring macOS 10.14 we can remove our local copy of
std::variant and use for macOS std::variant too.

Change-Id: I589d03b35fc56878b7392ffa7047a439e588fe43
Reviewed-by: Qt CI Bot <qt_ci_bot@qt-project.org>
Reviewed-by: <github-actions-qt-creator@cristianadam.eu>
Reviewed-by: Eike Ziller <eike.ziller@qt.io>
2022-08-23 09:51:43 +00:00
Artem Sokolovskii
17693bc415 ClangFormat: Fix list declaration
Fixed list declaration indentation.
Fixed function declaration with parameters on the new line.
Added tests for both cases.

Fixes: QTCREATORBUG-25011
Change-Id: Ida4f6ec4f407c5e5b015dc2c0afff110262d9645
Reviewed-by: Christian Kandeler <christian.kandeler@qt.io>
2022-08-23 09:07:59 +00:00
Christian Kandeler
5817bdf87d CppEditor: Consider selection when requesting quickfixes
If the user has a token selected, prefer that to the actual cursor
position.

Fixes: QTCREATORBUG-27886
Change-Id: Ib32e24676510bff42292fe23e4962720fcbac4ed
Reviewed-by: Qt CI Bot <qt_ci_bot@qt-project.org>
Reviewed-by: <github-actions-qt-creator@cristianadam.eu>
Reviewed-by: David Schulz <david.schulz@qt.io>
2022-08-23 08:37:07 +00:00
Thomas Hartmann
4bfdf9fc46 QmlDesigner: Do not assume that the active state group is the root node
Change-Id: Ifd315a7e1d8c833f612e305127911634174a8e5b
Reviewed-by: Qt CI Bot <qt_ci_bot@qt-project.org>
Reviewed-by: <github-actions-qt-creator@cristianadam.eu>
Reviewed-by: Henning Gründl <henning.gruendl@qt.io>
2022-08-23 08:01:07 +00:00
Thomas Hartmann
1fa2af4c87 QmlDesigner: use stateGroup() instead of hard coding the root node
Change-Id: I502c51f252fb8584c36a2bbd31faa7a130d19f5e
Reviewed-by: Qt CI Bot <qt_ci_bot@qt-project.org>
Reviewed-by: <github-actions-qt-creator@cristianadam.eu>
Reviewed-by: Henning Gründl <henning.gruendl@qt.io>
2022-08-23 08:00:59 +00:00
Thomas Hartmann
3682ff76d2 QmlDesigner: Do not require visual node for states
StateGroup is no visual node.

Change-Id: Ia0ff297efe2b73f42eb24e193d8e832250d77237
Reviewed-by: Qt CI Bot <qt_ci_bot@qt-project.org>
Reviewed-by: Henning Gründl <henning.gruendl@qt.io>
2022-08-23 08:00:51 +00:00
Thomas Hartmann
179713ed5c QmlDesigner: Use QmlObjectNode instead of QmlVisualNode
StateGroups are no visual items.

Change-Id: Ia081c303aea6c79c750b44388a81f4b10cc1837d
Reviewed-by: Qt CI Bot <qt_ci_bot@qt-project.org>
Reviewed-by: Henning Gründl <henning.gruendl@qt.io>
2022-08-23 08:00:35 +00:00