Commit Graph

76686 Commits

Author SHA1 Message Date
Miikka Heikkinen
b080376f70 QmlDesigner: Fix renaming materials
Check for id validity during id generation and try to fix invalid id.

Fixes: QDS-7437
Change-Id: I9d7665cbebdce8ee3395e4abe9ee14b26866f761
Reviewed-by: Mahmoud Badri <mahmoud.badri@qt.io>
2022-09-20 13:53:53 +00:00
Eike Ziller
c37e273f27 Merge remote-tracking branch 'origin/8.0'
Conflicts:
	src/plugins/qmldesigner/designercore/include/qmlstate.h
	src/plugins/qmldesigner/designercore/model/texttomodelmerger.cpp

Change-Id: Iefff97499db72727c1b8058d53b1279fd8853ad9
2022-09-20 15:43:56 +02:00
Thomas Hartmann
6b8e2fbd49 QmlDesigner: Show proper error dialog if adding duplicate property
Task-number: QDS-7702
Change-Id: I43f07afa95cef75e53bbc0259f6dd21b7c1a5363
Reviewed-by: Miikka Heikkinen <miikka.heikkinen@qt.io>
2022-09-20 13:43:47 +00:00
Miikka Heikkinen
e936ef2fdb QmlDesigner: Reduce vertical gap between vector fields
This helps to differentiate which fields belong to which property
when multiple vertor properties are added next to each other.

Fixes: QDS-7704
Change-Id: I885e6d3d12a11851668e7c4d66f94f3356e5f082
Reviewed-by: Mahmoud Badri <mahmoud.badri@qt.io>
2022-09-20 13:42:52 +00:00
Miikka Heikkinen
145ecd040f QmlDesigner: Add support for component unimporting from bundle
Fixes: QDS-7706
Change-Id: Ib0ab71b650592b1796d3ef2f14e364431a82a268
Reviewed-by: Mahmoud Badri <mahmoud.badri@qt.io>
2022-09-20 12:44:31 +00:00
Mahmoud Badri
d9f07e95b5 QmlDesigner: Implement material bundle frontend
Fixes: QDS-7500
Change-Id: I60c512bb7664d13160f8c58ce063e1e87b6875ee
Reviewed-by: Miikka Heikkinen <miikka.heikkinen@qt.io>
2022-09-20 12:30:47 +00:00
hjk
bcb4db927b ClangFormat: Avoid warning about unused parameter
Style follows precedent in the file.

Change-Id: Id7e5ca3f4e9536cb803e8e0ff36db59fda3c41d5
Reviewed-by: David Schulz <david.schulz@qt.io>
2022-09-20 11:06:49 +00:00
Marcus Tillmanns
1404c36e2b Deviceshell: Fix use after free
Change-Id: I6caa22e53bee2db332ced7301534683d7a064905
Reviewed-by: <github-actions-qt-creator@cristianadam.eu>
Reviewed-by: Jarek Kobus <jaroslaw.kobus@qt.io>
2022-09-20 10:45:31 +00:00
Jarek Kobus
b795bd8042 VcsPlugin: Use VcsCommand::done() signal instead of finished()
Conform to QtcProcess interface. Use result() when needed.

Change-Id: Idd4c71d9a103e8649b08ec7787c2f286423a31ec
Reviewed-by: Orgad Shaneh <orgads@gmail.com>
2022-09-20 10:41:35 +00:00
Jarek Kobus
5e10ea19c1 VcsCommand: Conform to QtcProcess API
Add result() getter and done() signal in order to
conform to QtcProcess API.

Change-Id: Idc7c57e03d6e8acead9d4c034f4efc56250f944d
Reviewed-by: Orgad Shaneh <orgads@gmail.com>
Reviewed-by: <github-actions-qt-creator@cristianadam.eu>
2022-09-20 10:41:25 +00:00
Jarek Kobus
f729efe3df VcsCommand: Don't emit std channel signals when finished
Conform to QtcProcess behavior and don't emit stdOutText()
and stdErrText() on finished when progressive output is off.
Use cleanedStdOut() / cleanedStdErr() getter instead.

Change-Id: I2c416c0264f2203c7a9c73de900c12777f4fd3b3
Reviewed-by: Orgad Shaneh <orgads@gmail.com>
Reviewed-by: <github-actions-qt-creator@cristianadam.eu>
2022-09-20 10:41:18 +00:00
Jarek Kobus
012de6b4c3 PushHandler: Use cleanedStdErr()
Instead of connecting to stdErrText() signal.

Change-Id: Ib9fb94ca3fb0b5cbf4871e0ea3b06a047c31d272
Reviewed-by: Orgad Shaneh <orgads@gmail.com>
Reviewed-by: <github-actions-qt-creator@cristianadam.eu>
2022-09-20 10:41:06 +00:00
David Schulz
85c5edcb6b FuzzyMatcher: add option to match text with spaces
Change-Id: I0480b57d27f3625933005ca2233e9612df53072d
Reviewed-by: Orgad Shaneh <orgads@gmail.com>
Reviewed-by: Eike Ziller <eike.ziller@qt.io>
Reviewed-by: André Hartmann <aha_1980@gmx.de>
Reviewed-by: <github-actions-qt-creator@cristianadam.eu>
Reviewed-by: Qt CI Bot <qt_ci_bot@qt-project.org>
2022-09-20 10:31:39 +00:00
Jarek Kobus
c767f193ce VcsBaseClient: Use cleanedStdOut()
Instead of connecting to stdOutText() signal.

Change-Id: Ib05113bf624d58a4f66e6c1f64217b579c8de1a9
Reviewed-by: Orgad Shaneh <orgads@gmail.com>
Reviewed-by: <github-actions-qt-creator@cristianadam.eu>
2022-09-20 10:30:45 +00:00
Jarek Kobus
d78ccc30cb ConflictHandler: Use cleanedStdOut() and cleanedStdErr()
Instead of connecting to stdOutText() and stdErrText() signals.

Change-Id: I3a90fe2a6b17eb804dbd67691a4685e236232456
Reviewed-by: Orgad Shaneh <orgads@gmail.com>
Reviewed-by: <github-actions-qt-creator@cristianadam.eu>
2022-09-20 10:29:51 +00:00
Marcus Tillmanns
66eca4cb4b CMake: Fix WITH_SANITIZE
Adding qtc_enable_sanitize to add_qtc_executable to also instrument applications

Changing qtc_enable_sanitize to use target_compile_options instead of trying
to modify CMAKE_CXX_FLAGS_DEBUG and hoping that nobody else overwrites it,
which previously erased the added flags.

Adds support for MSVC /fsanitize

Change-Id: Ida80cfd7ef7ea91b2d6473fdc047cb7132cdfec6
Reviewed-by: Cristian Adam <cristian.adam@qt.io>
2022-09-20 10:17:31 +00:00
Christian Stenger
215b2ce09b Tests: Fix expectation and remove os limitation
Change-Id: I6007c25ec4167083134b0cd03fdff8a9ff34355d
Reviewed-by: hjk <hjk@qt.io>
Reviewed-by: Qt CI Bot <qt_ci_bot@qt-project.org>
2022-09-20 10:12:34 +00:00
Marcus Tillmanns
df859d891d Filepath: Add ::isSameDevice
Change-Id: I3990429b59759d5f72ed95e3a0d1723d3bb7bb82
Reviewed-by: hjk <hjk@qt.io>
2022-09-20 10:11:33 +00:00
Henning Gruendl
cddb19ef9c QmlDesigner: Remove unnecessary imports
Change-Id: Ib0566d580ff214a3773434f6eb07b63f8958409e
Reviewed-by: Thomas Hartmann <thomas.hartmann@qt.io>
2022-09-20 09:51:12 +00:00
Henning Gruendl
b9ff06723a QmlDesigner: Fix extend state menu item
Change-Id: I91be5ddb3020e86c33d4264b4e95918689b69f4e
Reviewed-by: Thomas Hartmann <thomas.hartmann@qt.io>
2022-09-20 09:51:07 +00:00
Henning Gruendl
533090fb5e QmlDesigner: Fix StatesEditor scroll bar
Change-Id: I241a33906d06c6011cb618b96c039dfe91323809
Reviewed-by: Thomas Hartmann <thomas.hartmann@qt.io>
2022-09-20 09:51:01 +00:00
Thomas Hartmann
7fc3bac762 QmlDesigner: Disable scrolling if content does fit
This is required on windows, because the other scrollbar seems
to be taken into account somehow.

Change-Id: I890faf7493c38df1f2f2f7fae011d4946f1b9c33
Reviewed-by: Henning Gründl <henning.gruendl@qt.io>
2022-09-20 09:40:48 +00:00
Henning Gruendl
21b9e6ac7f QmlDesigner: Add ProgressBar to StudioControls
Change-Id: I2d79e4af008fe7ef66ebbe2bf31813230451ee18
Reviewed-by: <github-actions-qt-creator@cristianadam.eu>
Reviewed-by: Thomas Hartmann <thomas.hartmann@qt.io>
2022-09-20 08:21:25 +00:00
hjk
f736c23afc Utils: Make PathChooser::path() private
Still registered as getter for the property.

Change-Id: I9a35bbe5f8bf4354670d09eba07288274eb7dd2b
Reviewed-by: Eike Ziller <eike.ziller@qt.io>
Reviewed-by: <github-actions-qt-creator@cristianadam.eu>
2022-09-20 08:01:34 +00:00
Marcus Tillmanns
7f51ae7105 QDS: Fix warnings for GCC 11.2
[[maybe_unused]] leads to warning: ‘maybe_unused’ attribute ignored [-Wattributes]
when compiling with g++, so we instead completely remove the declaration instead.

Change-Id: I00650f78d61a0da18e76cd65908fc4a2abda174a
Reviewed-by: <github-actions-qt-creator@cristianadam.eu>
Reviewed-by: Thomas Hartmann <thomas.hartmann@qt.io>
2022-09-20 07:58:17 +00:00
Christian Kandeler
8e118e9d5e TextEditor: Prevent unwanted reflowing of doxygen comments
... in rewrapParagraph().
One could argue that this functionality is only for pure text and should
not be used on code, but since it was apparently contributed with
doxygen in mind, we might as well go out of our way a bit to support it
a little better.
The simple approach here is to treat a doxygen command at the start of a
line as the end of the reflow region.

Fixes: QTCREATORBUG-9739
Change-Id: I5affee9c441bd9e862bdaf38930fcf8e770b6d97
Reviewed-by: <github-actions-qt-creator@cristianadam.eu>
Reviewed-by: David Schulz <david.schulz@qt.io>
2022-09-20 07:44:18 +00:00
Thomas Hartmann
a7b18f7860 QmlDesigner: Register QML types already in the plugin
The states editor is using some of the types, too.
We have to move the type registration out of the property editor in the
future.

Change-Id: I8a8b38180592a5785592e2482f35aad70208e62c
Reviewed-by: Qt CI Bot <qt_ci_bot@qt-project.org>
Reviewed-by: Aleksei German <aleksei.german@qt.io>
2022-09-19 16:50:37 +00:00
Thomas Hartmann
bbffd88c1b QmlDesigner: Add setting for new states editor
This makes it easy to enable/disable the new states editor.
[QML}
Designer\OldStatesEditor=false

Change-Id: Ib3545bf0be8547af06eb0e9dda0cee2a143659b1
Reviewed-by: Qt CI Bot <qt_ci_bot@qt-project.org>
Reviewed-by: Aleksei German <aleksei.german@qt.io>
2022-09-19 16:50:28 +00:00
Thomas Hartmann
f639f72c14 QmlDesigner: Add QmlObjectNode::getAllConnections
Change-Id: Id6fa6ecdf1173eea1087057f4317dd1a9c3f6b17
Reviewed-by: Aleksei German <aleksei.german@qt.io>
2022-09-19 16:08:05 +00:00
Henning Gruendl
9ffc004beb QmlDesigner: Add new states editor
* Add responsive layout algorithm for states editor
* Add support for extending states
* Drag and drop states
* Display when condition in state thumbnail
* Toggle between property changes and thumbnail
* Display PropertyChanges properties
* Make property changes removable
* Add StateGroup support
* Add toolbar

Task-number: QDS-7639
Change-Id: Iabcbb0a02f7728c29abbdc1000102582c5638eba
Reviewed-by: Qt CI Bot <qt_ci_bot@qt-project.org>
Reviewed-by: Thomas Hartmann <thomas.hartmann@qt.io>
2022-09-19 15:52:53 +00:00
Marcus Tillmanns
e363f27288 dockerdevice: Only try to kill if pid is valid
Change-Id: I844c8e50437b331925f9baa6862c19208edb4599
Reviewed-by: Jarek Kobus <jaroslaw.kobus@qt.io>
2022-09-19 13:49:04 +00:00
hjk
3dff69979b Utils: "Fix" UNC file path parsing
... by adapting the expectations.

Change-Id: If3a3fe2def370440f1edbbcb5a1c2646f1239f67
Reviewed-by: Christian Stenger <christian.stenger@qt.io>
2022-09-19 13:24:43 +00:00
hjk
3522097a8b Utils: Normalize backslashes on FilePath parsing again
Change-Id: I8ee0bc53244785d78acfad406664a907ab088301
Reviewed-by: Christian Stenger <christian.stenger@qt.io>
2022-09-19 13:24:20 +00:00
hjk
bd8d525d70 Utils: Drop QDir::rootPath() uses from FilePath parsing
Fixes three of the EXPECTED_FAIL.

Change-Id: Idf5356cf6ff151c61166404e2b2697b6b0acabd9
Reviewed-by: Christian Stenger <christian.stenger@qt.io>
2022-09-19 13:23:47 +00:00
hjk
b3200b7730 Utils: Move 'isWindowsHost' test to startsWithDriveLetter callers
"Fixes" one Q_SKIP and makes the implementation OS-agnostic.

FilePath::osType() actually depends on the host system for not fully
qualified file paths, and that doesn't seem to be the right thing to do
in all cases. The caller may actually have more context to decide
whether this is needed (e.g. in pathchooser.cpp in the context of
"return value from a GUI element, i.e. 'host' implied).

Change-Id: Iff80c17094d2deec79d34d0527223fbcf8294935
Reviewed-by: Christian Stenger <christian.stenger@qt.io>
2022-09-19 13:14:58 +00:00
Christian Kandeler
4119181762 CppEditor: Make value vs const ref return type configurable
... in the quickfix settings.
Also change the default: With mandatory RVO and move semantics, value
return types are the right choice most of the time.

Fixes: QTCREATORBUG-25790
Change-Id: I68fc6c616358478ba893101b3e04aa6bbbe79348
Reviewed-by: <github-actions-qt-creator@cristianadam.eu>
Reviewed-by: Christian Stenger <christian.stenger@qt.io>
Reviewed-by: Leena Miettinen <riitta-leena.miettinen@qt.io>
2022-09-19 12:30:47 +00:00
Alessandro Portale
75e35cc4f2 Tracing: Convert to using Tr::tr
Change-Id: If2dd9ac8dfd54bb2305a8149acce401f854fa2dc
Reviewed-by: hjk <hjk@qt.io>
Reviewed-by: <github-actions-qt-creator@cristianadam.eu>
2022-09-19 12:28:35 +00:00
Alessandro Portale
cbc954866d QtSupport: Fix Qt header include
Change
 #include "qversionnumber.h"
to
 #include <QVersionNumber>

Amends: a917770053

Change-Id: Ia6e82f56bf599b39b26391a13ce886dfd1ecbc69
Reviewed-by: hjk <hjk@qt.io>
2022-09-19 12:27:31 +00:00
Marcus Tillmanns
dabd9a175e CMake: Make sure source/build directories are reachable
Change-Id: Iea4547807b3a59eb9a8cb70d51d9015dbc8013e3
Reviewed-by: hjk <hjk@qt.io>
2022-09-19 12:16:54 +00:00
Alessandro Portale
a917770053 Replace QtSupport::QtVersionNumber with QVersionNumber
Task-number: QTCREATORBUG-27786
Change-Id: I71a44709c264829f629c9dfce702076eda297a77
Reviewed-by: <github-actions-qt-creator@cristianadam.eu>
Reviewed-by: hjk <hjk@qt.io>
2022-09-19 12:08:39 +00:00
hjk
1e8089d5b7 Utils: Drop argument from PathChooser::rawFileChanged
Preparation for further consolidation.

Change-Id: Ia297d78763a24c168ae5fd13fbe30f6963f33fc7
Reviewed-by: Eike Ziller <eike.ziller@qt.io>
2022-09-19 11:35:49 +00:00
Eike Ziller
9258babf85 ExtensionSystem: Remove unused flag
The "hidden by default" functionality was removed.

Amends 361b80cb9b

Change-Id: I1d280dc50401f231b0cc4a1e7b63b7bcec1666ea
Reviewed-by: <github-actions-qt-creator@cristianadam.eu>
Reviewed-by: hjk <hjk@qt.io>
2022-09-19 11:34:17 +00:00
Marcus Tillmanns
88969b79eb Filepath: Add ensureReachable function
ensureReachable checks whether the device (if any) of the filepath
can "reach" another FilePath. Devices can then either return false
if they don't, or take action to ensure that the path can be reached.

Change-Id: Ic1a315b9e7d9e37ee649989313a4cdb195a7e4d9
Reviewed-by: hjk <hjk@qt.io>
2022-09-19 11:13:08 +00:00
Marcus Tillmanns
cc6a7b113a fileutils: Fix tests
Change-Id: Iafeab41b0e6f7cdb10802e48c3bc7fe5548c064c
Reviewed-by: Qt CI Bot <qt_ci_bot@qt-project.org>
Reviewed-by: Eike Ziller <eike.ziller@qt.io>
Reviewed-by: <github-actions-qt-creator@cristianadam.eu>
2022-09-19 11:01:30 +00:00
hjk
06334e1816 Utils: Replace FilePath::rootPath() by some isRootPath()
Keeps more context to make it host-independent later.

Change-Id: I0f8ad3e8794daa6324662847203200ae378d34b4
Reviewed-by: Christian Stenger <christian.stenger@qt.io>
Reviewed-by: <github-actions-qt-creator@cristianadam.eu>
2022-09-19 10:39:55 +00:00
Jarek Kobus
eda8a4244f GitBaseDiffEditorController: Use cleanedStdOut()
Instead of connecting to stdOutText() signal.

Change-Id: Ia9d1d38934e254a8824620947a409fc52f7f531f
Reviewed-by: <github-actions-qt-creator@cristianadam.eu>
Reviewed-by: Orgad Shaneh <orgads@gmail.com>
2022-09-19 10:31:45 +00:00
Jarek Kobus
3978cdde6c VcsCommand: Add std channel getters
Conform to QtcProcess interface and provide cleanedStdOut()
and cleanedStdErr() getters, to be called after the process
finished.

Use cleanedStdOut() inside DiffEditorController for getting
the output after the process finished instead of connecting
to stdOutText() signal.

Change-Id: I7ba3735b0ab2167ac1f3b0954dd5dc9553910aac
Reviewed-by: Orgad Shaneh <orgads@gmail.com>
2022-09-19 10:31:35 +00:00
Jarek Kobus
5b0c2bcbf8 QtcProcess: Fix stdErr() assert
The keepRawData field may be false only after calling
setStdErrLineCallback(). In all current usages (7 places)
we don't call stdErr() nor cleanedStdErr().
VcsCommand was using setStdErrCallback() so that did not
change the keepRawData to false.

It looks like currently it should be safe to fix this assert.

Amends 4000819262

Change-Id: I9f8627166d194579c5a0fe13d241ff37aecac47c
Reviewed-by: hjk <hjk@qt.io>
2022-09-19 10:31:02 +00:00
Thomas Hartmann
89535f1025 QmlDesigner: Hide dynamic properties if multiple items are selected
If multiple items get selected it is not clear to which item
the property belongs. Therefore we hide the section.

Task-number: QDS-7688
Change-Id: Ieaa0114d87974fea3135adc2d1bcd979c2236ed2
Reviewed-by: Miikka Heikkinen <miikka.heikkinen@qt.io>
2022-09-19 09:43:30 +00:00
Alessandro Portale
4360462d22 Help: Fix linker issue with QtWebEngine help viewer on Windows
EXPLICIT_MOC webenginehelpviewer.h

Change-Id: I4f282262105ec9a1c22eed6bed670e48074cadbe
Reviewed-by: Eike Ziller <eike.ziller@qt.io>
2022-09-19 09:35:58 +00:00