Commit Graph

66382 Commits

Author SHA1 Message Date
Leena Miettinen
82d64ea49f Doc: Modify the terminology in the "Shapes" topic
Change-Id: Ibabca1fa03cc3c063ae066d0c8c8e79a1a3b25b0
Reviewed-by: Brook Cronin <brook.cronin@qt.io>
Reviewed-by: Thomas Hartmann <thomas.hartmann@qt.io>
2020-10-05 13:41:32 +00:00
Thomas Hartmann
aeb30c0840 QmlDesigner: Delete existing node when property does not allow list
Some properties can only contain a single QML element. In this case
we should delete the old existing element.

This can be checked using NodeMetainfo::propertyIsListProperty.

Change-Id: I1782a38b7bfdb8a6f1078b0fa39654a4653dab59
Reviewed-by: Mahmoud Badri <mahmoud.badri@qt.io>
Reviewed-by: Miikka Heikkinen <miikka.heikkinen@qt.io>
2020-10-05 12:32:26 +00:00
hjk
2a5c5d118b AutoTools: Build step code cosmetics
Change-Id: I5281bfaaa54ade80bbf46cfd16f629a2d1c81a9b
Reviewed-by: Christian Stenger <christian.stenger@qt.io>
2020-10-05 11:26:44 +00:00
Christian Stenger
35ffc930b8 Tests: Fix QJson dumper test
Change-Id: Ic9f5b7da358164bb9b66f2c75965377cdbf09c4e
Reviewed-by: hjk <hjk@qt.io>
2020-10-05 11:18:45 +00:00
hjk
c3833406cc iOS: Remove unnecessary check in IosBuildStep::init()
A buildstep always belongs to a build configuration.

Change-Id: Ia24e571fbaf47c97797661774e87d583bddb1d76
Reviewed-by: Eike Ziller <eike.ziller@qt.io>
2020-10-05 10:22:58 +00:00
hjk
72c5477789 Utils: Remove SavedAction::m_settingsGroup
Instead, directly use the full key.

Change-Id: I8410851dd5d53f09f44cca66a9187d0b72717036
Reviewed-by: Christian Stenger <christian.stenger@qt.io>
2020-10-05 10:17:31 +00:00
Christian Stenger
bf19509642 Tests: Fix boost pro file additions
Otherwise we might end up with a messed up project
file.

Change-Id: I432d45063092d0a5dead3ef975ba3ce5294c1af0
Reviewed-by: David Schulz <david.schulz@qt.io>
2020-10-05 10:02:14 +00:00
Thomas Hartmann
fe7d928f3b QmlDesigner: Do not keep separate selection state
When nodes are deleted the selection can changes without a notifier.
There is no reason to keep the selection separately.

Change-Id: I166d3695762e3d5cd6ff4808586384fd26bafef4
Reviewed-by: Miikka Heikkinen <miikka.heikkinen@qt.io>
2020-10-05 09:37:11 +00:00
Thomas Hartmann
634bb8afb4 QmlDesigner: Add const to selectedModelNodes()
Otherwise we have to use qAsConst when using ranged for.

Change-Id: I6bb166be1525b0b75939c9a134b507e561f7bbd0
Reviewed-by: Mahmoud Badri <mahmoud.badri@qt.io>
Reviewed-by: Miikka Heikkinen <miikka.heikkinen@qt.io>
2020-10-05 09:32:34 +00:00
hjk
5d889a4d33 QmakeProjectManager: Add a soft assert
Task-number: QTCREATORBUG-24683
Change-Id: I6c4780a3200eff7c371dd90bb0b441ce84d4b9cb
Reviewed-by: Eike Ziller <eike.ziller@qt.io>
2020-10-05 09:15:31 +00:00
Jochen Seemann
3a4ede2e1b Add support for Conan package manager
Task-number: QTCREATORBUG-21785
Change-Id: I4b2dbcc16a2504efe9fdc9e31fa2ef14bba7c33c
Reviewed-by: Kai Koehne <kai.koehne@qt.io>
Reviewed-by: Eike Ziller <eike.ziller@qt.io>
2020-10-05 09:10:53 +00:00
David Schulz
2842b613ed TextEditor: request assist after trigger char inserted
... while proposal is shown

amends 23d63dcc8b

Fixes: QTCREATORBUG-24225
Change-Id: Ie935c7c1d4786a4fd3cf338d7f1df52ae28de63b
Reviewed-by: David Schulz <david.schulz@qt.io>
Reviewed-by: Christian Kandeler <christian.kandeler@qt.io>
2020-10-05 09:05:25 +00:00
hjk
fcaa6801cf Utils: Start replacing SavedActions by QAction or Utils::Aspect
First mechanical step here is to derive SavedActions from BaseAspect
instead of QAction.

Change-Id: I2ec95883b825462c1d867f83cc2b3bd2c2732055
Reviewed-by: Christian Stenger <christian.stenger@qt.io>
2020-10-05 08:46:27 +00:00
hjk
f4beb6314c Utils: Add some function to StringAspect
- enable/disable the widgets
- enable/disable text edit undo/redo
- possibly validate line edit input

Change-Id: I1933a0f03404de7dcd66475f20d9b7d884ef277e
Reviewed-by: Christian Kandeler <christian.kandeler@qt.io>
2020-10-05 08:36:38 +00:00
Thomas Hartmann
e4b9ad289f QmlDesigner: Add QtQml.Component as component type
Change-Id: Ief07ffc863de978b6082adfec3477b00a7309654
Reviewed-by: Thomas Hartmann <thomas.hartmann@qt.io>
2020-10-05 08:25:48 +00:00
hjk
b97b7dc6f2 ProjectExplorer: Move BuildStepWidget::summary etc to BuildStep
The step is the source of information anyway, and available at the
only place of use. No need to copy that over to the widget, neither
for keeping it up-to-date there when the mechanism is already
available in the step itself.

This creates quite some potential for the simplification of
the various createConfigWidget implementations in follow-up patches.

Change-Id: I4474665f194a1ff7c5792ad086ed53c8d3ce13e6
Reviewed-by: Christian Kandeler <christian.kandeler@qt.io>
2020-10-05 08:16:51 +00:00
Leena Miettinen
7c1971e908 Doc: Point to the online docs from README.md
To advertise the docs on GitHub.

Task-number: QTCREATORBUG-21179
Change-Id: I39bac5cfb8f9749966c3b879b0a89c4e62d934f4
Reviewed-by: Eike Ziller <eike.ziller@qt.io>
2020-10-05 07:56:16 +00:00
Eike Ziller
ad7dbc4619 Merge remote-tracking branch 'origin/4.13' into master
Change-Id: I565a0bd783dc80b53d4715fdc153dba1f1d3f7c7
2020-10-05 09:05:23 +02:00
Orgad Shaneh
48c56416f5 Git: Do not prompt to add files in a submodule
Fixes: QTCREATORBUG-23845
Change-Id: Ibf20eed26469b5a8599927e5ac2d458bbff9a156
Reviewed-by: André Hartmann <aha_1980@gmx.de>
2020-10-04 17:06:23 +00:00
Fawzi Mohamed
2f584585e3 qmldesigner: Avoid crash of TextToModelMerger::getQMLSingletons()
When m_scopeChain is invalid (due to an invalid ui file)
getQMLSingletons would trigger a crash. Catch this case
and return early (an error message would then be displayed).

Fixes: QTCREATORBUG-24587
Change-Id: I80c70d8e7f1c88b14c53d3daebf957dc1e6089ee
Reviewed-by: Ulf Hermann <ulf.hermann@qt.io>
Reviewed-by: Fabian Kosmale <fabian.kosmale@qt.io>
Reviewed-by: Thomas Hartmann <thomas.hartmann@qt.io>
2020-10-03 19:33:46 +00:00
Ville Voutilainen
2e39132deb Android: Set the manifest dirty when app icons are set or removed
Task-number: QTCREATORBUG-24700
Change-Id: I862b5a17f47c7c6bbf7900b8923a246b8e902190
Reviewed-by: Assam Boudjelthia <assam.boudjelthia@qt.io>
2020-10-02 16:05:06 +00:00
hjk
c0b001737c ProjectExplorer: Remove BuildStepConfigWidget::m_step
It's not needed centrally anymore.

Keep it in the only remaining user, QbsBuildStepConfigWidget. Also
there it will not be needed after aspectification anymore.

Change-Id: Ia29e1e1f5226832ecb62ca79675ce717c9e5ef9a
Reviewed-by: Christian Kandeler <christian.kandeler@qt.io>
2020-10-02 15:53:30 +00:00
Christian Stenger
d49365e29e QmlPreview: Fix test
Change-Id: Ida6c406fb17e79ffa8d46d61984584681025db7a
Reviewed-by: Ulf Hermann <ulf.hermann@qt.io>
2020-10-02 14:59:11 +00:00
Christian Stenger
a37a02a6b3 Squish: Add test for clean whitespaces
Task-number: QTCREATORBUG-24565
Change-Id: Idd763004f6ce9f1d34b902ea2fcf5c166ce8d4cf
Reviewed-by: Robert Loehning <robert.loehning@qt.io>
2020-10-02 14:59:00 +00:00
hjk
591e93316d Consolidate build/deploystep default display name handling
Use the display name from the factory as default, override if needed.

Change-Id: I03519c998432fea4120b0de8b2fc2686644635f2
Reviewed-by: Christian Stenger <christian.stenger@qt.io>
Reviewed-by: Christian Kandeler <christian.kandeler@qt.io>
2020-10-02 13:18:45 +00:00
Leena Miettinen
46a9e35c28 Doc: Describe properties of Studio Components (shapes)
And the basic Rectangle.

Fixes: QDS-2848
Change-Id: I6a0f506ed1f1c0ec3d065823131e7eb48445c6e2
Reviewed-by: Thomas Hartmann <thomas.hartmann@qt.io>
2020-10-02 12:54:13 +00:00
hjk
60ea7f826d Update conanfile.txt to use qt/5.15.1@bincrafters/stable
Change-Id: I5e83af11b8761eac51cdf27eaa5cec2f9e2acd18
Reviewed-by: Eike Ziller <eike.ziller@qt.io>
2020-10-02 12:34:55 +00:00
Martin Kampas
10c0cdc10f CompilationDatabase: Clean paths
File paths in compile_database.json may contain redundant components
("./" or "../").  These confuse the code model, which then fails to
associate the document with the project node.

Change-Id: I7c74a24789a67b761b0737a41d1dd70d2dfd5f3d
Reviewed-by: Christian Kandeler <christian.kandeler@qt.io>
2020-10-02 12:33:25 +00:00
Robert Loehning
48a3423fcc Squish: Don't wait for the same object item twice in a row
Change-Id: Ib6ebc6f0c4fff5e29c7613dc6098da663539dc3e
Reviewed-by: Christian Stenger <christian.stenger@qt.io>
2020-10-02 12:20:56 +00:00
Christian Kandeler
7125406305 CppTools: Consider .cu files
... when switching via F4 from a .h file and vice versa.

Fixes: QTCREATORBUG-24418
Change-Id: I121967dbec90125b3feed0a9d2aceb9826f925f3
Reviewed-by: Christian Stenger <christian.stenger@qt.io>
2020-10-02 11:53:08 +00:00
Thomas Hartmann
ff99c2213b QmlDesigner: Fix crash
We have to call  updateEnabledViews() in the correct places.
AbstractView::modelAboutToBeDetached() was to late, since the view
is already removed at this point.

Change-Id: I6d71d5ea773fb7ec8ec258344498a229a30dd9b3
Reviewed-by: Thomas Hartmann <thomas.hartmann@qt.io>
2020-10-02 10:52:50 +00:00
Christian Stenger
133da9797e Designer: Allow namespaces for form editor class
Fixes: QTCREATORBUG-24723
Change-Id: I355a9ea0f5f7156bf744ab87ca19870883af936e
Reviewed-by: David Schulz <david.schulz@qt.io>
2020-10-02 10:23:01 +00:00
Vikas Pachdha
dc64ab4859 Doc: Document rendering text as an image option
Change-Id: I4be09cb18bbaea94e278141bb786b9230d8306fd
Reviewed-by: Leena Miettinen <riitta-leena.miettinen@qt.io>
2020-10-02 09:35:47 +00:00
David Schulz
a36bdfc858 Revert "CodeAssist: Avoid pointless completion request after accepting item"
is replaced by 23d63dcc8b

This reverts commit 44b71f7a16.

Change-Id: Ib5adaab4a962a54495b48e6b88ab164046526c37
Reviewed-by: Christian Kandeler <christian.kandeler@qt.io>
2020-10-02 09:32:02 +00:00
David Schulz
142c47bdc2 Designer: Fix failing test
Change-Id: I6bc9ec2007c9949b45c0f9068f12247ec50a44d5
Reviewed-by: Christian Stenger <christian.stenger@qt.io>
2020-10-02 09:31:30 +00:00
Eike Ziller
8b031c8c05 Merge remote-tracking branch 'origin/4.13' into master
Change-Id: I3f2a6c553819e992da7e9f538dc44b95b482359e
2020-10-02 10:47:07 +02:00
Thomas Hartmann
528b634e5a QmlDesigner: Disable TimelineEditorView when not visible
Change-Id: If67a027c9ad52b2b2fa62df8cf94afdd1c2c49d7
Reviewed-by: Mahmoud Badri <mahmoud.badri@qt.io>
Reviewed-by: Miikka Heikkinen <miikka.heikkinen@qt.io>
Reviewed-by: Thomas Hartmann <thomas.hartmann@qt.io>
2020-10-02 08:29:52 +00:00
Thomas Hartmann
b292de228c QmlDesigner: Disable TransitionEditorView when not visible
Change-Id: I76a1829dae18d651168f92558d65beb8b94f1f88
Reviewed-by: Mahmoud Badri <mahmoud.badri@qt.io>
Reviewed-by: Miikka Heikkinen <miikka.heikkinen@qt.io>
Reviewed-by: Thomas Hartmann <thomas.hartmann@qt.io>
2020-10-02 08:29:42 +00:00
Thomas Hartmann
51a132eb92 QmlDesigner Disable FormEditorView when not visible
Change-Id: I4bf6f3747cfd11fa31bdd386efc11fc27dbfe45c
Reviewed-by: Miikka Heikkinen <miikka.heikkinen@qt.io>
Reviewed-by: Thomas Hartmann <thomas.hartmann@qt.io>
2020-10-02 08:29:29 +00:00
hjk
72a6038f7a Help: Fix compilation on Linux
QPalette was only declared.

Change-Id: I24fa8eca4fd9fdae4be3d35ee2f392fa606fc9ab
Reviewed-by: Eike Ziller <eike.ziller@qt.io>
2020-10-02 08:09:35 +00:00
Miikka Heikkinen
cc0ca7e1ab QmlDesigner: Respect canBeContainer on drag from library to navigator
If the parent node can't be a container for the newly created node,
the newly created node is deleted within the same transaction.

Change-Id: I4f4771add3aae5b4509b3bb0a8fbabfed2e7c99e
Fixes: QDS-2660
Reviewed-by: Mahmoud Badri <mahmoud.badri@qt.io>
Reviewed-by: Thomas Hartmann <thomas.hartmann@qt.io>
2020-10-02 07:49:11 +00:00
Christian Kandeler
b55825a420 ProjectExplorer: Clean up variables
Global variables with names such as "CurrentProject*", "CurrentKit*" etc
are harmful, because the term "current project" as used in Qt Creator
does not refer to the "active project", but simply stands for the
project that contains the node that is currently selected in the project
tree, which in turn may or may not correspond to the current editor
document, depending on the "sync with editor" setting. In other words,
the "current project" is almost a random value with little meaning
outside the project tree itself.
Therefore, we remove "CurrentProject*" and friends, except the ones that
are currently intentionally in use. The latter get renamed to
"CurrentDocument:Project*", so their purpose becomes clear. Their old
names are kept around for backward compatibility, but are not suggested
by the variable chooser anymore, so new usages are unlikely and we can
remove them at some point.
We also add some ActiveProject* variants that have been requested in the
past.
Also remove the "CurrentSession" prefix that was deprecated six years
ago.

Fixes: QTCREATORBUG-12724
Fixes: QTCREATORBUG-24606
Change-Id: Ibba5d0e0ce3d2beb444a5eec01fbb9b745d90a1d
Reviewed-by: Eike Ziller <eike.ziller@qt.io>
2020-10-02 07:49:08 +00:00
Eike Ziller
da8db0f24d QLitehtml: Make container_qpainter usable without litehtml internals
We use it elsewhere to "paint" html to a printer (for generating a PDF).
It is much easier if we don't need to pull litehtml internals into that.

Change-Id: I447fa5442f02a6b5e84524f82089513f0c569939
Reviewed-by: Cristian Adam <cristian.adam@qt.io>
2020-10-02 07:32:03 +00:00
Eike Ziller
3433b8c24f Qt6: Adapt to removal of QProcess::setupChildProcess
And use QProcess::setChildProcessModifier when compiling against Qt6.

Task-number: QTCREATORBUG-24098
Change-Id: I4166a8e27f8f63dd661df119413cd2eb2ae1dc2e
Reviewed-by: Christian Kandeler <christian.kandeler@qt.io>
2020-10-02 07:25:10 +00:00
Assam Boudjelthia
df52de2828 Android: get correct value for ANDROID_DEPLOYMENT_SETTINGS_FILE for Qt 6
CMake with Qt 6 which uses android-${target}-deployment-settings.json
file name, we use substitute ${target} with the root node target name
to get the correct file name.

Task-number: QTCREATORBUG-24678
Change-Id: Ib0c82b947b3217b6b763191b22d91ab9674fedce
Reviewed-by: hjk <hjk@qt.io>
Reviewed-by: Alexandru Croitor <alexandru.croitor@qt.io>
Reviewed-by: Alessandro Portale <alessandro.portale@qt.io>
2020-10-02 07:13:08 +00:00
Assam Boudjelthia
a4f2779452 Android: use correct variable for Android SDK with CMake for Qt 6
Qt 6 for Android with CMake uses ANDROID_SDK_ROOT (similar to qmake),
instead of ANDROID_SDK.

Task-number: QTCREATORBUG-24678
Change-Id: Ic858b8d76b41b57ef35864a1981ebd142d0cccfd
Reviewed-by: hjk <hjk@qt.io>
Reviewed-by: Alessandro Portale <alessandro.portale@qt.io>
2020-10-02 07:09:15 +00:00
Thomas Hartmann
6307b094fe QmlDesigner: Add hint to set a property of the parent
This allows to do this in hints:

Hints {
   setParentProperty: "layer.enabled: true"
}

This will always set layer.enabled to true on the parent
if an item of this type is added. This is required for
adding effects from the item library.

Change-Id: Ic9600e0bbcde11df8d060d4a7ad05b4a590c8bea
Reviewed-by: Mahmoud Badri <mahmoud.badri@qt.io>
Reviewed-by: Thomas Hartmann <thomas.hartmann@qt.io>
2020-10-01 16:16:19 +00:00
Xiaofeng Wang
b6b6482c72 Add an action to format code using clang-format by lines
When the file contians non-ascii characters, the position calculated by
QTextBlock may not the same as clang-format. Format at Cursor will not
work in this case, formatting by lines as a workaround.

Fixes: QTCREATORBUG-21812
Change-Id: I4906130111ef2a2f15ffa698a14bec9430cbb3d5
Reviewed-by: Christian Kandeler <christian.kandeler@qt.io>
2020-10-01 15:04:54 +00:00
Henning Gruendl
3a0182d28e QmlDesigner: Fix exception output
Fix exception output by disabling escaping of non-printable characters.

Change-Id: I5997f6f9b70a71a1a6b1cfdad17ac88daee35f7a
Reviewed-by: Thomas Hartmann <thomas.hartmann@qt.io>
2020-10-01 14:53:16 +00:00
Thomas Hartmann
8f948397ee QmlDesigner: Add API to disable views
Since we get more and more views we require a way to disable
the notifiers.
A view that is not visible should disable itself, so
that the notifiers are not dispatched anymore.

Change-Id: I7b6f6b850264a21e287374c4fd4ab0d353d4f261
Reviewed-by: Mahmoud Badri <mahmoud.badri@qt.io>
Reviewed-by: Miikka Heikkinen <miikka.heikkinen@qt.io>
2020-10-01 14:34:22 +00:00