Commit Graph

76686 Commits

Author SHA1 Message Date
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
Thomas Hartmann
704fb9c0e6 QmlDesigner: Add deferred loading to dialog in ColorEditor
If the gradient editing is disabled we can load the
dialog when it is opened and not before.
If there is a gradient then the dialog is still to tightly coupled
with the ColorEditor.

Change-Id: Ie01b5fc5f94b4cb0969778e87d7fb0e1273b5d57
Reviewed-by: Henning Gründl <henning.gruendl@qt.io>
2022-09-14 14:19:58 +00:00
Henning Gruendl
eeeea090cc QmllDesigner: Fix dynamic properties layout
* Fix layout
* Add missing qsTr()
* Remove unnecessary alignment settings

Change-Id: Ie8d90e61d39933e573cb119e5ed3a15fcbca9674
Reviewed-by: Thomas Hartmann <thomas.hartmann@qt.io>
2022-09-14 13:15:17 +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
Christian Stenger
a484f3fef5 Tests: Add fsengine related tests to qbs build
Change-Id: I05d6c1da01c972cfcfc15d2d09b57f29e248fad1
Reviewed-by: hjk <hjk@qt.io>
2022-09-14 10:38:19 +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
Christian Kandeler
a33b37bfaf ClangCodeModel: Restart clangd on "internal" changes to non-open files
Our previous "openExtraFile" approach does not reliably trigger re-
indexing.

Task-number: QTCREATORBUG-26521
Change-Id: Ibb4008d9cc72afddf6709c6f9442426440b72d01
Reviewed-by: <github-actions-qt-creator@cristianadam.eu>
Reviewed-by: David Schulz <david.schulz@qt.io>
2022-09-14 08:00:31 +00:00
David Schulz
6bc66a0a90 Locator: add and use default shortcut and default search text
Change-Id: I98de37be052f367c52fa248370eaacd83f90e969
Reviewed-by: Eike Ziller <eike.ziller@qt.io>
2022-09-14 07:58:08 +00:00
Eike Ziller
9d745e0f53 ClangCodeModel: Fix compiler warning
Change-Id: I68648ffe4ae3aa8bdfdf2706c1a65eb2269eaa1f
Reviewed-by: <github-actions-qt-creator@cristianadam.eu>
Reviewed-by: Christian Kandeler <christian.kandeler@qt.io>
2022-09-14 07:57:56 +00:00
Christian Kandeler
42121845cb ClangCodeModel: Add missing notification after symbol renaming
Task-number: QTCREATORBUG-26521
Change-Id: I3f3e25f4c28bc454f66bbd730e172833be8f87e4
Reviewed-by: <github-actions-qt-creator@cristianadam.eu>
Reviewed-by: David Schulz <david.schulz@qt.io>
2022-09-14 07:44:25 +00:00
Christian Kandeler
8beeea5b5e CppEditor: Add support for showing pre-processed source files
Fixes: QTCREATORBUG-4
Change-Id: I819709e69e604849264e745da98065829f7cb228
Reviewed-by: <github-actions-qt-creator@cristianadam.eu>
Reviewed-by: David Schulz <david.schulz@qt.io>
2022-09-14 07:42:49 +00:00
Christian Stenger
0867d6f6a5 QmlDesigner: Fix build
Change-Id: Ic12c886e72b9ba9b9987398a7c97e5c4df404aaf
Reviewed-by: Christian Kandeler <christian.kandeler@qt.io>
2022-09-14 04:24:51 +00:00
Jarek Kobus
f9522051f7 testFileTransfer(): Add more checks
Make the target path more nested.

Task-number: QTCREATORBUG-28151
Change-Id: Iae0660294d873e82e3fef0cbf2411f7c22ef526f
Reviewed-by: Christian Kandeler <christian.kandeler@qt.io>
2022-09-13 15:31:25 +00:00
Marco Bubke
40aa1eee06 QmlDesigner: Reactivate coretests
Change-Id: Ia4b6b4b6cd25ad4bb5ff0e0a7c5629af2f5ed6db
Reviewed-by: <github-actions-qt-creator@cristianadam.eu>
Reviewed-by: Thomas Hartmann <thomas.hartmann@qt.io>
Reviewed-by: Qt CI Bot <qt_ci_bot@qt-project.org>
2022-09-13 14:13:12 +00:00
The Qt Project
25fb238e92 Merge "Merge remote-tracking branch 'origin/8.0'" 2022-09-13 11:14:21 +00:00
Alessandro Portale
02ac16128b ProjectExplorer: Fix directories as filesource in JsonWizard
In addition to file names, Json wizards can define directories as
"File" source. That triggers a specialized code path which broke
with the conversion to using Utils::FilePath.

Amends: 389b1eceb9

Change-Id: I17be01dd04f3fe053966a87e16882659e341da5e
Reviewed-by: Tim Jenssen <tim.jenssen@qt.io>
2022-09-13 11:13:01 +00:00
Miikka Heikkinen
e15d834601 QmlDesigner: Create 3D models at the point of context menu trigger
Fixes: QDS-7640
Change-Id: I2f178c2e2661dedc4efe23b675363283e3cd3bc3
Reviewed-by: Mahmoud Badri <mahmoud.badri@qt.io>
Reviewed-by: Qt CI Bot <qt_ci_bot@qt-project.org>
2022-09-13 10:15:34 +00:00
Henning Gruendl
fbb9dd1647 QmlDesigner: Allow multiple StateGroups in .ui.qml
Change-Id: If7f626f196899ebd49e5f6393d8e3ef81447945c
Reviewed-by: Thomas Hartmann <thomas.hartmann@qt.io>
2022-09-13 10:05:23 +00:00
Henning Gruendl
3256888294 QmlDesigner: Fix MenuSeparator not displayed
StudioControls.MenuSeparator isn't displayed as setting width/height
is wrong. Instead use the implicit version of the properties.

Change-Id: I44a269e10b1ef6507009ecffb6b8e90736d24f45
Reviewed-by: Thomas Hartmann <thomas.hartmann@qt.io>
2022-09-13 10:05:17 +00:00
Eike Ziller
5ae23f8c66 Merge remote-tracking branch 'origin/8.0'
Conflicts:
	.github/workflows/build_cmake.yml
	src/plugins/qmldesigner/components/connectioneditor/dynamicpropertiesmodel.cpp
	src/plugins/qmldesigner/components/materialeditor/materialeditorview.h
	src/plugins/qmldesigner/components/propertyeditor/propertyeditorqmlbackend.cpp
	src/plugins/qmldesigner/designercore/model/model.cpp

Change-Id: I111b9140375b894a5487cc012b17cc32100bdb8d
2022-09-13 11:15:16 +02:00
Antti Määttä
1b688b51fd Optimize TimelineModelPrivate::incrementStartIndices
Reduces the overhead of the function by a factor of ~500(depending on
the event count) by having the Range(start) index to the RangeEnd so
that we can only increment the RangeEnds that actually
need to be incremented.

Fixes: QTCREATORBUG-28162
Change-Id: I9daa711d0a1d960b232c5ed30564271daa68d1aa
Reviewed-by: Tomi Korpipää <tomi.korpipaa@qt.io>
Reviewed-by: Janne Koskinen <janne.p.koskinen@qt.io>
Reviewed-by: Ulf Hermann <ulf.hermann@qt.io>
Reviewed-by: Qt CI Bot <qt_ci_bot@qt-project.org>
2022-09-13 09:00:53 +00:00
Christian Kandeler
f7efefb6d4 ClangCodeModel: Support setting additional preprocessor directives
... for a document.
This was only ever implemented for the built-in code model.

Fixes: QTCREATORBUG-20423
Change-Id: Ia99d0136e9995a5626058ad06173ea077be024d8
Reviewed-by: <github-actions-qt-creator@cristianadam.eu>
Reviewed-by: David Schulz <david.schulz@qt.io>
2022-09-13 08:14:28 +00:00
Christian Stenger
fbd4775f89 Squish: Add some logging
For better keeping track of what is happening add logging
for the states of the server and runner.

Change-Id: I6666ce5bdcfb0c2ab1b05758ad293e2169dee0a3
Reviewed-by: David Schulz <david.schulz@qt.io>
2022-09-13 07:58:48 +00:00
Christian Stenger
61effdff7a Squish: Fix painting location marker
Change-Id: Id0b36fe2c0b960a63415445b2e718688ea129da0
Reviewed-by: David Schulz <david.schulz@qt.io>
2022-09-13 07:58:41 +00:00
Christian Stenger
0d7bbb8480 Squish: Avoid crash
The SquishControlBar becomes unexpectedly parent of the
critical error message box.
If the runner stops e.g. with a broken connection to the
server due to license issues the stop triggers a shutdown
of the server which in turn destructs the control bar, but
this crashes due to the message box.
Use the "real" main window instead which also corrects the
positioning of the message box.

Change-Id: I8ec3a100a51761169d8820175196dfc84b092410
Reviewed-by: David Schulz <david.schulz@qt.io>
2022-09-13 07:58:35 +00:00
Christian Stenger
cc3ec2dab8 Squish: Separate state handling
Different runner modes get different handlings, so reflect
this in code and have easier maintenance.

Change-Id: Ia879a0e2db1d99dd50e43dfbe439dc6d679d7da6
Reviewed-by: David Schulz <david.schulz@qt.io>
2022-09-13 07:58:29 +00:00
Marcus Tillmanns
2f0a26c1f5 Filepath: Revert "root"
Change-Id: I3f8e8d8eb32f4e3246942aad2f1205034bfafc07
Reviewed-by: hjk <hjk@qt.io>
2022-09-13 07:58:04 +00:00
Knud Dollereder
67408ac183 Add tooltips to the timeline settings dialog
Using the suggestions from the bugreport.

Fixes: QDS-7109
Change-Id: Iedf991958525d793f89e3d591f978a19d53a39bd
Reviewed-by: <github-actions-qt-creator@cristianadam.eu>
Reviewed-by: Leena Miettinen <riitta-leena.miettinen@qt.io>
Reviewed-by: Thomas Hartmann <thomas.hartmann@qt.io>
2022-09-13 06:56:31 +00:00
David Schulz
e0f7b096d3 Core: replace menu bar locator filter with actions filter
And also collect global actions from the ActionManager.

Change-Id: Ia22374a709a0cb15b314d33009e15562d226cc7b
Reviewed-by: Eike Ziller <eike.ziller@qt.io>
2022-09-13 06:37:41 +00:00
Alexander Akulich
2054dc8169 ClangdSettingsWidget: Enable word wrap for a long help label
Change-Id: Ia96b73fb2dded58fb824b401c0cf94e8ef5a5664
Reviewed-by: Eike Ziller <eike.ziller@qt.io>
2022-09-12 20:36:56 +00:00
Florian Koch
69fad91660 Re-introduction of the feature to adjust the line spacing
This already has been implemented in change
dc64f3207b, but was reverted with
change f220cb0e23) because this does not
work with text wrapping rendering, due to internal limitations of Qt.
Since this is a highly requested feature (e.g. QTCREATORBUG-13727), but
an internal change within Qt is not in sight, the approach taken here
is to offer the text wrapping feature in the settings only when the
line spacing is set to 100%. Additionally, a change has been made to
the layout of the display settings page to reflect this.

Fixes: QTCREATORBUG-13727
Change-Id: Ib233cf90a5f336bc591fa1bf860e162fa774dfe3
Reviewed-by: David Schulz <david.schulz@qt.io>
2022-09-12 16:40:15 +00:00
Miikka Heikkinen
0f2ade49f9 QmlDesigner: Set material preview aux values asynchronously on init
This is done to avoid recursive writes to model.

Change-Id: Ie7cdd9c38fc54276a2c6617ba51137fd78946f4a
Reviewed-by: Thomas Hartmann <thomas.hartmann@qt.io>
2022-09-12 15:20:26 +00:00
Marco Bubke
da5a6b4cfb QmlDesigner: Extend ModelNode::auxiliaryDataWithDefault
You can now use AuxiliaryDataKeyDefaultValue yo provide a default value.

Change-Id: Idfbc74489f6a3f60a70a3e2cdaa93ad71b536e95
Reviewed-by: <github-actions-qt-creator@cristianadam.eu>
Reviewed-by: Aleksei German <aleksei.german@qt.io>
2022-09-12 14:50:32 +00:00
Miikka Heikkinen
a2c8972ce1 QmlDesigner: Expose dynamic texture and vector properties in components
Provide editor templates for Texture, TextureInput, and vectorXd
type dynamic properties exposed by components.

Change-Id: Ie7ae62aeffc5e151a1300b3aefdfc68584ccda6a
Reviewed-by: Thomas Hartmann <thomas.hartmann@qt.io>
Reviewed-by: <github-actions-qt-creator@cristianadam.eu>
2022-09-12 13:57:25 +00:00
Alessandro Portale
74f5ad6583 Utils: Unify and simplify Details(Button|Widget) and ExpandButton
This replaces lots of custom painting/animating code with a simplified
implementation and cross-platform visual unification.

Task-number: QTCREATORBUG-27801
Change-Id: I18b12e8c7f0bba4ba5d8a05271ab1e757769dc5f
Reviewed-by: Eike Ziller <eike.ziller@qt.io>
2022-09-12 13:43:43 +00:00
Thomas Hartmann
c1bc770564 QmlDesigner: Reset dynamicPropertiesModel on state change
Change-Id: If503d0d4f5cb3d23c4445fa6e774729779d4dd5b
Reviewed-by: Miikka Heikkinen <miikka.heikkinen@qt.io>
2022-09-12 13:30:45 +00:00
Christian Stenger
4e88a8a6f7 Squish: Redo state handling
Separate states and modes according to their use.
Remove state handling from perspective, let tools switch
the perspective mode, and reflect perspective mode
immediately on the perspective.

Change-Id: Ibb0338974b90fcc099517c13d685f800d9774a7d
Reviewed-by: David Schulz <david.schulz@qt.io>
2022-09-12 12:30:51 +00:00