It's a property of the document implementation, not of the specific
editor instance working on it.
Change-Id: I5c3dd054e21b646e2d94b891916a096d045923f8
Reviewed-by: hjk <hjk121@nokiamail.com>
Reviewed-by: Eike Ziller <eike.ziller@digia.com>
This change
* Removes IMode::type, ModeManager::activateModeType, and
IEditor::preferredModeType, and adds IEditor::isDesignModePreferred
instead
* Adapts the mode switching code in EditorManager to handle multiple
windows, for example switching to edit mode should only happen if
the editor/view is in the main window. Otherwise the editor window
should be raised and focused
* Renames EditorManager::NoActivate --> DoNotChangeCurrentEditor
* Reverts the EditorManager::ModeSwitch logic to switch mode or
make the current editor visible by default, introducing
DoNotMakeVisible flag instead
* Fixes a few instances where EditorManager::ModeSwitch should have been
used
One non-trivial problem left: If you open a .ui file and switch to an
external editor window, edit mode is activated, because the current
editor no longer is a .ui file, which means that the design mode gets
deactivated.
Change-Id: I76c5c2391eb4090143b778fb103acff3a5a1ff41
Reviewed-by: David Schulz <david.schulz@digia.com>
Which appeared after pressing "..." mark and scrolling right.
Change-Id: I779d4a7e76ebb01857d7313b5099a5482c455136
Reviewed-by: Orgad Shaneh <orgads@gmail.com>
Currently it's not possible to respect language specific tab
settings in diff editor. It can happen that one view
contains C++/Qt Quick files, while tab settings
are common for the whole view.
Change-Id: I45c6113afd7d41667b68a4daba0ac0fa4472b4e9
Reviewed-by: Orgad Shaneh <orgads@gmail.com>
Crash occurs in diff editor when there is a block selection
and you are changing context lines number.
This workarounds the crash, but it seems that
when BaseTextEditorWidget has a blockSelection
calling "clear()" and "setPlainText()"
causes the crash. When I turn off the
blockSelection before calling "clear()" it helps.
Change-Id: I0133862a2d7e2914c16368b7efa9986b4d56ff39
Reviewed-by: David Schulz <david.schulz@digia.com>
In addition rename int start -> startPosition and int end -> endPosition
to avoid a name clash with QTextBlock start inside
BaseTextEditorWidget::createMimeDataFromSelection().
Change-Id: I7f54e4046913b5d5d9ddd3c07fd2747b4ca6f3fb
Reviewed-by: hjk <hjk121@nokiamail.com>
Reviewed-by: David Schulz <david.schulz@digia.com>
Create a common method for a similar code.
Simplify some logical operations.
Change-Id: If25703c51ea96fe5a64698f6fa3ffd6f5cb1b2c5
Reviewed-by: Friedemann Kleint <Friedemann.Kleint@digia.com>
It was causing troubles while scrolling. Replace it with
\n and hack selection. Simplify the code. Now every line
is a separate block. Prepare for expanding skipped lines.
Change-Id: I8d305681c575abdaaf9cdbf26de864dd3a906d3a
Reviewed-by: David Schulz <david.schulz@digia.com>
Reviewed-by: hjk <hjk121@nokiamail.com>