Commit Graph

62421 Commits

Author SHA1 Message Date
Alexander Akulich
17f1c8d928 ClangdSettingsWidget: Use CheckBox with text instead of CheckBox+Label
This fixes vertical alignment.

Change-Id: I01b70daffba0550ec6955bd0523930edc5acc8e9
Reviewed-by: <github-actions-qt-creator@cristianadam.eu>
Reviewed-by: Eike Ziller <eike.ziller@qt.io>
2022-09-16 16:09:02 +00:00
Thomas Hartmann
39f44cf57c QmlDesigner: Fix expressions in DynamicPropertyRow and states
* States are now taken into account.
* If name is empty in expressionChanged(), then this
  is just a notifier for the QML frontend and has to be ignored.
* When exposing the expression to QML we also have to take into
  account states.
* Implementing resetting dynamic properties. We have to hardcode
  the default values for the base state
* I also implemented the callbacks in the views for PropertyChanges.

Change-Id: I08247a3c1783a52853db7bf0f7f249520f7edc1c
Reviewed-by: Miikka Heikkinen <miikka.heikkinen@qt.io>
Reviewed-by: Qt CI Bot <qt_ci_bot@qt-project.org>
2022-09-16 15:04:29 +00:00
Aleksei German
26e5b3787c QmlDesigner: Add MouseArea Shortcut
Task-number: QDS-7675
Change-Id: Ibc0bdeecbd83a063d99973fd6bc945907f4a124a
Reviewed-by: <github-actions-qt-creator@cristianadam.eu>
Reviewed-by: Thomas Hartmann <thomas.hartmann@qt.io>
2022-09-16 14:27:30 +00:00
Jarek Kobus
73e48ef275 VcsBaseDiffEditorController: Get rid of VcsCommandResultProxy
The workaround with VcsCommandResultProxy, introduced in
0b1eaacabb isn't needed anymore
since finished() and stdOutText() signals are now emitted
synchronously from the caller's thread.

Give a context object to watcher's finished handler.

Change-Id: I6608b7c2806fc0c18649ff40f91684e9eaa7b15d
Reviewed-by: Orgad Shaneh <orgads@gmail.com>
2022-09-16 11:40:12 +00:00
Alessandro Portale
60098e5fea ProjectExplorer: Remove extra margins around CustomParser widget
Change-Id: I840211296c45391bc96474220663f6a56df22fe8
Reviewed-by: Christian Kandeler <christian.kandeler@qt.io>
2022-09-16 08:40:02 +00:00
hjk
31556332f5 Utils: Make FilePath::toFSPathString a full copy of toString
Changing the toString() to prepend system-specific prefixes
to cater for the remote filesystem model handling had unintended
sideeffects.

This here is the first step to split both paths.

Change-Id: I66cdd9a87802408e2ba95c2e29b9d7cce7fe2553
Reviewed-by: Christian Stenger <christian.stenger@qt.io>
2022-09-16 08:24:20 +00:00
Christian Kandeler
f99e17efa4 CppEditor: Implement "Follow Symbol" for qrc paths in string literals
The "symbol" in this case is the file that the qrc path points to.

Task-number: QTCREATORBUG-28087
Change-Id: I0d3ff96513d51e9dde4fb378695787b839c26100
Reviewed-by: Christian Stenger <christian.stenger@qt.io>
2022-09-16 07:47:17 +00:00
Christian Kandeler
6abebbbe35 CppEditor: Remove extra CPlusPlus::Class member
Amends 0fab5956ea.
We want to avoid carrying these eight bytes ber Class instance around.
Instead, we now just replace the (anonymous) struct name with the
typedef'ed one.
Note that in C (but not C++), this is possible:
    struct S {};
    typedef struct {} S;
    struct S s1;
    S s2;
However, our code model has never respected the extra struct namespace,
so it can already not distinguish between occurrences of "S" and "struct
S".

Change-Id: I55feafea7d3a4a5848e10f7011f633a2ce0f626e
Reviewed-by: <github-actions-qt-creator@cristianadam.eu>
Reviewed-by: Christian Stenger <christian.stenger@qt.io>
2022-09-16 07:31:22 +00:00
Alessandro Portale
cc7d757a3a ClangFormat: Remove extra margins around ConfigWidget
Change-Id: I542ce841bf1144d4063190d1ec83fef7c1295248
Reviewed-by: Eike Ziller <eike.ziller@qt.io>
2022-09-16 07:28:31 +00:00
Alessandro Portale
5254261922 Utils: Remove extra upper Margin in "unexpanded" DetailsWidgets
This removes the empty space on top in the RunConfiguration settings and
QtVersion/qmake details.

Change-Id: Ibc72d3a703dd1f32aa2cfa25b33feb651aaa5098
Reviewed-by: Eike Ziller <eike.ziller@qt.io>
2022-09-16 07:28:26 +00:00
Jarek Kobus
7274cad083 VcsCommand: Always install std callbacks
Do it also in fully synchronous case, as QtcProcess
is able to handle them even when EventLoopMode is off.

Change-Id: Ic24ff34e3d8808d2aaaf0300ba4ac95662e46d23
Reviewed-by: Orgad Shaneh <orgads@gmail.com>
Reviewed-by: <github-actions-qt-creator@cristianadam.eu>
2022-09-16 07:20:21 +00:00
Marcus Tillmanns
ccf84a70af Deviceshell: Add missing #pragma once
Change-Id: Icce5152f7db505e1f0a368300b05e417e7575185
Reviewed-by: hjk <hjk@qt.io>
Reviewed-by: Jarek Kobus <jaroslaw.kobus@qt.io>
Reviewed-by: <github-actions-qt-creator@cristianadam.eu>
2022-09-16 07:12:07 +00:00
Alessandro Portale
528c44ba8a CMakeProjectManager: Remove margins around CMakeBuildStep widget
Change-Id: I9b2a1a615f987c3dff9b5fcb29b0a10c5417f752
Reviewed-by: Cristian Adam <cristian.adam@qt.io>
Reviewed-by: <github-actions-qt-creator@cristianadam.eu>
2022-09-16 05:57:37 +00:00
Christian Stenger
1e3e41da52 CppEditor: Fix test expectations
Amends ec1905c6fa.

Change-Id: I6fc886ed87ddad46396fd728ca09f430cc3a4d65
Reviewed-by: Christian Kandeler <christian.kandeler@qt.io>
2022-09-16 04:30:10 +00:00
Jarek Kobus
2b3c05ba90 VcsCommand: Handle SilentOutput
Handle SilentOutput flag into accound when runSynchronous()
to make it consistent with fully synchronous case.

Change-Id: I955714872601f8fb7ffff8d570eec5ff610d9cfe
Reviewed-by: Orgad Shaneh <orgads@gmail.com>
2022-09-15 15:26:00 +00:00
Jarek Kobus
683d2fec2d VcsCommand: Fix reporting error channel
Make error reporting consistent with runSynchronous() case,
where error channel is reported via appendError().

Amends 2c5095c94d

Change-Id: I0d962d42eb696e91f05ebb4f1f92677607b24a27
Reviewed-by: Orgad Shaneh <orgads@gmail.com>
2022-09-15 15:25:54 +00:00
Christian Kandeler
0fab5956ea CppEditor: Store typedefed name for anonymous structs
... and use it as the struct display name in some places.

Fixes: QTCREATORBUG-26611
Change-Id: I1b127f5705307a0fabd2441ff871162c882927a5
Reviewed-by: <github-actions-qt-creator@cristianadam.eu>
Reviewed-by: Christian Stenger <christian.stenger@qt.io>
2022-09-15 15:08:20 +00:00
Christian Stenger
57c5dfa840 QmlDesigner: Fix qbs build
Change-Id: I9a84c9c3babe606f5ac1b0bf19cc05084822ad35
Reviewed-by: Christian Kandeler <christian.kandeler@qt.io>
2022-09-15 14:01:06 +00:00
Thomas Hartmann
620712ed66 QmlDesigner: Take StageGroup into account in allDefinedStates
Since we add support StateGroups we also have to take them here.

Change-Id: I54a897e6edc4677e90ea64dd5c7334fc76a8f36f
Reviewed-by: Henning Gründl <henning.gruendl@qt.io>
Reviewed-by: Qt CI Bot <qt_ci_bot@qt-project.org>
2022-09-15 12:53:57 +00:00
Christian Kandeler
ec1905c6fa CppEditor: Use "-I<dir>" format rather than "-I <dir>"
... when constructing the compiler command line.
This works around a command line parsing bug in clangd 15.0.0
(https://github.com/clangd/clangd/issues/1292).

Change-Id: I7c2e7f443bfededf12db985ff5142f39035d9db6
Reviewed-by: Qt CI Bot <qt_ci_bot@qt-project.org>
Reviewed-by: Cristian Adam <cristian.adam@qt.io>
Reviewed-by: <github-actions-qt-creator@cristianadam.eu>
Reviewed-by: David Schulz <david.schulz@qt.io>
2022-09-15 12:36:54 +00:00
Eike Ziller
e57b797342 ImageViewer: Add button for saving current view settings as default
Fixes: QTCREATORBUG-27816
Change-Id: I85806634ea9f10761d281ab8c8cf892dd1b65145
Reviewed-by: David Schulz <david.schulz@qt.io>
2022-09-15 11:28:41 +00:00
Eike Ziller
e7ddd8a5b7 FilePath: Return optional bytearray from device hooks
For differentiating between "error" and "empty file".

Change-Id: I1806bb7386f5e7db28489f9f7e685648bfc20110
Reviewed-by: <github-actions-qt-creator@cristianadam.eu>
Reviewed-by: hjk <hjk@qt.io>
2022-09-15 11:28:18 +00:00
Christian Stenger
f5c22a42ae QmlDesigner: Fix compile
Amends 8aee8df4df.

Change-Id: I23b68a200f5464d39f4f5a0892617a741336301e
Reviewed-by: Miikka Heikkinen <miikka.heikkinen@qt.io>
2022-09-15 11:13:38 +00:00
Thomas Hartmann
3ce5af7a79 QmlDesigner: Remove dangling PropertyChanges and KeyFrameGroups
This removes dangling PropertyChanges and KeyFrameGroups when removing
a dynamic property.

Change-Id: I333b6a61bec34a0bcde1d19372166b3cfaea195b
Reviewed-by: Miikka Heikkinen <miikka.heikkinen@qt.io>
2022-09-15 10:38:40 +00:00
Thomas Hartmann
696b02ee28 QmlDesigner: Add convertToLiteral to BindingProperty
This helper function returns a valid QVariant if
the expression is actually a literal.

Change-Id: I756b22d66ad86294c475e92c129f9008315dfbc6
Reviewed-by: Miikka Heikkinen <miikka.heikkinen@qt.io>
2022-09-15 10:38:21 +00:00
Thomas Hartmann
26a2afea01 QmlDesigner: Sort dynamic properties by name
Change-Id: I303904872982c0464f1853320f6b47f68c9181de
Reviewed-by: Qt CI Bot <qt_ci_bot@qt-project.org>
Reviewed-by: Miikka Heikkinen <miikka.heikkinen@qt.io>
2022-09-15 09:42:51 +00:00
Thomas Hartmann
ff95787887 QmlDesigner: Use "This is a string" as default for string
Change-Id: I3d4d6e3dc32e5589e519fdadab0ae0996f7ae21e
Reviewed-by: Mats Honkamaa <mats.honkamaa@qt.io>
Reviewed-by: Miikka Heikkinen <miikka.heikkinen@qt.io>
Reviewed-by: <github-actions-qt-creator@cristianadam.eu>
2022-09-15 09:42:38 +00:00
Alessandro Portale
c13a2c861f TextEditor: Improve appearance of "erase" button in color scheme editor
This removes the arrow icon which does not make much sense (and also
looks bad on macOS) with the text "Unset". The tooltip gets adapted,
accordingly.

Change-Id: Ifdf41114855fe9e97d8a89a9865d92ae262e4dce
Reviewed-by: Eike Ziller <eike.ziller@qt.io>
2022-09-15 09:31:56 +00:00
Marco Bubke
8aee8df4df QmlDesigner: Break dependency to View3DActionCommand
The node instance view and his commands should be not called directly
from other views. There are special classes QmlItem which can do it but
every change should go through the model.

Change-Id: I734e5538d7f6ecb07d736912f647c5eb92dc7631
Reviewed-by: Mahmoud Badri <mahmoud.badri@qt.io>
Reviewed-by: Miikka Heikkinen <miikka.heikkinen@qt.io>
Reviewed-by: Qt CI Bot <qt_ci_bot@qt-project.org>
2022-09-15 09:20:12 +00:00
Christian Stenger
6ae6390661 AutoTest: Fix gtest filter usage
There are shells that need the filter to be quoted to avoid
shell globbing.

Fixes: QTCREATORBUG-28153
Change-Id: I13eb5cb362b3543f5a88b27fb170c579ae6dde4b
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-09-15 07:51:29 +00:00
Eike Ziller
2bfc8173e5 ImageViewer: Make "Fit to Screen" sticky
Instead of "Fit to Screen" being a single-shot action, make it a
property that sticks as long as the image is not resized by the other
buttons or the mouse wheel. Meaning that it will resize to the screen
when the viewer size changes as long as the property is on.

Task-number: QTCREATORBUG-27816
Change-Id: I3b790dd7f94e4b964a734658dac4a637c8105b84
Reviewed-by: David Schulz <david.schulz@qt.io>
2022-09-15 07:45:39 +00:00
Marcus Tillmanns
21df100b21 GdbEngine: Support interrupting docker executable
Change-Id: I084ff34b0455f069868aaac10d0003ac81ef1903
Reviewed-by: Orgad Shaneh <orgads@gmail.com>
Reviewed-by: hjk <hjk@qt.io>
2022-09-15 07:34:13 +00:00
Marcus Tillmanns
df074e06fa Debugger: Search for toolchain style gdb's
See also: QTCREATORBUG-27985

Change-Id: I60f0561b83a77a9cba9753af29e125550750e684
Reviewed-by: hjk <hjk@qt.io>
2022-09-15 07:33:41 +00:00
Thomas Hartmann
1fe4db0231 QmlDesigner: Add removeKeyframesForTargetAndProperty
This allows to remove keyframe groups for a specific property.
This is required if a dynamic property is removed.

Change-Id: Ic3a2609241df21d81954ab18e4aeec1c47bfe336
Reviewed-by: Henning Gründl <henning.gruendl@qt.io>
Reviewed-by: Thomas Hartmann <thomas.hartmann@qt.io>
Reviewed-by: Qt CI Bot <qt_ci_bot@qt-project.org>
2022-09-15 06:35:21 +00:00
Thomas Hartmann
1d46fee51f QmlDesigner: Add allTimelines
This makes it easy to retrieve all existing timelines.

Change-Id: I61fdacce28ea7c8afe48da81b87c8b47ee1cec26
Reviewed-by: Henning Gründl <henning.gruendl@qt.io>
Reviewed-by: Thomas Hartmann <thomas.hartmann@qt.io>
Reviewed-by: Qt CI Bot <qt_ci_bot@qt-project.org>
2022-09-15 06:35:00 +00:00
Marcus Tillmanns
e9af100f83 Debugger: Remove old commented code
Change-Id: Ib7b156f65dd81365cdcf56a9598449415a231abf
Reviewed-by: David Schulz <david.schulz@qt.io>
2022-09-15 05:48:27 +00:00
Marcus Tillmanns
ed46f1f002 linuxdevice: Fix ::bytesAvailable
DeviceShell does not support piping commands at the moment.

To continue to support ::bytesAvailable the parsing of the
output from "df" is moved to FileUtils::bytesAvailableFromDFOutput.

Change-Id: Ia229208748aa6c572b99899e6ae042bdd5654f4a
Reviewed-by: Eike Ziller <eike.ziller@qt.io>
Reviewed-by: Qt CI Bot <qt_ci_bot@qt-project.org>
Reviewed-by: Jarek Kobus <jaroslaw.kobus@qt.io>
2022-09-15 05:21:52 +00:00
Marco Bubke
e4b8e78ca2 QmlDesigner: Refactor validation checks
Origanally my idea was that there can be no invalid model nodes created.
Because it was practically to return invalid nodes we added a default
constructor. So now we have invalid nodes because we explicitly created
them and invalid nodes because we destroyed them(except the root node
which has to be always valid). To remove all the isValid test two new
approches are introduced.

Instead of throwing an exception a reasonable return value is provided
or the function is simply doing nothing.
For example if you try to remove an non existing property nothing is
happen. If you try to get an non existing property you get an invalid
property. If you then try to get an value from that property you get an
null(false) value.

All object can now be tested for true or false. So you can write:

if (auto property = getnode().property("foo"))
    // do something with if node and property are positive

Task-number: QDS-7454
Change-Id: I9ebb0bae45354cedc0b6cfe610d1a71435ee1f38
Reviewed-by: Aleksei German <aleksei.german@qt.io>
Reviewed-by: Qt CI Bot <qt_ci_bot@qt-project.org>
2022-09-14 13:08:31 +00:00
Christian Stenger
2e3c9ba774 Utils: Add define for fs engine to the qbs build
This is what cmake does and the tests do expect.

Change-Id: I43cb1e5d5177d233a3b5a321077c05e5a544e6bf
Reviewed-by: Christian Kandeler <christian.kandeler@qt.io>
Reviewed-by: Christian Stenger <christian.stenger@qt.io>
2022-09-14 11:51:22 +00:00
Cristian Adam
2ab1e76ca9 CMakePM: Add support for configure CMake presets
This patchset will add support for version 1 of the CMakePresets
feature that has been implemented in CMake 3.19

https://cmake.org/cmake/help/v3.19/manual/cmake-presets.7.html

The tests/manual/cmakepresets contains a manual test example for this
feature.

Task-number: QTCREATORBUG-24555
Change-Id: I93aba1ab4f090613d0b21d970b5b651d12c922af
Reviewed-by: <github-actions-qt-creator@cristianadam.eu>
Reviewed-by: Alessandro Portale <alessandro.portale@qt.io>
2022-09-14 11:50:49 +00:00
Marco Bubke
4726b0da2d QmlDesigner: Fix warnings
Change-Id: Id61a8e9e47563088283b5c024eb740acbc25faff
Reviewed-by: Qt CI Bot <qt_ci_bot@qt-project.org>
Reviewed-by: Tim Jenssen <tim.jenssen@qt.io>
Reviewed-by: Alessandro Portale <alessandro.portale@qt.io>
2022-09-14 11:29:41 +00:00
Christian Kandeler
644c438c3a ClangCodeModel: Try to find help items for method overrides
... in the base class.
This is purely a heuristic, but should work well for Qt-based user
projects.

Fixes: QTCREATORBUG-9845
Change-Id: Icca336b3568c2c5f07a9eaf6a183bf6c7c4275bd
Reviewed-by: <github-actions-qt-creator@cristianadam.eu>
Reviewed-by: David Schulz <david.schulz@qt.io>
2022-09-14 11:21:38 +00:00
Christian Stenger
bbf791b1bd Squish: Turn SquishUtils into SuiteConf
SquishUtils was handling suite configuration related data
so far. We need to pass around suite and conf related
information, so make it some real object.
Later enhancement of the class intended.

Change-Id: Iebefc643a83f356deaa43f6a0ee546a2b2d21120
Reviewed-by: David Schulz <david.schulz@qt.io>
2022-09-14 11:09:40 +00:00
David Schulz
c9dc54802c ClangFormat: do not remove trailing spaces on indent calculation
Fixes: QTCREATORBUG-28150
Change-Id: I6f7b18e1afefb96da28295a2c3654d1c1ced4308
Reviewed-by: Artem Sokolovskii <artem.sokolovskii@qt.io>
Reviewed-by: Christian Kandeler <christian.kandeler@qt.io>
Reviewed-by: David Schulz <david.schulz@qt.io>
Reviewed-by: <github-actions-qt-creator@cristianadam.eu>
2022-09-14 11:09:12 +00:00
Jarek Kobus
1b412a97ae testFileTransfer(): Cleanup remote after successful transfer
Change-Id: I770149f69a7ff4c897ad495794b60accddbd67e9
Reviewed-by: <github-actions-qt-creator@cristianadam.eu>
Reviewed-by: Christian Kandeler <christian.kandeler@qt.io>
2022-09-14 11:09:08 +00:00
Jarek Kobus
0b90c6c6f6 SftpFileTransfer: Don't use temporary file for batch file
Use a "-" for a batch file option "-b" what makes sftp
read batch from standard input.

Fixes: QTCREATORBUG-28167
Change-Id: I449c5ba97ea11fca090b748f0a5ee8099140a548
Reviewed-by: <github-actions-qt-creator@cristianadam.eu>
Reviewed-by: Christian Kandeler <christian.kandeler@qt.io>
2022-09-14 11:08:59 +00:00
Christian Stenger
60f11cf637 Squish: Avoid potential crashes
The control bar of the Squish plugin is used as top level
widget, but may get destroyed out of the sudden under several
circumstances.
If some dialog is using the control bar as parent QC will crash
at this point.
Redo 0d7bbb8480 to avoid all crashes instead of just
this specific one.

Change-Id: I5c5de737d748fe8eee724e9fa489696a27300978
Reviewed-by: <github-actions-qt-creator@cristianadam.eu>
Reviewed-by: Eike Ziller <eike.ziller@qt.io>
2022-09-14 10:50:40 +00:00
David Schulz
1b30954633 Locator: highlight pattern simultaneously in text and extra info
Change-Id: I57217141f1842e0441a9999033e1be7ff2ab0f4c
Reviewed-by: Eike Ziller <eike.ziller@qt.io>
2022-09-14 09:43:28 +00:00
Eike Ziller
72f34986cf QmlDesigner: Fix build of tst_qml_core
FAILED: qtcreator/tests/auto/qml/qmldesigner/coretests/tst_qml_testcore
Undefined symbols for architecture arm64:
  "QmlDesigner::ProjectStorage<Sqlite::Database>::propertyDeclaration(Sqlite::BasicId<(QmlDesigner::BasicIdType)2,
long long>) const", referenced from:
      QmlDesigner::PropertyMetaInfo::propertyData() const in
nodemetainfo.cpp.o

Change-Id: I67646c45f28d509bb7de0da006a0d7b0b2e989fa
Reviewed-by: Marco Bubke <marco.bubke@qt.io>
Reviewed-by: <github-actions-qt-creator@cristianadam.eu>
Reviewed-by: Jarek Kobus <jaroslaw.kobus@qt.io>
2022-09-14 09:40:28 +00:00
David Schulz
47c7513e7a Locator: filter actions in matchesFor
The matchesFor is called in a helper thread and does not block the UI.

Change-Id: Idef1c4ebc2663da18edc436fea2457a301200672
Reviewed-by: Eike Ziller <eike.ziller@qt.io>
Reviewed-by: <github-actions-qt-creator@cristianadam.eu>
2022-09-14 08:58:02 +00:00