This was already done in all major editors and should not harm
all others.
Change-Id: I7e19d285c4b85419a9a1f9afa961addecf682eaf
Reviewed-by: Eike Ziller <eike.ziller@digia.com>
opt-out now, for all editors created by BaseTextEditorFactories.
Change-Id: I01d0a9ff26320fcd0b84ff90ff22c747cf84b84c
Reviewed-by: hjk <hjk121@nokiamail.com>
It's taken care of by the normal factory based setup now.
Change-Id: Ia53551740cf5ef2998765ea1003ba8e7f9c30e46
Reviewed-by: Christian Stenger <christian.stenger@digia.com>
Not used anymore. This also means no fallback editors need to
be created anymore.
Change-Id: I94a7f7a7038164cfa53dce7f4016628da9395e71
Reviewed-by: Christian Stenger <christian.stenger@digia.com>
That's the last user of the internal m_editor back link.
Change-Id: I32b6e617428b72dc713147cb542b726cf33b6562
Reviewed-by: Christian Stenger <christian.stenger@digia.com>
For communication with the EditorManager without explicitly
using the editor() member.
Change-Id: I89882201924682111365b28804aed28c967bd442
Reviewed-by: Christian Stenger <christian.stenger@digia.com>
Only used there, and avoids back-links to editors.
Change-Id: I81206057ce89d42aef7febb840cf9e44b869df0e
Reviewed-by: Christian Stenger <christian.stenger@digia.com>
This reduces the need for most of the remaining uses of the
editor() back link.
Change-Id: I557cf4d3b5e1986f811fb17e87bf1825ac6912c6
Reviewed-by: Christian Stenger <christian.stenger@digia.com>
There are still a few places where the EditorWidget is the primary
object, or several of them per "visible" IEditor (e.g. Diff).
Provide a means to streamline setup there, too.
Change-Id: I14cfbd68e555ebc539e707032a0e5bef563e0a36
Reviewed-by: Erik Verbruggen <erik.verbruggen@digia.com>
Fixes local use highlighting and renaming in new split, among others.
Done-with: hjk <hjk121@nokiamail.com>
Change-Id: Ic604d37d2dc0082fa4a75c2af457f60d6d6cfa66
Reviewed-by: hjk <hjk121@nokiamail.com>
The BaseTextEditorFactory will keep a collection of all
relevant creation functions (document, editor, widget,
indenter, syntax highlighter) and will use them to
create or duplicate base text editors in a uniform way.
Change-Id: I255b519e35cf1c28d5e198242f99316951a0235e
Reviewed-by: Christian Stenger <christian.stenger@digia.com>
This is needed for further refactoring in the cpp and qmljs editors.
Change-Id: Ic25525e5f468e915226e9daa8d118ff76a749e9f
Reviewed-by: Christian Stenger <christian.stenger@digia.com>
The SnippetEditorWidget setup is unusual as it doesn't have
an associated SnippetEditorFactory/SnippetEditor creation chain
and requires manual intervention. This was lost in the
conversion to the new construction scheme.
Change-Id: I0919295603432e525c2abd0da762acc8207f996c
Reviewed-by: Christian Stenger <christian.stenger@digia.com>
No need for the extra indirection here.
Change-Id: I21a303423ba52724551cca0bc82d4e4b08ab4e52
Reviewed-by: Christian Stenger <christian.stenger@digia.com>
IEditorFactory knows how to construct an *Editor, the
Editor knows how to construct the Widget.
Change-Id: I2894e6ae622cb43ef6974aac82505c1f9912ff7b
Reviewed-by: Christian Stenger <christian.stenger@digia.com>
All editors did that manually, with varying approaches. Connect once
when the document is made known to the EditorWidget instead.
Change-Id: Ib0828b08158539859f6f89c8080435a027aa06ed
Reviewed-by: Christian Stenger <christian.stenger@digia.com>
In most cases, the *Editor constructor does not need to
access the *EditorWidget.
Change-Id: I1f5c076a0f723d5d82b398e8c250c7bd1d47eb17
Reviewed-by: Christian Stenger <christian.stenger@digia.com>
This does not seem to be necessary at all (it's overwritten on each
and every setDisplaySetting() call) and is the only remaining
difference in the two remaning BaseTextEditorWidget constructor bodies.
Change-Id: I6b8c0a51cf97e12f0dffb0673b680d4bbd2f2b45
Reviewed-by: Christian Stenger <christian.stenger@digia.com>
There was document(), textDocument() and baseTextDocument().
Two should be enough...
Change-Id: Id9e41c8d857c5cb3269a9fce5ab594d34448c982
Reviewed-by: Tobias Hunger <tobias.hunger@digia.com>
Lifetime is coupled to the widgets, not the editor.
Change-Id: I01560bbdd6c399376d3a4184f0eb83e4153f830e
Reviewed-by: Tobias Hunger <tobias.hunger@digia.com>
Its lifetime is connected to the widget.
Change-Id: Iebf1a524511051f40869803426e274e8909c87e4
Reviewed-by: Christian Stenger <christian.stenger@digia.com>