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>
Otherwise we might end up with a messed up project
file.
Change-Id: I432d45063092d0a5dead3ef975ba3ce5294c1af0
Reviewed-by: David Schulz <david.schulz@qt.io>
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>
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>
... 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>
First mechanical step here is to derive SavedActions from BaseAspect
instead of QAction.
Change-Id: I2ec95883b825462c1d867f83cc2b3bd2c2732055
Reviewed-by: Christian Stenger <christian.stenger@qt.io>
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>
To advertise the docs on GitHub.
Task-number: QTCREATORBUG-21179
Change-Id: I39bac5cfb8f9749966c3b879b0a89c4e62d934f4
Reviewed-by: Eike Ziller <eike.ziller@qt.io>
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>
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>
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>
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>
... 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>
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>
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>
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>
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>
And use QProcess::setChildProcessModifier when compiling against Qt6.
Task-number: QTCREATORBUG-24098
Change-Id: I4166a8e27f8f63dd661df119413cd2eb2ae1dc2e
Reviewed-by: Christian Kandeler <christian.kandeler@qt.io>
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>
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>
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>
Fix exception output by disabling escaping of non-printable characters.
Change-Id: I5997f6f9b70a71a1a6b1cfdad17ac88daee35f7a
Reviewed-by: Thomas Hartmann <thomas.hartmann@qt.io>
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>