* Remove the static function since it's not really needed
* Make it independent of SemanticInfo
Change-Id: I8d8ea5578f5f9364a26c543277e56bdb5b947049
Reviewed-by: Erik Verbruggen <erik.verbruggen@digia.com>
Now CppEditorWidget is much less convoluted with the local rename mode.
This class can be reused since there is no dependency on
CPPEditorWidget.
Change-Id: If513e59a03214cf9f2e3831f7e3616c001e1f036
Reviewed-by: Erik Verbruggen <erik.verbruggen@digia.com>
* Kill duplicate code
* Kill useless forwarding function
* Regroup some declarations
* Replace include by declaration
Change-Id: I54656e4e97b1fbdf7cf2f4a87d17955128f3825e
Reviewed-by: Erik Verbruggen <erik.verbruggen@digia.com>
This one will get some more functionality.
Change-Id: Ifba410e32f98c28cbfbb5a72493906ab3d681225
Reviewed-by: Erik Verbruggen <erik.verbruggen@digia.com>
* Excess includes and forward declarations
* Access protection levels
* QTC_OVERRIDE
* Remove declared but not implemented/used functions.
* Remove unused class
Change-Id: Ia19ddddccd9adde827a7875b466fde5ca4d96e7d
Reviewed-by: Erik Verbruggen <erik.verbruggen@digia.com>
In the light of Obj-C properties this seems to annoy more than to help.
Change-Id: I48f92d505035369f48e8798d0972ef00306bdde0
Reviewed-by: Eike Ziller <eike.ziller@digia.com>
Reviewed-by: Erik Verbruggen <erik.verbruggen@digia.com>
...since it's superseded by the class Matcher.
For consistency, rename FullySpecifiedType::isEqualTo() to match().
Change-Id: I07640f9218d814e0350265de45f05929e5d595a9
Reviewed-by: Erik Verbruggen <erik.verbruggen@digia.com>
In most cases we need to work with the utf16 indices. Only in
cppfindreferences the byte interface is still needed since there we read
in files and work on a QByteArray to save memory.
Change-Id: I6ef6a93fc1875a8c9a305c075d51a9ca034c41bb
Reviewed-by: Erik Verbruggen <erik.verbruggen@digia.com>
* Consolidate code dealing with C++ identifiers into cpptoolsreuse.h
* Handle code points that are represented with two QChars
Change-Id: I4fb4435aa539f65d88598cac0b50629f33f32440
Reviewed-by: Erik Verbruggen <erik.verbruggen@digia.com>
...especially in CppTools/CppEditor where the offsets are used with a
QString/QTextDocument.
Change-Id: Ic6d18fbc01fb9cc899a9bd2d7424cd2edae487f1
Reviewed-by: Erik Verbruggen <erik.verbruggen@digia.com>
This will avoid confusion when later more length and indices methods are
added.
In Token:
length() --> bytes()
begin() --> bytesBegin()
end() --> bytesEnd()
Change-Id: I244c69b022e239ee762b4114559e707f93ff344f
Reviewed-by: Erik Verbruggen <erik.verbruggen@digia.com>
They are already inlined. Now it's easier to find read-only accesses.
Change-Id: I9aaeca3bc5860e3a20a536a2484925e4334c005f
Reviewed-by: Erik Verbruggen <erik.verbruggen@digia.com>
Move item model implementation to private, adjust user code.
Change-Id: Ifbe94e7c7b9b1e8be1b4c531958dbd7a9413af13
Reviewed-by: Eike Ziller <eike.ziller@digia.com>
The combobox only allows to switch between top level items via the
scroll wheel. Fix that by implementing a ::wheelEvent() handler.
Change-Id: I793a79322d9b00ebe30fc6e0452f8b383bb4a8a0
Reviewed-by: Nikolai Kosjar <nikolai.kosjar@digia.com>
...so we can rehighlight if it's requested by the editor. This is e.g.
necessary if the font size changes.
Task-number: QTCREATORBUG-11502
Change-Id: I608921899fc37fcf1394db9ff041e6b378196bdd
Reviewed-by: Erik Verbruggen <erik.verbruggen@digia.com>
e.g. changing cursor position or editing text.
CPPEditorWidget::updateUses() does not depend on the highlighter, but
only on the semantic info update.
Task-number: QTCREATORBUG-11367
Change-Id: Ia9f5ed7c2adc6899995a5d966a20e45b2f87d9e3
Reviewed-by: Erik Verbruggen <erik.verbruggen@digia.com>
It was jumping to the symbol location in the active editor instead of
the editor for the combo box.
Task-number: QTCREATORBUG-11157
Change-Id: Ic261f2dd214c15ff41c8342a6ef72626b7db0f86
Reviewed-by: David Schulz <david.schulz@digia.com>
For some reason it doesn't like signals with QFutures. Going back to
pointers, but copying the future from there when it's used.
Change-Id: I8dea0817b4e59ede6874ab8be01f22a92e7402a0
Reviewed-by: Erik Verbruggen <erik.verbruggen@digia.com>
The CPPEditorWidget retained two futures, as did the attached future
watchers retained them too. Together, each future and the watcher held
on to a complete snapshot that would only get released when another
future was set. This could result into retaining old snapshots in
editors that were invisible/unused for long.
Change-Id: I1133e857c620437b4a69b9dad468f6bd458304b8
Reviewed-by: Erik Verbruggen <erik.verbruggen@digia.com>
That avoids a complete reparse of the document when font settings
change, but in turn now requires an explicit redo of semantic
highlighting in that case.
The cpp editor part of this patch is actually still doing semantic
parsing though. This will be fixed up in a later patch.
Change-Id: I6f51a18cba6325856c96e155700eb912f6d3aad5
Reviewed-by: Fawzi Mohamed <fawzi.mohamed@digia.com>
And remove some unnecessary code in Python editor
Change-Id: I86cde74c244a16d1b36b0ac0e841ef8110ba832f
Reviewed-by: Eike Ziller <eike.ziller@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>
It's not necessary, since we have signals for that. And it's wrong to
handle the additional preprocessor directives there anyway.
The update if the editor supports objective-c/c++ is now done in a
mimeTypeChanged signal handler, the update of the additional
preprocessor directives on filePathChanged.
Change-Id: If88c70f5321c2bc21a21673e96be2598dc9ecf04
Reviewed-by: Eike Ziller <eike.ziller@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>
It was never called with a sensible value anyhow, and only complicates things.
Change-Id: I005848700b6c00114d91495670d4a0e15a2d2e64
Reviewed-by: Eike Ziller <eike.ziller@digia.com>