Old implementation is expensive (~200ms) and this method is called
frequently. Also prevent pasting keyframes in the FormEditor.
Change-Id: Id083b553231893be31c7aab1d0da1809529316c8
Reviewed-by: Miikka Heikkinen <miikka.heikkinen@qt.io>
Reviewed-by: Thomas Hartmann <thomas.hartmann@qt.io>
Fix: When selecting more than 1 ancestor of a locked item and pressing
Delete, the locked item will appear duplicate in the warning message
box as many times as the number of selected ancestors.
Change-Id: I72c5e35edb2974da3d630a87e236b58e0d7e8ab3
Reviewed-by: Miikka Heikkinen <miikka.heikkinen@qt.io>
Reviewed-by: Henning Gründl <henning.gruendl@qt.io>
Reviewed-by: Thomas Hartmann <thomas.hartmann@qt.io>
Fix a bug in calculating the scatter value when pasting an object. Also
some tweaks and clean ups in the same file.
Fixes: QDS-2982
Change-Id: Ic2847d03ccf03d188c5fbca2cd14bc74b9d20223
Reviewed-by: Miikka Heikkinen <miikka.heikkinen@qt.io>
Reviewed-by: Thomas Hartmann <thomas.hartmann@qt.io>
A global variable is not helping for multithreading and the cache has
anyway a 1:1 relationshit to the model.
Change-Id: Ic05f32744b70ef63aa5ae7d475afc0b5b17f2f09
Reviewed-by: Tim Jenssen <tim.jenssen@qt.io>
Removed the update from old places.
ViewManager::attachItemLibraryView one was never called and
the other DesignDocument::updateFileName one gets called incorrectly
on any file rename, not just the currently open one.
Change-Id: I822ced6fe32dd9625d605e33046c808eb2272028
Fixes: QDS-2721
Reviewed-by: Thomas Hartmann <thomas.hartmann@qt.io>
Reviewed-by: Mahmoud Badri <mahmoud.badri@qt.io>
Fixes the sympton of QDS-2554, but not the real issue.
Task-number: QDS-2554
Change-Id: I8e0aca0b843bcb2befdc2d9a85b2dbfdb468ffb2
Reviewed-by: Tim Jenssen <tim.jenssen@qt.io>
For annotations this has to be a valid QML property.
Task-number: QDS-2269
Change-Id: Ib6483a9dd673ddf24b8688909c599a518dfb361c
Reviewed-by: Thomas Hartmann <thomas.hartmann@qt.io>
There are more, but we need to keep those because MSVC believes they are
required. This is the subset that satisifies both compilers.
Change-Id: I0b0a63d5496acc119a7f0513d3a1da0b76fa1fca
Reviewed-by: hjk <hjk@qt.io>
Reviewed-by: David Schulz <david.schulz@qt.io>
Reviewed-by: Eike Ziller <eike.ziller@qt.io>
If qtForMCUs is set in the qmlproject file we disable unsupported
properties like roation, transformOrigin or layer.
Change-Id: I75d9677beca3d4ce71f975b4f0ae75e63967d143
Reviewed-by: Thomas Hartmann <thomas.hartmann@qt.io>
Using lambdas we do not have to repeat the try catch block all
over again.
This also avoids sublte mistakes when catching the exception.
Change-Id: I514fa9b64f43ef08fdc27bf702ec2b173ab1dfd6
Reviewed-by: Tim Jenssen <tim.jenssen@qt.io>
More in line with QFileInfo terminonlogy which appears to be
best-of-breed within Qt.
Change-Id: I1d051ff1c8363ebd4ee56376451df45216c4c9ab
Reviewed-by: Christian Kandeler <christian.kandeler@qt.io>
No need for code duplication.
Change-Id: I3d2c795d072b8de5818e1844b8126e526339c0da
Reviewed-by: Ulf Hermann <ulf.hermann@qt.io>
Reviewed-by: David Schulz <david.schulz@qt.io>
Since context help is no longer based solely on an ID.
Change-Id: I34bb81b70632df9fb75bdcf28b022418d4aa764b
Reviewed-by: Tim Jenssen <tim.jenssen@qt.io>
Reviewed-by: Thomas Hartmann <thomas.hartmann@qt.io>
It no longer takes an ID but a HelpItem.
Change-Id: I0aa738549fea4fcfd0151adc2dfd642c63f0f60d
Reviewed-by: Tim Jenssen <tim.jenssen@qt.io>
Reviewed-by: David Schulz <david.schulz@qt.io>
The non const overloads of first() and last() do detach
if the reference count is higher than 1.
Therefore we use constFirst() and constLast() instead.
Change-Id: I737cfc428f1c21f16185b9b51175e181c0ec7068
Reviewed-by: Alessandro Portale <alessandro.portale@qt.io>
We want to be able to reuse the copy and paste code in other parts.
Therefore we move most of the code to DesignDocumentView.
Change-Id: Ia0de109e92b128aef4c18255621767280e0dcfef
Reviewed-by: Tim Jenssen <tim.jenssen@qt.io>
- detaching the TextEditView already emits the TextEditor change signal
-> so removing the call from QmlDesignerPlugin::deactivateAutoSynchronization()
- in case the user closed explicit the editor we do not want to emit any
signals anymore
Change-Id: Idb5c2cdde583f7d32f2a9ef5628d1b6d3fc7bb3f
Reviewed-by: Ulf Hermann <ulf.hermann@qt.io>
If we have a qtquickcontrols2.conf we set QT_QUICK_CONTROLS_CONF
for the qml2puppet.
For this we have to forward the project to PuppetCreator.
I forwarded the project instead of just the path to qtquickcontrols2.conf,
because we most likely add more project specific features in the future.
Change-Id: I0a90636ca6903e28499018c8d769bb07f7be5bb6
Reviewed-by: Tim Jenssen <tim.jenssen@qt.io>
This triggers an update on every qrc file.
Change-Id: Id34873e3bd8190d79773fbc3a8a90699d4e49cb0
Reviewed-by: Tim Jenssen <tim.jenssen@theqtcompany.com>
The code that this depends on is not there yet.
This reverts commit e6f0695751.
Change-Id: I61d4ff735342731a781960b19b047613b58a23b5
Reviewed-by: Tim Jenssen <tim.jenssen@theqtcompany.com>
First we try to find a project that contains the document.
We fallback to the current project.
If the kit of the active target is invalid we return 0.
Before any newly created qml file used the fallback puppet.
Change-Id: Ide3333455d85418459924e507f4f5e77afae4188
Reviewed-by: Tim Jenssen <tim.jenssen@theqtcompany.com>