Commit Graph

67514 Commits

Author SHA1 Message Date
Christian Kandeler
64bec2205b C++: Add source file to test icon support
Task-number: QTCREATORBUG-21867
Change-Id: Ie167608257bb8b7d268a05f1935d77659a075dc1
Reviewed-by: Alessandro Portale <alessandro.portale@qt.io>
2021-02-08 08:42:32 +00:00
Jacopo Martellini
cc89f72fe5 TextEditor: Add option to prefer single line comments
Fixes: QTCREATORBUG-24017
Change-Id: Icf34710707b51ea9fbd348dd207950cffeedfdd3
Reviewed-by: David Schulz <david.schulz@qt.io>
2021-02-08 08:36:50 +00:00
Orgad Shaneh
8a243aa6ca Meson: Fix tab order in item settings
Change-Id: I0ff2303c64f18fef30dd5e5f06ea47291b036096
Reviewed-by: hjk <hjk@qt.io>
2021-02-08 08:26:53 +00:00
Bernhard Beschow
a8074f7dc0 Utils: Mark some convenience methods as const/static
Change-Id: Icb7a7394270e495717de5edd66bc19a0c2d97a3c
Reviewed-by: Alessandro Portale <alessandro.portale@qt.io>
2021-02-06 20:01:29 +00:00
Tim Jenssen
bd25785997 qmlpuppet: fix crash
initializeView(); creates the necessary engine
where we need to set the languageUi.

Change-Id: Ib9f9f35e00167ce0bfe4d96ed4e66a965daea084
Reviewed-by: Thomas Hartmann <thomas.hartmann@qt.io>
2021-02-05 17:30:56 +00:00
Christian Kandeler
aec6126634 CppTools: Add dedicated filter option for declarations
... to the "Find Usages" result widget.

Fixes: QTCREATORBUG-25302
Change-Id: If957cbffe55f6f9288ceae9d64847e8a4a367765
Reviewed-by: Fabian Kosmale <fabian.kosmale@qt.io>
2021-02-05 16:55:06 +00:00
Aleksei German
d920c98b11 QmlDesigner: Integrate MCU example to welcome page
Task: QDS-3618

Change-Id: I65f6dc4ebd3a2f0ca97838ccc89e7054eb083941
Reviewed-by: Alessandro Portale <alessandro.portale@qt.io>
2021-02-05 16:18:10 +00:00
Miikka Heikkinen
baf3528af5 QmlPuppet: Fix custom 3D geometries for Qt 6.1
Private API puppet uses for custom 3D geometries has changed.

Change-Id: Ie9f2052b04399db6f9643aba6319f6e95df1c15b
Reviewed-by: Mahmoud Badri <mahmoud.badri@qt.io>
2021-02-05 15:03:47 +00:00
Christian Kandeler
1e3f970181 CppTools: Fix unit test
Amends 84865016ea.

Change-Id: Ia815152d2c19b17b1d11dd5c82fd7a74d0ac03cb
Reviewed-by: Christian Stenger <christian.stenger@qt.io>
2021-02-05 14:12:56 +00:00
Christian Stenger
ced96a480d CMake: merge binary directories of sub projects
...into top level. Exceptions are applied explicitly.

Change-Id: I59c54967dffc0bef2e8cc05c73763fcf18c12517
Reviewed-by: Eike Ziller <eike.ziller@qt.io>
2021-02-05 14:09:12 +00:00
Cristian Adam
a8db7721eb CMakeProjectManager: Do not use dynamic allocation for CMakeTool
ammends 87197be604

Change-Id: I600c0c26b3301607360f93ff6075f7c7d4a1b438
Reviewed-by: hjk <hjk@qt.io>
2021-02-05 13:44:52 +00:00
Cristian Adam
87197be604 CMakeProjectManager: Do not report CMake as invalid when adding/cloning
Fixes: QTCREATORBUG-25250
Change-Id: Ic78a5645540145977c7ff0b05d8d7a5c3fc15fda
Reviewed-by: Eike Ziller <eike.ziller@qt.io>
2021-02-05 13:14:49 +00:00
Christian Kandeler
765f518de3 TextEditor: Support tooltips for buttons in text mark tooltips
In case users don't find the icon self-explanatory.

Task-number: QTCREATORBUG-25150
Change-Id: I481b1ea7f510f065f83badcb91e127ac1c81f5a1
Reviewed-by: David Schulz <david.schulz@qt.io>
Reviewed-by: Alessandro Portale <alessandro.portale@qt.io>
2021-02-05 12:43:17 +00:00
Miikka Heikkinen
2a94113352 QmlDesigner: Fix compile error
Change-Id: Ic52d29b6cba10ba00be2497b43490e5e1443ade2
Reviewed-by: Mahmoud Badri <mahmoud.badri@qt.io>
2021-02-05 11:54:41 +00:00
Eike Ziller
8875c59021 Core: Do not remove context objects during shutdown
Like we suppress context updates during shutdown also disconnect from
the context object's destroyed signal. At that point we don't care
anymore.

This also avoids issues if the context object lives as the child of a
widget in the MainWindow geometry. These widgets (and respectively their
children) are destroyed only in the QObject destructor, i.e. after the
MainWindow itself already destroyed all its members, including the
m_contextWidgets map.

Amends 6d97c1fcb1

Fixes: QTCREATORBUG-25310
Change-Id: I75db6f8783b5f62aa9805b69d4d2bba07b906a5b
Reviewed-by: David Schulz <david.schulz@qt.io>
2021-02-05 11:27:43 +00:00
Leena Miettinen
616b441e1a Doc: Update UI text for Qt Bridge for Figma
Rearrange the topic to make the step list short and
describe the export settings in a table.

Task-number: QDS-3701
Change-Id: I0c720b8463e6fd7b17a08b7aaf10a30db6857c25
Reviewed-by: <kama.wojcik@qt.io>
Reviewed-by: Thomas Hartmann <thomas.hartmann@qt.io>
2021-02-05 10:41:20 +00:00
Miikka Heikkinen
dcc105bb21 QmlDesigner: Add necessary QML imports when importing 3d asset
Necessary missing import statements are generated when a 3D asset is
imported to a project.

Task-number: QDS-3683
Change-Id: I93da8ddaf5691d8ef66e167ea8b0fefd7e1c6c91
Reviewed-by: Mahmoud Badri <mahmoud.badri@qt.io>
Reviewed-by: Thomas Hartmann <thomas.hartmann@qt.io>
2021-02-05 09:37:21 +00:00
Miikka Heikkinen
ee85d7f9ca QmlDesigner: Allow uppercase file suffixes in asset import
Fixes: QDS-3720
Change-Id: I2b4af981bed943e53847bb3480ced185e157b5e7
Reviewed-by: Mahmoud Badri <mahmoud.badri@qt.io>
2021-02-05 09:34:37 +00:00
Miikka Heikkinen
99a3ddbd23 QmlDesigner: Move 3D asset import to puppet
Moved 3D asset import to puppet to ensure import always uses the
correct version of the QtQuick3D.

Fixes: QDS-3154
Change-Id: I630a833e7231383b87bf8b7214d3545d12de15ab
Reviewed-by: Thomas Hartmann <thomas.hartmann@qt.io>
Reviewed-by: Mahmoud Badri <mahmoud.badri@qt.io>
2021-02-05 09:34:04 +00:00
Miikka Heikkinen
f15fef7ee1 QmlDesigner: Add necessary import when dragging asset to navigator
When a sound asset or a shader asset is dragged to the navigator,
a necessary import to utilize the created item is added as well,
if it is missing and it can be found from possible imports.

Task-number: QDS-3683
Change-Id: I360af1342d5bd72b95d6988495851237694077a7
Reviewed-by: Thomas Hartmann <thomas.hartmann@qt.io>
2021-02-05 09:27:08 +00:00
Miikka Heikkinen
a57820f055 QmlPuppet: Register fonts at scene creation
Automatically register all fonts from 'fonts' folder at scene creation.

Fixes: QDS-3624
Change-Id: I38728e458952ea52c941244daaca715102a93c55
Reviewed-by: Thomas Hartmann <thomas.hartmann@qt.io>
2021-02-05 09:26:34 +00:00
Christian Kandeler
59d24fa268 Fix warnings about unused variables
Change-Id: I0bb76529a28c4288967cb79972c1863a0b1c84c6
Reviewed-by: Christian Stenger <christian.stenger@qt.io>
2021-02-05 08:51:44 +00:00
Christian Kandeler
3d1b456dab CppTools: Fix parentheses mismatch
... when the ClangCodeModel is disabled.
The built-in highlighter's use of HighlightingResult::kind conflicted
with the ClangCodeModel's.
Amends d8c1e51bfe.

Change-Id: I79784679fd17d88cd543304de726f8576954b29c
Reviewed-by: David Schulz <david.schulz@qt.io>
2021-02-05 08:51:31 +00:00
hjk
a5b93b54c8 CPlusPlus: Add missing line and column info for lambda functions
Task-number: QTCREATORBUG-25242
Change-Id: I5032bb04879e30f5516471e2038dc4b6bb3477f8
Reviewed-by: hjk <hjk@qt.io>
2021-02-05 08:51:09 +00:00
Christian Kandeler
6d1a6f573c GccParser: Also detect "In constructor ..."
In addition to "In function ...".

Change-Id: I307e63e9890bb2e2da2bed354b048f75dbbf952a
Reviewed-by: hjk <hjk@qt.io>
2021-02-05 08:50:36 +00:00
Maximilian Goldstein
5943215d99 qmltypes: Handle extension property
Previously Qt Creator ignored the extension property in qmltypes leading to
auto-complete being unavailable for some properties of extended types among other things.

Change-Id: I1bc13b3daf9bbd0a835e9a25f52b9589ad942e75
Reviewed-by: Ulf Hermann <ulf.hermann@qt.io>
2021-02-05 08:38:52 +00:00
Leander Schulten
54e5ff7e05 Debugger: Fix build
Amends 2081038953

Change-Id: Ieae6945b2a856b8ae253bf3a49ce8a7613e88a1f
Reviewed-by: hjk <hjk@qt.io>
2021-02-04 17:18:22 +00:00
Christian Kandeler
84865016ea Locator: Use extra info as secondary sorting criterion for C++
... classes and functions.
The extra info is usually the scope or the file, so this effectively adds
some helpful grouping.

Fixes: QTCREATORBUG-2538
Change-Id: I2404fee1df88fc51871a72db0dcc9c75d6ba6dcb
Reviewed-by: Eike Ziller <eike.ziller@qt.io>
2021-02-04 16:20:55 +00:00
Alessandro Portale
c25afb1b59 McuSupport: Remove explicit appointment of Jom as CMAKE_MAKE_PROGRAM
Detecting the presence of Jom, setting CMAKE_MAKE_PROGRAM to it and
choosing "NMake Makefiles JOM" as CMake generator was implemented in a
time where the Qt SDK did not yet ship ninja.

By now, ninja is shipped and it *should* be automatically installed as
dependency of Qt for MCUs. Qt Creator will by default prefer ninja as
generator/buildtool if it is installed.

Task-number: QTMCU-18
Change-Id: Ia83ac3a454b90bb5b5b69ddefb3fbb8f23fa15c9
Reviewed-by: Eike Ziller <eike.ziller@qt.io>
Reviewed-by: <christiaan.janssen@qt.io>
Reviewed-by: Alessandro Portale <alessandro.portale@qt.io>
2021-02-04 15:27:58 +00:00
Jarek Kobus
319300aa6c Conan: Detect automatically conan file when adding a new build config
Add a conan install step to all build configurations for all
targets in case the conan file is present in the root of the
project source tree. Do this detection only once, when configuring
the project, but not when configured project is being opened / loaded.
In addition, perform this detection also when a new build
configuration is being added.

Task-number: QTCREATORBUG-25081
Task-number: QTCREATORBUG-21785
Change-Id: I872814a33234e20104046c848b95cdfca577ed7e
Reviewed-by: Kai Koehne <kai.koehne@qt.io>
2021-02-04 14:40:50 +00:00
Jarek Kobus
a3318e33db Make Class View interactive again
After you load the project, and after "Parsing C/C++ Files"
has finished, if you open the Class View and start
typing in cpp editor, a warning appears:
"QObject::killTimer: Timers cannot be stopped from another thread"
and changes to source files, like adding a new method or
renaming it, are not reflected anymore in Class View.

Short:
A fix is to give timer a parent in order to move it properly
into another thread.

Long:
Just after creating a Parser object we move it into another
thread by calling moveToThread(), inside constructor of
Manager in classviewmanager.cpp. All the children
of the moved object are moved together into the target thread.
Original intention of the timer object inside Parser was
that it should live in the same thread as its parent
Parser object. In meantime, after some refactoring,
that's not the case anymore and the timer is orphaned
(parentless in terms of QObject hierarchy). It means
it's not moved together with the parent Parser anymore,
while still being a member field of the Parser.
This is reflected in a warning message and class view
doesn't react to the changes in edited document anymore.

Amends 87b3ea9af4

Change-Id: I9cca7556d5b77aa31ce7b4ab426f84a478488a84
Reviewed-by: Christian Kandeler <christian.kandeler@qt.io>
2021-02-04 14:38:50 +00:00
hjk
1ca15fe2e9 Utils: Add a more user-friendly accessor to BaseAspects by Id
Change-Id: Ic99bd380008afaa88a346d0d5118a1af0a00f5ff
Reviewed-by: BogDan Vatra <bogdan@kdab.com>
2021-02-04 14:06:52 +00:00
hjk
f48716ec2a Utils: Let BoolAspect announce value changes
Change-Id: Ie8393e577a5ef1cb8626050a9a39bd4b48bda115
Reviewed-by: BogDan Vatra <bogdan@kdab.com>
Reviewed-by: Christian Kandeler <christian.kandeler@qt.io>
2021-02-04 14:06:35 +00:00
Mitch Curtis
b5ff180f8c cmakeprojectmanager: save files before build
This code path (CMakeBuildSystem::buildCMakeTarget) is taken
when building a specific target, such as when activating
Build > Build for Run Configuration. Building via e.g. Ctrl+B
takes a different code path, so this shouldn't be called more
than necessary.

Fixes: QTCREATORBUG-25276
Change-Id: I362bafda43460eaeac9cbf0f053bf457a76702f1
Reviewed-by: Cristian Adam <cristian.adam@qt.io>
2021-02-04 13:34:40 +00:00
David Schulz
48422187fc Cpp: Also add closing parenthesis for doxygen comments
Change-Id: Iacef35d0cbbeda743f97dd79f40a37faa0c996ad
Reviewed-by: Christian Kandeler <christian.kandeler@qt.io>
2021-02-04 13:25:16 +00:00
Leander Schulten
4ae93a9d27 FakeVim: Fix Qt6 build
Amends f626e27370

Change-Id: Id4681dc771a132bc6143b7e1f0b566a3930706e2
Reviewed-by: hjk <hjk@qt.io>
2021-02-04 12:15:18 +00:00
Leena Miettinen
df8aec0c19 Doc: Add docs for Washing Machine UI example
Fixes: QDS-3569
Change-Id: Ie7b09c24c0db202ae7ed504d2b40451b4f8e0908
Reviewed-by: Thomas Hartmann <thomas.hartmann@qt.io>
2021-02-04 11:47:38 +00:00
Leander Schulten
29207e3eeb CppEditor: Add Base Class Support for Generate Constructor QuickFix
Change-Id: Idd92229134609c0ac87aad030a6bb645ff4cce1b
Reviewed-by: Christian Kandeler <christian.kandeler@qt.io>
2021-02-04 11:40:05 +00:00
Bernhard Beschow
0e0c2ca91c AutoTest: Improve type safety in TestTreeItem
Ensures that the static_cast<>() in framework() always succeeds.

Change-Id: I6aff0cf12a565bd6f9791c67979698729d7143e5
Reviewed-by: Christian Stenger <christian.stenger@qt.io>
2021-02-04 11:32:45 +00:00
Bernhard Beschow
ed6083b521 AutoTest: Improve type safety in TestParseResult
By having TestParseResults take ITestFramework rather than ITestBase as
parameter, some base->asFramework() casts can be avoided today which
could possibly fail in the future.

Moreover, it allows TestTreeItem to take ITestFramework rather than
ITestBase as parameter which improves type safety further. This shall be
done in a separate commit though.

Change-Id: I66594415d68c3423076a0830ecd11080d3b6c186
Reviewed-by: hjk <hjk@qt.io>
Reviewed-by: David Schulz <david.schulz@qt.io>
Reviewed-by: Christian Stenger <christian.stenger@qt.io>
2021-02-04 11:31:56 +00:00
Bernhard Beschow
3d075d30d0 AutoTest: Fix invalid static_cast
Test tools only create ITestTreeItems, not TestTreeItems.

Change-Id: Idb20844b80e351d4f0a472e4b97b074797ad6f99
Reviewed-by: Christian Stenger <christian.stenger@qt.io>
2021-02-04 11:31:09 +00:00
David Schulz
9e36689092 LanguageClient: anounce dynamic registration capabilities for formatting
Change-Id: I285c3b8d448a44e7e6e9b6ffcc6b6577d4b4b53f
Reviewed-by: Christian Stenger <christian.stenger@qt.io>
2021-02-04 11:22:35 +00:00
Christian Kandeler
feefe3585f CppEditor: Make "Complete switch statement" quickfix more visible
Do not require the cursor to be on the "switch" keyword, but allow it to
be anywhere within the switch construct.

Fixes: QTCREATORBUG-5379
Change-Id: Ic25504237b3ef12958f339d7176dfeeac6bd3466
Reviewed-by: Christian Stenger <christian.stenger@qt.io>
2021-02-04 11:19:53 +00:00
Alexis Jeandet
303008a09a Meson plugin: Fix segfault when switching build type
Change-Id: I837e0a7ba8dd731438d36cfb766fd60c9643be73
Reviewed-by: hjk <hjk@qt.io>
Reviewed-by: Eike Ziller <eike.ziller@qt.io>
2021-02-04 09:28:41 +00:00
David Schulz
45fa8894bd LanguageServerProtocol: add new format options
see https://microsoft.github.io/language-server-protocol/specifications/
specification-3-15/#version_3_15_0

Change-Id: I6279ad9d8d4db706daab56efef45a13a3f8b06ae
Reviewed-by: Christian Stenger <christian.stenger@qt.io>
2021-02-04 08:53:14 +00:00
Eike Ziller
cb96b91dd4 Refactor Locator filter settings saving
Unify setting saving. Do not write settings that stay at the default, so
defaults could change and take effect.

For this we explicitly differentiate between default and user settings.
Make QJsonDocument the basis for saving settings, because QDataStream
cannot really handle structured data where parts could be missing.

Write locator settings to a different settings group, so we do not
destroy reading older settings from older Qt Creator versions.

Task-number: QTCREATORBUG-24762
Change-Id: I5909e2d79313f6fc26159bb644fdfb43781b6c38
Reviewed-by: David Schulz <david.schulz@qt.io>
2021-02-04 07:33:10 +00:00
Eike Ziller
b47a80c5ce CMake/iOS: Set up CMake configuration
For Qt6/iOS we need to use the Xcode generator, and set
CMAKE_OSX_SYSROOT, CMAKE_OSX_ARCHITECTURES, and the Qt toolchain file
with CMAKE_TOOLCHAIN_FILE.

We also may not automatically add the CMAKE_SYSROOT and
CMAKE_C(XX)_COMPILER_TARGET variables, since this is handled differently
for iOS targets.

With this building, running and debugging on the simulator works, if the
CMake project correctly sets up a MACOSX_BUNDLE_GUI_IDENTIFIER,
MACOSX_BUNDLE_BUNDLE_VERSION, MACOSX_BUNDLE_SHORT_VERSION_STRING and
MACOSX_BUNDLE_LONG_VERSION_STRING.

For the device build the signing and provisioning details are still
missing.

Task-number: QTCREATORBUG-23574
Change-Id: I12be0d102b57d834d7cae06c87842638f693c087
Reviewed-by: Cristian Adam <cristian.adam@qt.io>
2021-02-04 07:28:02 +00:00
Christian Stenger
3468d30286 QmlDesigner: Fix build for Qt5.14
Amends 59488d9606.

Change-Id: I70fd3f962de5abb6254a406263df2ea61c7e9bcc
Reviewed-by: Tim Jenssen <tim.jenssen@qt.io>
2021-02-04 07:26:01 +00:00
Tom Praschan
f626e27370 FakeVim: Add emulation for vim-commentary
Change-Id: I34f222182835ae160e6c4c66ad0bada79d8abeff
Reviewed-by: hjk <hjk@qt.io>
2021-02-03 17:58:22 +00:00
Tom Praschan
b1f1ecb1b5 FakeVim: Fix dot command for pasting
Fixes: QTCREATORBUG-25281
Change-Id: Ic36b87672889442520941bcefa0f5ee14b77fbc6
Reviewed-by: Lukas Holecek <hluk@email.cz>
Reviewed-by: hjk <hjk@qt.io>
2021-02-03 17:58:02 +00:00