Commit Graph

68568 Commits

Author SHA1 Message Date
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
Christian Kandeler
bcde1ead55 Fix qbs build
Change-Id: I2e5e385a938343b2dbc487f79e3cf6c7fb2199fa
Reviewed-by: Fabian Kosmale <fabian.kosmale@qt.io>
2021-02-03 16:54:42 +00:00
hjk
108d06c83f Debugger: Fix attaching to certain processes
On platforms without /proc (Mac...) we use 'ps' to retrieve process
lists, previously with '-o pid,comm,args'. This cuts off parts of
the executable names that are 'too long' or contain spaces. Work around
by running ps twice to retrieve arbitrarily long lines.

Fixes: QTCREATORBUG-25286
Change-Id: I617b62ccb61e90a1b43b6bdd822be0f50657504e
Reviewed-by: Christian Kandeler <christian.kandeler@qt.io>
2021-02-03 15:57:22 +00:00
Fawzi Mohamed
d5fc1acf67 qmljs: convert QStringView -> QString in +=
+= using QStringView is available only in newer Qt

Change-Id: I67e1cbbfcba07cca826ee4353d0cac08bf46defe
Reviewed-by: Fabian Kosmale <fabian.kosmale@qt.io>
Reviewed-by: Christian Kandeler <christian.kandeler@qt.io>
2021-02-03 15:05:29 +00:00
Fawzi Mohamed
7015ef04b7 qmljs: add check for comparisons not depending on values
currently we mainly try to warn about primitive == null/undefined or
primitive === non primitive.
There are other that we could warn about null==null null==undefined,
but I feel that they might be triggered too much by clean code.

Change-Id: Id43d838d60a4e13f361be34e4bb38211777a081e
Reviewed-by: Fabian Kosmale <fabian.kosmale@qt.io>
2021-02-03 14:05:16 +00:00
Fawzi Mohamed
cc00af8334 qmljs: fix qmljscheck
* fix ASTVariableReference::value: correctly get reference value type
by using either initialiser of bindingTarget (broken since a codemodel
update in 2018)
* disable warning for casting in bool to null comparison (it does not
cast, is always false)
* fix property checks (where skipped without default of readonly)
* remove non relevant checks (ErrInvalidPropertyType for lowercase  now that custom
value types are supported, and for properties called data)
* updated import version

Change-Id: I38407acf327d0f773b38dda4c02fb4d95a420851
Reviewed-by: Fabian Kosmale <fabian.kosmale@qt.io>
2021-02-03 14:03:44 +00:00
Bernhard Beschow
4f96e397d2 Nim: Resolve duplicate code
Both NimParser implementations were exactly the same code but only one
got tested.

Change-Id: Icdd8badfe60c8d2d8d3184b8307bd3ab67aee95e
Reviewed-by: Filippo Cucchetto <filippocucchetto@gmail.com>
Reviewed-by: hjk <hjk@qt.io>
2021-02-03 13:53:49 +00:00
Sergey Levin
4d1b7d4c3d Update run configuration after device change
The run configuration name defaults to "<executable> (on <device>)".
When another device is selected e.g. using the MiniProjectTargetSelector
or Kits->Device option, the <device> part in run configuration name is
not updated and keeps referring to the initially selected device.

Change-Id: Idda828b7f33b754d3b50268d7417c9a2790db30e
Reviewed-by: Christian Kandeler <christian.kandeler@qt.io>
2021-02-03 12:45:07 +00:00
Tim Jenssen
59488d9606 qmlpuppet: call engine()->setUiLanguage
so qml components can react on it

Change-Id: I31dc46fabeef0936accd23ed22cbebfe2cd8663c
Reviewed-by: Thomas Hartmann <thomas.hartmann@qt.io>
2021-02-03 10:32:27 +00:00
Fawzi Mohamed
5c1cbf6b3f qmljs: support inline components
* add inline components to bind.
* inserts inline components in the component that contains them (makes
  Context:lookupType simpler)
* unify Context:lookupType overloads without adding extra heap allocations
  using a template (avoid code duplication)
* add tests for inline components
* warn about nested components
* use model manager to load dependencies in tst_check (old test did
  not load dependencies and simply skipped all checks on imports)

Fixes: QTCREATORBUG-24766
Fixes: QTCREATORBUG-24705
Change-Id: Ibcade7752cdaa08e960f66db3a724ab7fb3268cf
Reviewed-by: Fabian Kosmale <fabian.kosmale@qt.io>
2021-02-03 09:53:08 +00:00
Fawzi Mohamed
b8d99af6fd qmljs: fix arrow function reformatting
This is mainly just making sure that token that are "empty" are really
empty (to avoid writing them out in the reformatter), but still
contain the correct location (for error messages using for example
firstSourceLocation()).

Introduce a SourceLocation::zeroLength() method to make this change
simpler to do.

QtCreator does not run qlalr automatically, so it is "polluted" by the
updated generated files.

Fixes: QTCREATORBUG-25198
Change-Id: I0ab19fb380ee3d9a7d9e05d104fe313468f52703
Reviewed-by: Fabian Kosmale <fabian.kosmale@qt.io>
2021-02-03 09:52:40 +00:00
Timon Riedelbauch
002db1fa42 add special characters \u \U \l \L to fakevim substitute command
vim substitute (:s/) hast the option to use special characters
\u \U \l \L in the replacement part to change the case of the
following letters. This was not present in fakevim.

Change-Id: I13785db24018283c242d94fd7892765657570176
Reviewed-by: hjk <hjk@qt.io>
2021-02-03 09:34:54 +00:00
Leena Miettinen
d1934fa1c4 Doc: Fix the path to Qt Bridge installation package
The Tools folder was missing from the instructions for Windows,
which confused many users.

Change-Id: I0bed62b8064456832d89bbce80c2b3955e730c06
Reviewed-by: Vikas Pachdha <vikas.pachdha@qt.io>
2021-02-03 08:22:46 +00:00
Denis Shienkov
e106fd0090 Debugger: Handle missing {lsb|msb} tags in SVD file
The SVD file format describes the possible presence of tags
`<lsb></lsb>` and `<msb></msb>` to describe the bit fields
of the register data:

 * https://www.keil.com/pack/doc/CMSIS/SVD/html/schema_1_2_gr.html

So, we need also implement parsing for such tags from the SVD files.

Task-number: QTCREATORBUG-24414
Change-Id: I968cdfb4c86bfed0aac212c3f3a4376c8ee93ffe
Reviewed-by: hjk <hjk@qt.io>
2021-02-02 15:03:54 +00:00
hjk
977b999248 Debugger: Initialize DumperBase.output
This was used uninitialized in some put call from lldbridge's
disassembler.

Change-Id: I5a3ecf075dfd4a6c4e8a483f9f8172e295329ad0
Reviewed-by: David Schulz <david.schulz@qt.io>
2021-02-02 14:07:01 +00:00
Eike Ziller
b54ab67705 Merge remote-tracking branch 'origin/4.14'
Conflicts:
	src/plugins/mcusupport/mcusupportoptions.cpp
	src/plugins/qmldesigner/assetexporterplugin/componentexporter.cpp

Change-Id: I337d1b86f54ad4433a3ed0d73e2011654ef6b950
2021-02-02 12:20:00 +01:00
Eike Ziller
91db1b51ab Fix compilation by not using optional from std
Amends 874029809f

Change-Id: I7eee4700a67b429fa2012389c39a0c965443a065
Reviewed-by: Jarek Kobus <jaroslaw.kobus@qt.io>
2021-02-02 11:03:45 +00:00
Miikka Heikkinen
cb1dc81c86 QmlDesigner: Generate icons and preview for HDR images
Copied HDR texture generation algorithm from QtQuick3D and modified it
to create pixmaps for asset icon and navigator preview images.

Fixes: QDS-3684
Change-Id: Ia7f1240bbeb4a23c00fb8cb2685e769c2b599abb
Reviewed-by: Mahmoud Badri <mahmoud.badri@qt.io>
Reviewed-by: Thomas Hartmann <thomas.hartmann@qt.io>
2021-02-02 09:45:22 +00:00
Miikka Heikkinen
dd1c89aa22 QmlDesigner: Allow using assets from entire project in subfolders
If editing a subcomponent qml, assets tab now lists assets from the
entire project, and url/font choosers list appropriate resources
from entire project with correct relative paths.

Fixes: QDS-3638
Change-Id: I4a066c30d1bd696e8edbd17754bb9df2b7880873
Reviewed-by: Thomas Hartmann <thomas.hartmann@qt.io>
Reviewed-by: Mahmoud Badri <mahmoud.badri@qt.io>
2021-02-02 09:41:57 +00:00
Jarek Kobus
8731325ce8 Use invokeMethod instead of single shot timer with 0 timeout
Change-Id: I3ffc4bfdbc6fc58d4b90aa53427eb80653c22b65
Reviewed-by: Eike Ziller <eike.ziller@qt.io>
2021-02-02 08:15:36 +00:00
Jarek Kobus
e3ae92bc5f TextEditor: Use invokeMethod instead of singleShot timer with 0 delay
Use QCoreApplication::instance() as a context object for the
IAssistProposal deleter.

Change-Id: Idf8cd1955dca146a500da1ea036298455c8a5da1
Reviewed-by: Eike Ziller <eike.ziller@qt.io>
2021-02-02 08:15:28 +00:00
Mattias Johansson
2081038953 Add gdb tracepoint support for Linux
Change-Id: Id2e46bae576a730f8c1b64a247aeed12e6d721af
Reviewed-by: hjk <hjk@qt.io>
2021-02-02 07:36:07 +00:00
Christiaan Janssen
70670cad23 McuSupport: Do not add clang to PATH when creating a new kit (1.7+)
Fixes: UL-3591
Change-Id: I7ec618aeb28bb8e79733267056d5c4c0ff7ba382
Reviewed-by: Alessandro Portale <alessandro.portale@qt.io>
2021-02-02 07:34:52 +00:00
Jarek Kobus
874029809f Compile fix: use Utils::optional instead of std::optional
Amends d9cd74f06d

Change-Id: Ic4a971fa2fb4659784afdc19f5b8db6a378f611e
Reviewed-by: hjk <hjk@qt.io>
2021-02-02 07:34:46 +00:00
Björn Schäpers
25e7b2c5d6 clangformat: Fix build with LLVM 12
Change-Id: I493afce92b16291cf66fc510129f2154a7162847
Reviewed-by: David Schulz <david.schulz@qt.io>
2021-02-01 21:04:47 +00:00
Marco Bubke
e34eb170dc QmlDesigner: Add an reason parameter to the image cache abort callback
Sometimes we abort the request, sometimes it failed. In the first case
we maybe want the cancel the imageprovider request, in the second we
return an empty image.

Fixes: QDS-3388
Change-Id: Iaef76aa09ac734795f86447e1a7cf6a5c7b5ae81
Reviewed-by: Thomas Hartmann <thomas.hartmann@qt.io>
Reviewed-by: Henning Gründl <henning.gruendl@qt.io>
2021-02-01 16:24:16 +00:00
Marco Bubke
62582877f6 QmlDesigner: Fix flacky test AsynchronousImageCache.WaitForFinished
Change-Id: I94afa8ec2925b85f5dbf44e7b2ad5db484f48148
Reviewed-by: Thomas Hartmann <thomas.hartmann@qt.io>
2021-02-01 16:06:23 +00:00
Marco Bubke
6a0cfc0c6e QmlDesigner: Fix flacky test ImageCacheGenerator.WaitForFinished
Change-Id: I7c08ec68d20a54e125805ad98f87879c99b1aad3
Reviewed-by: Thomas Hartmann <thomas.hartmann@qt.io>
2021-02-01 16:06:19 +00:00
Marco Bubke
1cf09e5979 QmlDesigner: Compress generator tasks
A document change can generate new image request and if the are not in the
database new task for the collector are generated. But if there are already
tasks for an equal id they would generated twice. So the tasks are now
merged. The auxilialry data is not merged because it is expected that
it is not changing.

Task-number: QDS-3388
Change-Id: Id1aceb564dd9dc7c5a1ea5ae4680d7ee36611cda
Reviewed-by: Thomas Hartmann <thomas.hartmann@qt.io>
2021-02-01 16:06:13 +00:00
Marco Bubke
eb614457ee QmlDesigner: Do only clean image cache if the target changed
Task-number: QDS-3388
Change-Id: I159f70b2bc2f874203392befea566e4c52de7347
Reviewed-by: Thomas Hartmann <thomas.hartmann@qt.io>
2021-02-01 16:06:09 +00:00
Leena Miettinen
460f1d3ecd Doc: Describe Debugging Helper Customization field
We have several user questions and bug reports about
SIGSTOP preventing users from debugging, so use SIGSTOP
signal handling as an example.

Task-number: QTCREATORBUG-24500
Change-Id: I2243d45ef4f5354a15712567882861053d3d6a7a
Reviewed-by: hjk <hjk@qt.io>
2021-02-01 15:28:50 +00:00
Jarek Kobus
27334cbe6d Compile fix in case of when HELP_NEW_FILTER_ENGINE is undefined
Amends 8d06e66c49

Change-Id: Ia7a81ed754c9f5cad9d9d51a89b9e1e1a7eddd03
Reviewed-by: Eike Ziller <eike.ziller@qt.io>
2021-02-01 13:05:15 +00:00
Jarek Kobus
d3ffbea8a0 Remove unused icon field
Change-Id: I63069ef2ef5af46009fb10a346c428604818016f
Reviewed-by: Eike Ziller <eike.ziller@qt.io>
2021-02-01 12:11:54 +00:00
Eike Ziller
59003d4123 iOS: Do not restrict deploy step to qmake
It doesn't use any information from the qmake project manager, and works
for e.g. CMake as well.

Change-Id: If8348de45b9d5d2ce104ad6004c890508694db9d
Reviewed-by: Cristian Adam <cristian.adam@qt.io>
2021-02-01 12:08:44 +00:00
Eike Ziller
495889cb8f iOS: Provide more information when things go wrong with the Simulator
Error messages tend to be posted on stderr, so read all output in
addition to stdout-only, and provide that for error message.

Change-Id: I5f7f38ba1db13ab37cb7a752b4b73c9a9779a57c
Reviewed-by: Vikas Pachdha <vikas.pachdha@qt.io>
2021-02-01 12:08:25 +00:00
Eike Ziller
3a294f670d iOS/CMake: Pass correct bundle name
Task-number: QTCREATORBUG-23574
Change-Id: Ifb4b6d25a8542796af92c0d35523acd104daf2aa
Reviewed-by: Cristian Adam <cristian.adam@qt.io>
2021-02-01 12:08:14 +00:00
Vikas Pachdha
d3b5e373b8 AssetExport: Add typeId and typeName to component instances
typdId is required to identify the instance's component while
generating PSDs

Task-number: QDS-2811
Change-Id: I61e0fe977e252c9c2aaeacd425b057c92a7c5b49
Reviewed-by: Leena Miettinen <riitta-leena.miettinen@qt.io>
Reviewed-by: Thomas Hartmann <thomas.hartmann@qt.io>
2021-02-01 10:41:22 +00:00
Jarek Kobus
8d06e66c49 HelpIndexFilter: use atomic_bool for the m_needsUpdate field
This will simplify the code, no need for mutex anymore.

Change-Id: I85e0cad7ed3b3288ae1eec03f7504590293c4ea5
Reviewed-by: Eike Ziller <eike.ziller@qt.io>
2021-02-01 10:35:58 +00:00
Miikka Heikkinen
384cc3c022 QmlDesigner: Refactor font collector
Fixes: QDS-3643
Change-Id: Iacc26eb0d0cbaad9d9242b548588f3afa3eba2ac
Reviewed-by: Mahmoud Badri <mahmoud.badri@qt.io>
Reviewed-by: Thomas Hartmann <thomas.hartmann@qt.io>
2021-02-01 09:07:12 +00:00
Miikka Heikkinen
5b582e042b QmlDesigner: Improve HDR image support
HDR images imported to the project are now shown on asset tab, though
they will only have the system default icon as Qt 2D rendering doesn't
support HDR images.

HDR images can also now be dragged into navigator, behaving like other
images when dragged into 3D elements that support them, or creating
a new Texture item if dragged elsewhere.

Task-number: QDS-2128
Change-Id: I16a23e93a2a51d65a2278400d3c6c6ffd3b62615
Reviewed-by: Thomas Hartmann <thomas.hartmann@qt.io>
Reviewed-by: Mahmoud Badri <mahmoud.badri@qt.io>
2021-02-01 09:06:23 +00:00
Tim Jenssen
368864a0af qmldesigner: fix invalid target.id() call
Task-number: QDS-3333
Change-Id: Id63a376e3d483c41a979b5d776a1f1cfc6c30682
Reviewed-by: Thomas Hartmann <thomas.hartmann@qt.io>
2021-02-01 08:45:38 +00:00
Björn Schäpers
d9cd74f06d Texteditor: Add ability to get margin from indenter
And implement it in the clang-format plugin to use the ColumnLimit from
the style. This would be quite useful if you're working on different
projects with a different ColumnLimit. This way you get an visual
representation and do not only have to rely on clang-format.

Change-Id: Ib0258e3fba6f45f0f46ce612f806527a47868ad9
Reviewed-by: Leena Miettinen <riitta-leena.miettinen@qt.io>
Reviewed-by: David Schulz <david.schulz@qt.io>
2021-01-29 17:03:07 +00:00
Jarek Kobus
069efa9483 CommandLocator: move some part of the matching code into prepareSearch
We can't call neither Command::isActive() nor QAction->isEnabled()
from inside matchesFor(), as this function is called from non-gui
thread and it may happen, that the gui thread modifies these data
at the same time. Instead we prepare the needed data inside
prepareSearch().

Change-Id: Ie9ddb8eb7df2c39e968ef117caf3ef1d04ed6a80
Reviewed-by: Eike Ziller <eike.ziller@qt.io>
2021-01-29 16:19:56 +00:00
Jarek Kobus
be1d33299e Use invokeMethod instead of single shot timer with 0 timeout
Refactor it in coreplugin.

Change-Id: I6aaad1b9270a8ff8a4a0bea6a1fff806b2fe190b
Reviewed-by: Eike Ziller <eike.ziller@qt.io>
2021-01-29 15:24:41 +00:00
Jarek Kobus
9c646d55cd Move the BookmarkFilter's matching into the main thread
We can't operate directly on the BookmarkManager and Bookmark instances
in the other thread, as they may be freely modified in the gui
thread in the same time. Since it's uncommon to have
hundreds of bookmarks set, we prepare all the needed data in the
main thread instead, which shouldn't slow down the locator
significantly.

Change-Id: I9df0a8425694632c40138fbe3667499f7fc03432
Reviewed-by: Eike Ziller <eike.ziller@qt.io>
2021-01-29 15:20:36 +00:00
Jarek Kobus
64fc8a1fb6 DocumentLocatorFilter: protect with mutex a check for symbol cache
The value of m_symbolCache may change at any time in gui thread
inside a call to updateCurrentClient().

Change-Id: I6aad37281ce8ec08f7b0ea5b2143e28dee507f72
Reviewed-by: Eike Ziller <eike.ziller@qt.io>
2021-01-29 15:20:09 +00:00
Jarek Kobus
13f4519ed4 FileSystemFilter: store the value of includeHidden in prepareSearch()
Since we don't guarantee the synchronization between a call
to openConfigDialog() and matchesFor(), it may happen that
these two methods are called simultaneously by two different
threads. In theory, the value of m_includeHidden may be changed
in gui thread by a call to openConfigDialog(), while at the same
time it may be read in other thread, inside matchesFor().
As a safe solution we make a copy of this value inside prepareSearch()
and use the copy later in matchesFor().

Change-Id: I83fb184ff1914e4c02ee799464ff0d89350ab49c
Reviewed-by: Eike Ziller <eike.ziller@qt.io>
2021-01-29 15:19:47 +00:00