Move the remaining contents to more appropriate places.
Change-Id: I55eed5c572bd33dafe2187523d9aa381c211fdd6
Reviewed-by: Tobias Hunger <tobias.hunger@digia.com>
MSVC suddenly has this problem when bulding Qt Creator master Qt5 dev.
error C2352: 'TextEditor::BaseTextEditorWidget::extraSelections' :
illegal call of non-static member function
error C2825: 'T': must be a class or namespace when followed by '::'
...
This patch works it around by simply using this->
Change-Id: I8aae3e76f80248e1dd27d87552d14a81eda0d25f
Reviewed-by: hjk <hjk121@nokiamail.com>
Turns out we don't even need two-phase initialization,
by transparently postponing registration until we get
a non-empty file name, either at constuction, or at
file name change times.
Change-Id: I3e87e47c820066e6707e946fc474ab9c1993e61f
Reviewed-by: Eike Ziller <eike.ziller@digia.com>
Currently we pass in some places by value, elsewhere by const ref and
for some weird reason also by const value in a lot of places. The latter
is particularly annoying, as it is also used in interfaces and therefore
forces all implementors to do the same, since leaving the "const" off is
causing compiler warnings with MSVC.
Change-Id: I65b87dc3cce0986b8a55ff6119cb752361027803
Reviewed-by: hjk <hjk121@nokiamail.com>
Also adding the possibility to insert text into the blockselection.
Task-number: QTCREATORBUG-7773
Change-Id: I7a47a1d630f769a8253ee1a2f21057820ea170d5
Reviewed-by: Lukas Holecek <hluk@email.cz>
Reviewed-by: Christian Stenger <christian.stenger@digia.com>
Reviewed-by: hjk <hjk121@nokiamail.com>
If contents of a text editor change from outside the editor,
the visible portion of the text in the viewport should stay the same.
That is especially apparent when opening a document in a split view, and
adding/removing lines in one of them, above the first visible line in
the other.
Task-number: QTCREATORBUG-11486
Change-Id: I28cde17ecf98cb98c1d6f1259dc66d3671585ee3
Reviewed-by: David Schulz <david.schulz@digia.com>
The editors were showing tool tips for the last cursor position in a
line, even if the mouse was hovered over the empty space behind the
line.
Task-number: QTCREATORBUG-9437
Change-Id: Ibe3b0140b73c3a15811eeaf50a15d75f378f37f4
Reviewed-by: David Schulz <david.schulz@digia.com>
Fix proposed by Alex Sokolov.
Task-number: QTCREATORBUG-12161
Change-Id: I1a7d4e9579dbb518970ea7bdb76a740e8e5d870d
Reviewed-by: Christian Stenger <christian.stenger@digia.com>
Added an option to change the behavior of the debuggercore so that
the current editor isn't always centered on the current line, to stop
unnecessary jumping of the code.
Change-Id: I9406df518bb1b977e39a0265ee7fd6fae2069ed9
Reviewed-by: hjk <hjk121@nokiamail.com>
May happen when selecting a text in diff editor.
Change-Id: I2c4790c42c91623fc8b4cabef8a4604de9fd4cef
Reviewed-by: hjk <hjk121@nokiamail.com>
Reviewed-by: David Schulz <david.schulz@digia.com>
The logic behind the old code was that it was pointless to highlight
single characters, but it didn't explain why. This is useful for
searching for single character variable names, for instance.
Change-Id: Ic8cf60190c1a9caa1eb4441921e60f377fbee8d4
Reviewed-by: Eike Ziller <eike.ziller@digia.com>
This patch implements two features:
1. Reimplement CopyLine to move text cursor at the beginning of line
2. Add copy/cutLine action to Advanced Edit menu, to make it
discoverable for editor users.
Change-Id: I0bf336ebee4dbf5afd2c759e47b1830271bd9d18
Reviewed-by: David Schulz <david.schulz@digia.com>
setPalette() does not replace the old one but rather adds the
difference. Thus a previous copy of the palette is unnecessary.
Change-Id: I5c06da456b76144efc4a984ccda13c7d2243a7bc
Reviewed-by: Eike Ziller <eike.ziller@digia.com>
Generalizes the special handling of font settings, which should only be
applied (on the document) when an editor is or becomes visible.
Change-Id: Icd1e3ba4355e1ff4a837c9679b537cc3f5ed7ea9
Reviewed-by: Fawzi Mohamed <fawzi.mohamed@digia.com>
Instead of once per editor.
Also remove a related unused function.
Change-Id: I4bcd86b9b0ec61b87500e546cf2138ec5d854561
Reviewed-by: Eike Ziller <eike.ziller@digia.com>
And remove some unnecessary code in Python editor
Change-Id: I86cde74c244a16d1b36b0ac0e841ef8110ba832f
Reviewed-by: Eike Ziller <eike.ziller@digia.com>
Lead to annoying behavior that pressing any disabled shortcut with control
modifier would lead to unwanted characters in the editor.
This reverts commit c1ff105a0c.
Change-Id: If61e52be9f11cabeafb46f5d71b901b4eab8e169
Reviewed-by: Tobias Hunger <tobias.hunger@digia.com>
Reviewed-by: Daniel Teske <daniel.teske@digia.com>
From the editor widget. Also name them autoIndent/autoReindent to
distinguish from the manual indent functions.
Change-Id: I4e1b9d503f53870b669fee66467e5e567eacefec
Reviewed-by: Eike Ziller <eike.ziller@digia.com>
I couldn't find a situation where this code actually resulted in
performance improvement.
Change-Id: I7d905af36ef11dcba43030dc83670c3d1558f650
Reviewed-by: Erik Verbruggen <erik.verbruggen@digia.com>
Also when duplicating editors, we don't want to change the document
after construction. Actually at some places (e.g. CppEditorSupport
creation) we don't handle document changes correctly, and we are only
lucky that things still (more or less?) work. Get rid of
BaseTextEditorWidget::duplicateFrom and use copy-constructor style instead.
Change-Id: I7f688b7fcc51d1bb5e222bb333f0d28479b597a6
Reviewed-by: Nikolai Kosjar <nikolai.kosjar@digia.com>