Commit Graph

75236 Commits

Author SHA1 Message Date
Thomas Hartmann
f31638c856 QmlDesigner: Allow Timer in ui.qml files
Change-Id: I0fbf7270f8514b212fab5aae89d2def11d6b53bd
Reviewed-by: <github-actions-qt-creator@cristianadam.eu>
Reviewed-by: Thomas Hartmann <thomas.hartmann@qt.io>
2022-08-16 15:26:37 +00:00
Knud Dollereder
9610698c66 Allow editing keyframe values for other types than double
Currently, the setKeyframeValue dialog only supports a
QDoubleSpinbox as value field. When using this dialog to
edit keyframe values of different type, they need to be
converted which fails for some types (QColor).
With this patch the dialog creates a dedicated control
for each value type. In case the type is not caught it falls
back to the old behavior.

Fixes: QDS-6949
Change-Id: Icbaa2af24f06418fa60648d23269f1a12c08f9de
Reviewed-by: <github-actions-qt-creator@cristianadam.eu>
Reviewed-by: Thomas Hartmann <thomas.hartmann@qt.io>
2022-08-16 15:26:29 +00:00
Christian Kandeler
685c3ee4cb ClangTools: Support doc urls for pre-relase clang-tidy
Change-Id: I9c28b5846d576d0b17c2e36f790d59b6bb005f6b
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-16 14:04:55 +00:00
Artem Sokolovskii
74ac09346f CodeStyle: Remove edit pop-up
Removed the Edit pop-up on the CodeStyle page.
Now editing is available immediately after opening
CodeStyle tab.
I left a preview on the project CodeStyle page and
added a link to global settings.

ToDo:
In project CodeStyle page replace preview with CodeStyleEditor.
I'm not 100% sure that it is needed. If you have some thoughts
please write a comment.

Change-Id: I31032a97b9668b4f6b06fc6c5c704700fb44ee4f
Reviewed-by: Christian Kandeler <christian.kandeler@qt.io>
2022-08-16 11:49:19 +00:00
Marcus Tillmanns
4f0ac5678f FilePath: Fix operator+ to use stringAppend instead of pathAppended
Change-Id: I643a2e9eed22fafc793bbc75cba0344c4005b3f3
Reviewed-by: <github-actions-qt-creator@cristianadam.eu>
Reviewed-by: David Schulz <david.schulz@qt.io>
2022-08-16 11:35:12 +00:00
Christian Kandeler
91d568180d ClangTools: Fix clang-tidy documentation URLs
The model for the clang-tidy checks absurdly uses a FilePath-based base
class, and after cd919e6f61 started
producing wrong URLs. Work around that.

Change-Id: I8ef4f678c3abf991ada1a2955baa3d1ec13a195b
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-16 11:09:29 +00:00
Christian Kandeler
725c36e8d0 CppEditor: Keep offering "Extract Function" after all
As it turns out, there are some bugs in clangd that prevent this
functionality from working in some circumstances.
This effectively reverts 840263eb9a.

Fixes: QTCREATORBUG-28030
Change-Id: I511eb9a5cc45e3fd5e3cc25898aebb493f1ba3d3
Reviewed-by: David Schulz <david.schulz@qt.io>
Reviewed-by: Qt CI Bot <qt_ci_bot@qt-project.org>
Reviewed-by: <github-actions-qt-creator@cristianadam.eu>
2022-08-16 11:08:22 +00:00
Alessandro Portale
801ff295f6 Help: Remove filternamedialog.*
Unused code.

Change-Id: Icfcd613d63f549655ac62daa82e9a7e6f5c78d6c
Reviewed-by: Jarek Kobus <jaroslaw.kobus@qt.io>
2022-08-16 10:45:46 +00:00
David Schulz
b39c7cd782 CppEditor: remove unneeded indirection for the outline model
Change-Id: I01e9fb0dae30d6df22c0f5d7255ab247c48749fc
Reviewed-by: <github-actions-qt-creator@cristianadam.eu>
Reviewed-by: Christian Kandeler <christian.kandeler@qt.io>
2022-08-16 07:53:41 +00:00
Henning Gruendl
305517f212 QmlDesigner: Fix floating widgets on start up
Task-number: QDS-7423
Change-Id: I273b8a3926b574f4ec61500b798bff578684cb1f
Reviewed-by: Brook Cronin <brook.cronin@qt.io>
Reviewed-by: Thomas Hartmann <thomas.hartmann@qt.io>
Reviewed-by: Qt CI Bot <qt_ci_bot@qt-project.org>
2022-08-15 15:10:41 +00:00
Knud Dollereder
fea338c000 Move keyframes horizontally when shift is pressed
It is now possible to move keyframes in the curve editor
in the x direction only by pressing shift while dragging.

Fixes: QDS-6952
Change-Id: Ic1a25ec6d8dec82cf5599dccbaeff7e5f34d2936
Reviewed-by: <github-actions-qt-creator@cristianadam.eu>
Reviewed-by: Thomas Hartmann <thomas.hartmann@qt.io>
2022-08-15 14:00:20 +00:00
Jarek Kobus
8703bcd777 VcsCommand: Don't cancel finished task from d'tor
Amends a5683616b9

Change-Id: I6b746dfa444737e87c98b878c017374f2034d400
Reviewed-by: Orgad Shaneh <orgads@gmail.com>
2022-08-15 10:58:51 +00:00
Thomas Hartmann
675e63e658 QmlDesigner: Prepare States Editor for States not in the root node
Change-Id: I612de64447f04a041aa20b1ebc02c7fb6049eb03
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-15 09:09:30 +00:00
hjk
144cefcf43 Utils: Use QStringView for LineColumn::extractFromFileName
Change-Id: I006773a2cd42be1009cece45bb2174d6c1ea143f
Reviewed-by: David Schulz <david.schulz@qt.io>
2022-08-12 10:09:16 +00:00
Christian Kandeler
4c9860d582 ClangTools: Adapt to new clang-tidy documentation URL pattern
See https://github.com/llvm/llvm-project/commit/
6e566bc5523f743bc34a7e26f050f1f2b4d699a8

Change-Id: Ifbb7bc1c09a890aef02611a8d0ae10b8217773d7
Reviewed-by: <github-actions-qt-creator@cristianadam.eu>
Reviewed-by: David Schulz <david.schulz@qt.io>
2022-08-12 08:31:57 +00:00
Christian Kandeler
bd00cc8bf8 LanguageClient: Introduce timeout for restart counter
While it makes sense to stop trying to restart a continuously crashing
server, the restart counter should be reset regularly, as it's not
critical if the server restarts "once in a while" during a longer
programming session.

Change-Id: Ia2efca28ae4a4dba72da947d9eb776e3909d0cb3
Reviewed-by: <github-actions-qt-creator@cristianadam.eu>
Reviewed-by: David Schulz <david.schulz@qt.io>
2022-08-11 14:12:35 +00:00
Marcus Tillmanns
2635d62721 Dumper: Show error message if module fails to load
Change-Id: Id4e445f71f70f0b07ccc4c4ffb25502607263dec
Reviewed-by: hjk <hjk@qt.io>
2022-08-11 14:02:30 +00:00
Marcus Tillmanns
50bedd5544 FilePath: Fix UNC root/path parsing
* Fixed UNC path parsing to correctly split between root and path
* Fixed tst_fileutils to correspond to windows path handling.

Change-Id: I2849738696a39e8282068ab164514f806f2c5fcf
Reviewed-by: Qt CI Bot <qt_ci_bot@qt-project.org>
Reviewed-by: hjk <hjk@qt.io>
2022-08-11 13:54:14 +00:00
Marcus Tillmanns
e31d7b227e Debugger: Fix crash when showing characters > 0x7FFFFFFF
Change-Id: If9e1e235ea7b5288a29ca8f3a17e75dea3c57978
Reviewed-by: hjk <hjk@qt.io>
Reviewed-by: <github-actions-qt-creator@cristianadam.eu>
2022-08-11 13:52:29 +00:00
Christian Stenger
b3f1c73aef CMakePM: Change default for package manager include
Change-Id: I003e315139fea643d19f15e8eb2f3b950fab79d5
Reviewed-by: hjk <hjk@qt.io>
Reviewed-by: David Schulz <david.schulz@qt.io>
Reviewed-by: Cristian Adam <cristian.adam@qt.io>
Reviewed-by: Kai Koehne <kai.koehne@qt.io>
2022-08-11 13:38:00 +00:00
Miikka Heikkinen
45f93a817a QmlDesigner: Add environment and model selectors to material preview
The model and the scene environment used to render material previews
can now be selected via buttons next to the preview in material editor.

Task-number: QDS-7347
Change-Id: I03089029e8420f80ed65be1c7b7a1ce4581f2fd4
Reviewed-by: Mahmoud Badri <mahmoud.badri@qt.io>
Reviewed-by: Qt CI Bot <qt_ci_bot@qt-project.org>
2022-08-11 13:33:59 +00:00
Christian Kandeler
1844788a0c qbs build: Fix QtcProcess test helper executable
We need to set the rpath, otherwise libUtils won't be found when using
the AutotestRunner.

Change-Id: I5644a5b52441482f48b461a28d57c17b2371d66f
Reviewed-by: <github-actions-qt-creator@cristianadam.eu>
Reviewed-by: Christian Stenger <christian.stenger@qt.io>
2022-08-11 12:48:16 +00:00
Christian Kandeler
551cd3f65b Tests: Make the memcheck model test exit
Otherwise, it will block "make check".
This test is a manual test and does not belong into the autotest
category at all, but as long as it's there, make at least sure it
doesn't break things.

Change-Id: Ib4c2c5b8e840b3f1ac1f4cca2ec4869385484e77
Reviewed-by: <github-actions-qt-creator@cristianadam.eu>
Reviewed-by: Christian Stenger <christian.stenger@qt.io>
2022-08-11 10:59:23 +00:00
Marcus Tillmanns
7e092f2e09 jsonwizard: Fix check for icon
The jsonwizardfactory did not check if the template contained
an icon. Due to a bug in FilePath::resolvePath() which previously
returned "/" instead of "" for empty paths, the "iconPath.exists()"
check would always return "true".

With this change, the existence of the icon is only checked, if
an icon was supplied by the template in the first place.

Change-Id: I3252a6b92b34433835ab0e6e04857114ea895b46
Reviewed-by: Alessandro Portale <alessandro.portale@qt.io>
2022-08-11 09:32:47 +00:00
Marcus Tillmanns
a1fd70c1a4 Debugger: Correctly display > 2 byte characters in strings
The "escapeUnprintable" function previously iterated through the
QString QChar by QChar. Since QChar only represents UTF-16 it would
erroneously split 4 byte characters into two characters that were
no longer printable.

To workaround, we first convert the QString to a UTF32 ByteArray
and iterate over each of the characters. This allows us to
correctly distinguish between non- printable characters.

Change-Id: I5552a79a91678994868441e67f967c68329aa1ce
Reviewed-by: hjk <hjk@qt.io>
2022-08-11 09:31:52 +00:00
Marcus Tillmanns
cd919e6f61 FilePath: Fix for operator+(QString)
Change-Id: I3b9889c8b2cdc8a9d1bf94c3e7a8627e2ff2ac35
Reviewed-by: hjk <hjk@qt.io>
2022-08-11 09:31:26 +00:00
Marcus Tillmanns
aeb33310cb FilePath: Fix parsing of qrc paths
Change-Id: I50d404bafb8d1cb4f0663cd424e1034ae26bb903
Reviewed-by: hjk <hjk@qt.io>
2022-08-11 07:57:51 +00:00
Marcus Tillmanns
3af72077a0 Debugger: Fix crash when showing characters > 0xffff
Change-Id: I8eb1492f7ba9fbe846e18e7e93bd8ca57edf177d
Reviewed-by: hjk <hjk@qt.io>
2022-08-11 07:57:37 +00:00
hjk
4c16c221a1 Tests: Add a manual test for layoutbuilder demonstration
Change-Id: If59265c429a67e5627d41d242fb8fc828f469e93
Reviewed-by: <github-actions-qt-creator@cristianadam.eu>
Reviewed-by: Christian Stenger <christian.stenger@qt.io>
2022-08-11 07:32:21 +00:00
Fawzi Mohamed
774010d96e Add information on how to set up qmlls
Fixes: QTCREATORBUG-28025
Change-Id: Id9a74a15f1fd716f714e8f87fc2d986f9b952e94
Reviewed-by: Fabian Kosmale <fabian.kosmale@qt.io>
2022-08-11 07:08:00 +00:00
hjk
832c919404 Android: Use more LayoutBuilder in AndroidBuildApkStep
Change-Id: I77f2a74916ab5cde9a00fa0cc1e9bf90f4ca61ef
Reviewed-by: Alessandro Portale <alessandro.portale@qt.io>
Reviewed-by: <github-actions-qt-creator@cristianadam.eu>
2022-08-11 07:02:53 +00:00
Alexander Drozdov
21d0502909 GenericProjectManager: fix project creation crash
Mitigration for regression introduced by
1548eef10b.

Labels does not created in the FileWizardPage ctor, but
accessed from the GenericProjectManager Project Creation Wizard.

Change-Id: I6c980fb9475c0c78be908ead6693c4c1dfa8b99c
Reviewed-by: <github-actions-qt-creator@cristianadam.eu>
Reviewed-by: hjk <hjk@qt.io>
2022-08-11 00:30:35 +00:00
Cristian Adam
288dfa480a tests: add README.md for manual/vcpkg
The information was present in the commit adding the test, but that's
not visible when browsing the checkout.

Amends f9ce879b61

Change-Id: If648e37ca8e3e8b84841f5e84b3ea054aa0c5b90
Reviewed-by: Alessandro Portale <alessandro.portale@qt.io>
2022-08-10 17:35:05 +00:00
hjk
8953d68f9a CppEditor: Avoid a FilePath <-> QString roundtrip
Change-Id: Ia7860e04090aee8b7fae18cdc5f2d85880f29d69
Reviewed-by: Christian Kandeler <christian.kandeler@qt.io>
2022-08-10 14:50:26 +00:00
hjk
0197a62fcf CPlusPlus: Microoptimizations
Inline some simple accessors, return references instead of copies in
some getters,

Change-Id: I136574823c79ad0c63ed354b78e1ad83908e7ae5
Reviewed-by: Christian Kandeler <christian.kandeler@qt.io>
2022-08-10 14:45:28 +00:00
Cristian Adam
f9ce879b61 tests: Add vcpkg manual test
This way one could easily test the CMake auto-setup package
manager with a vcpkg setup.

Setting vcpkg is as easy as:

> git clone https://github.com/microsoft/vcpkg
> .\vcpkg\bootstrap-vcpkg.bat

Then you need to have vcpkg in the PATH environment variable.
(PATH=${PATH};c:\projects\vcpkg in Preferences -> Environment)

Change-Id: I0bdc268121c7488c5d2442fd4b40c9ea3b182501
Reviewed-by: <github-actions-qt-creator@cristianadam.eu>
Reviewed-by: Alessandro Portale <alessandro.portale@qt.io>
2022-08-10 14:43:29 +00:00
Yasser Grimes
a8e1ab9c56 McuSupport: Fix tests and non legacy code for desktop kits
Post merge updates for the "Add toolchain information for desktop kits"
task.

Task-number: QTCREATORBUG-26750
Change-Id: Idd230589650f88d921f5f97c2bbecabac4784584
Reviewed-by: <github-actions-qt-creator@cristianadam.eu>
Reviewed-by: Piotr Mućko <piotr.mucko@qt.io>
Reviewed-by: hjk <hjk@qt.io>
2022-08-10 14:26:11 +00:00
hjk
fee3a1dc78 Utils: Add a PushButton object to LayoutBuilder
Change-Id: I1ed0fd9a940fcaa5361a7d619a5d316f646332b1
Reviewed-by: <github-actions-qt-creator@cristianadam.eu>
Reviewed-by: Christian Stenger <christian.stenger@qt.io>
2022-08-10 14:23:53 +00:00
Piotr Mućko
1a2732ee9c McuSupport: Use FilePath instead of QFile/QDir when parsing config JSONs
Change-Id: If150fcf73953a4bdeae8a0b50586d1dcf89b42a6
Reviewed-by: hjk <hjk@qt.io>
2022-08-10 14:14:31 +00:00
Christian Kandeler
9c963ce8ae LanguageClient: Do not clear shadow documents on reset
We need to preserve this information. Instead, clear only the list of
reverse document dependencies.

Change-Id: I5589d5e3eff613706ea5f2029df1f90eacbbbb4e
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>
v8.0.1
2022-08-10 11:14:56 +00:00
Christian Kandeler
93fbef4de6 ClangCodeModel: Consider the case of a restarted client
We must not assume the initialized() signal comes only once.

Task-number: QTCREATORBUG-27596
Change-Id: Ife19657b7e0701a0e0dc10806e230bd1744a20aa
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-08-10 11:14:39 +00:00
David Schulz
5db3d507dd Revert "CMake: Reload item data on CMake executable path changed"
057bb3095 makes it impossible to type in dir separators and so a valid
path to a cmake executable in the Path field of the cmake settings page.

This reverts commit 057bb3095b.

Change-Id: I3edbdced8eaac15f34ca43acf1e86f4be6cd9be7
Reviewed-by: hjk <hjk@qt.io>
Reviewed-by: Cristian Adam <cristian.adam@qt.io>
2022-08-10 10:12:38 +00:00
Alessandro Portale
52b8b51b32 ScxmlEditor: Prevent crash
Create the connection after populating the combobox prevents an
assertion.

Change-Id: I35be1cf724ed7084123e7070b377b50274132e55
Reviewed-by: hjk <hjk@qt.io>
2022-08-10 07:56:26 +00:00
Marco Bubke
c13e2b89f5 QmlDesigner: Add type enumeration to auxiliary data
Auxiliary data so far used naming conventions to declare the kind of the
data. Now an enumeration is used. The auxiliaryData(...) is returning an
optional too so that it is known if a value exists. There is now
auxiliaryDataWithDefault(...) which is returning an invalid
QVariant instead.

The instance cache is now disabled because there is not notification for
information changes. So if we get the real data from the node instances
there will be no information changes because nothing changed. So the
form editor is a strange state of being reset but not all data
arrived. Before this patch there were still changes happen because of
some side effects that auxiliary properties were sent which were never
intended to be sent. If we re-enable the cache we need to send
information changes or every view must expect that the information is
already there.

Task-number: QDS-7338
Change-Id: I0cafd149c53df552c7c8442f1e8ba87f5451dbd1
Reviewed-by: Aleksei German <aleksei.german@qt.io>
Reviewed-by: Qt CI Bot <qt_ci_bot@qt-project.org>
2022-08-09 17:52:03 +00:00
Marco Bubke
fb7c814a3b QmlDesigner: Fix flacky tests
Change-Id: If6de687acc678d925c62d73d631ed081bfcaa8fa
Reviewed-by: Marco Bubke <marco.bubke@qt.io>
Reviewed-by: <github-actions-qt-creator@cristianadam.eu>
2022-08-09 12:03:25 +00:00
Marco Bubke
770bad3f2c Sqlite: Add error code for strict tables
Change-Id: I98ea3282c205c1da840e71df74c4eb7d7e73ec98
Reviewed-by: <github-actions-qt-creator@cristianadam.eu>
Reviewed-by: Marco Bubke <marco.bubke@qt.io>
2022-08-09 11:48:44 +00:00
Christian Kandeler
c86d61846d CppEditor: Speed up signal/slot check
Do the look-up only after the cheaper checks have succeeded.
Amends 0087bd492f.

Fixes: QTCREATORBUG-28035
Change-Id: I250588d3fa1a763e87452c6decb0aa7517076024
Reviewed-by: Artem Sokolovskii <artem.sokolovskii@qt.io>
Reviewed-by: <github-actions-qt-creator@cristianadam.eu>
Reviewed-by: Qt CI Bot <qt_ci_bot@qt-project.org>
Reviewed-by: Jean-Michaël Celerier <jeanmichael.celerier@gmail.com>
Reviewed-by: David Schulz <david.schulz@qt.io>
2022-08-09 10:33:51 +00:00
Christian Kandeler
ff2235bd5d CppEditor: Add missing hyphen before option names
Amends 06e2f8d8fa.

Change-Id: I514f04ce21b91c80dc15d1e0323b2d80df08aeb5
Reviewed-by: <github-actions-qt-creator@cristianadam.eu>
Reviewed-by: Qt CI Bot <qt_ci_bot@qt-project.org>
Reviewed-by: Hannes Domani <ssbssa@yahoo.de>
Reviewed-by: David Schulz <david.schulz@qt.io>
2022-08-09 10:33:10 +00:00
hjk
a356ccd0ad ProjectExplorer: Use LayoutBuilder for session management
Change-Id: I18de9933c52b147c7c2bd1f75852531e787937d8
Reviewed-by: Alessandro Portale <alessandro.portale@qt.io>
2022-08-09 10:31:04 +00:00
Artem Sokolovskii
176c3906fe ClangFormat: Fix ignoring DisableFormat option
Task-number: QTCREATORBUG-27261
Change-Id: Ib9671f5c4499a39eb40e2a269dc73328fa5ad12f
Reviewed-by: Christian Kandeler <christian.kandeler@qt.io>
Reviewed-by: <github-actions-qt-creator@cristianadam.eu>
2022-08-09 09:01:54 +00:00