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>
Context help would first query the database with potential IDs, and
afterwards the help plugin would look up the links for the resulting ID
again.
Pass the HelpItem (which potentially contains the cached links) directly
to context help.
Change-Id: I73bddcd3cd4eacaea412b98d53c5e5354a31f3d5
Reviewed-by: David Schulz <david.schulz@qt.io>
- a widget is often used as a raw pointer and in most cases
the parent will take care of destructing it
- here the context is also destructing the widget
- so move back to QPointer and keep deleting to the context
Change-Id: Ief5c4faa08d5e76f723b35d33d09fafc502c2d8a
Reviewed-by: Thomas Hartmann <thomas.hartmann@qt.io>
When reformating we have to ensure the semantic info is not
outdated. If the semantic info is outdated we loose the latest changes.
We had a similar bug in the QmlJSTextEditor.
Change-Id: I38bb74c7db6d0449b692b3975d3e9eb89b7c3364
Reviewed-by: Tim Jenssen <tim.jenssen@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>
- 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>
- when puppet is restarted
- when the view is attached (switching document, switching mode)
Change-Id: I06a4acf78a18b893bca9f7cd3d2bae74dc3459aa
Reviewed-by: Thomas Hartmann <thomas.hartmann@qt.io>
The designer used a over simplified lookup,
that did not distinguish between e.g. Controls 1 and Controls 2.
Instead of fixing the lookup we simply use the working lookup from
the QmlJSEditor.
Change-Id: I2d31e633eaadc67e211d44bad307b26993f21fc9
Reviewed-by: Tim Jenssen <tim.jenssen@qt.io>
We delete the integrated text editor and set the original
text editor as the current one.
Change-Id: I2dd6c7421d4d3078dda8ca9dae8fb04553723240
Reviewed-by: Tim Jenssen <tim.jenssen@qt.io>
When we update the text we have to block the cursor
selection synchronization.
Change-Id: I79c3589482f2ca884bc4980b295b18b0a8e8ef2e
Reviewed-by: Tim Jenssen <tim.jenssen@qt.io>
The context of the text editor is not automatically set
on the widget. This is usually handled by the editor manager.
Unfortunately the completion action is handled using the editor
manager. This means the completion assist widget position depends
on the cursor position in the original text editor managed by the
editor manager.
To fix this we have to register our own action that overrides the default
completion action and triggers the completion on the correct text editor
widget.
Change-Id: I4d7524f2d5ad2374af23f886d7fd08505a3c857f
Reviewed-by: Tim Jenssen <tim.jenssen@qt.io>
All those QObjects are part of the parent child hierarchy
and do not have to be deleted manually.
This slicences two QCoreApplication::postEvent: Unexpected null receiver,
because the graphics scene is now created lazily.
Change-Id: Ibfe4aaed2173f591e90186b570f8c8bb9e708494
Reviewed-by: Tim Jenssen <tim.jenssen@qt.io>
When saving a .ui.qml file the complete file is reformated.
Without this patch the cursor is moved to the bottom.
The cursor is still moved, but they line is kept.
Since we reformat the complete file this should be fine.
Change-Id: Ia1ef003e2e6ca7497dcad7e0e8044ffb99c80ea3
Reviewed-by: Tim Jenssen <tim.jenssen@qt.io>
The integrated text editor requires a couple of fixes and features
in the error handling.
The errors are now handled by the model and not the document management
anymore.
The text editor does not get disabled if there is an error. Instead
we show the error in a status bar.
The form editor is blocked if there is a QML an error and we show the
error message inside the form editor.
Change-Id: I4bfb9b33b09e444ec1de31dd531ce83b32cbcf88
Reviewed-by: Tim Jenssen <tim.jenssen@qt.io>
When an item is selected in the navigator we move the cursor.
Change-Id: Ia6d41e4d7bdf38688cf0cd73f134c349126eb68e
Reviewed-by: Tim Jenssen <tim.jenssen@qt.io>
* Using smart pointers
* Renaming DummyWidget to TextEditorWidget
* Moving TextEditorWidget to separate file
Change-Id: Idbe0e50f976bf39beac8632d4254d6d9a5afd5b2
Reviewed-by: Ulf Hermann <ulf.hermann@qt.io>
Reviewed-by: Tim Jenssen <tim.jenssen@qt.io>
This is the first iteration but the text editor is not connect
to the others view in all expected cases.
Change-Id: I2fa29a23f9ce1d98d3d6cc8eabddb788525e39cd
Reviewed-by: Thomas Hartmann <thomas.hartmann@qt.io>