Commit Graph

9 Commits

Author SHA1 Message Date
Nikolai Kosjar
dd06a4188d Core: Return context help id by callback
...to support asynchronous providers.

Change-Id: I483489c74e7886d5bc2bf00b65540c3d2c7afee0
Reviewed-by: Eike Ziller <eike.ziller@qt.io>
2018-01-18 13:54:02 +00:00
Friedemann Kleint
b7cdd90e55 QmlDesigner: Fix spelling of API
CurserSelectionSyncronisation -> CursorSelectionSynchronisation

Change-Id: I1370d0153d566e1c54f1e00f8c2339bfc9e33a5c
Reviewed-by: Tim Jenssen <tim.jenssen@qt.io>
2017-09-13 11:53:15 +00:00
Thomas Hartmann
aa451eecbc QmlDesigner: Block cursor updates by ModelToTextMerger
When we update the text we have to block the cursor
selection synchronization.

Change-Id: I79c3589482f2ca884bc4980b295b18b0a8e8ef2e
Reviewed-by: Tim Jenssen <tim.jenssen@qt.io>
2017-03-08 11:23:05 +00:00
Thomas Hartmann
f581ad7ded QmlDesigner: Override shortcuts in text editor
There are a couple of known shortcuts that we have to override
in the text editor. We install an event filter and handle
the shortcut override event for the keys in question.

Change-Id: Icb5483b19e2202d85e99d24c20d05097aaa33da6
Reviewed-by: Tim Jenssen <tim.jenssen@qt.io>
2017-01-19 15:59:34 +00:00
Thomas Hartmann
cba001eff8 QmlDesigner: Do not move cursor when reformating
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>
2017-01-19 12:34:49 +00:00
Thomas Hartmann
759db2b7b6 QmlDesigner: Polish error handling for integrated text editor
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>
2017-01-10 15:58:36 +00:00
Thomas Hartmann
c27d7c00d6 QmlDesigner: Move cursor to selected item
When an item is selected in the navigator we move the cursor.

Change-Id: Ia6d41e4d7bdf38688cf0cd73f134c349126eb68e
Reviewed-by: Tim Jenssen <tim.jenssen@qt.io>
2017-01-06 12:30:12 +00:00
Thomas Hartmann
e540f2eda5 QmlDesigner: Synchronize selection with cursor position
We always the select the item that contains the cursor,
so the user can use the property editor.
This even works for non visible items.

Change-Id: I5573e6d9be4b478f764ab6960a3b5742136dcee9
Reviewed-by: Tim Jenssen <tim.jenssen@qt.io>
2017-01-06 12:29:56 +00:00
Thomas Hartmann
79d8b9c133 QmlDesigner: Refactoring TextEditorView
* 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>
2017-01-06 11:47:03 +00:00