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>
There are conceptually only two: one that operates a new document,
and one that shares one. Being explicit makes moving data over to
the Editor hierarchy easier. Convenience can be re-added there,
later.
Change-Id: I9b34ff26628c99ffff01201dcf99332d5e7253e9
Reviewed-by: Christian Stenger <christian.stenger@digia.com>
Reviewed-by: hjk <hjk121@nokiamail.com>
Goal is to consolidate "controller" related data in the *Editor hierarchy.
This patch introduces temporary "cross-Private" accessors dd() to
keep the patches small.
First item moved is the AutoCompleter, a glimps at long term benefits
is the simplification in the JavaEditorWidget which is now essentially
a BaseTextEditorWidget, only containing the still-wrong createEditor().
But that can only be move if the *Editors are self-contained, i.e.
keep data themselves, not indirectly through the *EditorWidgets.
Change-Id: Ia0ab90f0322bb17ac20458e6581069eed30acbaf
Reviewed-by: Christian Stenger <christian.stenger@digia.com>
Reviewed-by: hjk <hjk121@nokiamail.com>
In case of the CppEditor a direct member is not possible due
to setup restrictions inside the CppEditor machinery. I'd expect
that to be fixable when the editor base system is in good shape.
Change-Id: I184e219ca2dff6f67c9b58c182212eb12972cc84
Reviewed-by: Christian Stenger <christian.stenger@digia.com>
No need for most of the machinery.
Change-Id: I9078174582d83da94c6c7f20282fd3a5f1742911
Reviewed-by: Christian Stenger <christian.stenger@digia.com>
Reviewed-by: hjk <hjk121@nokiamail.com>
Qt 5.4 is adding ref-qualified overloads to toUpper, toLower, trimmed
and some others, so the cast becomes ambiguous or just plain wrong.
Change-Id: Idff0b3e100f075b9b995aeb84d88575afecb2d6f
Reviewed-by: hjk <hjk121@nokiamail.com>
Same patter. Plain is fully merged now, so remove the files, too.
Change-Id: Id8c0ba5689ad9980a0db3580cb9833344fd911f3
Reviewed-by: Tobias Hunger <tobias.hunger@digia.com>
Reviewed-by: Christian Stenger <christian.stenger@digia.com>