| Commit message (Collapse) | Author | Age | Files | Lines |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
There was no proper separation of responsibilities between these
plugins. In particular, CppTools had lots of editor-related
functionality, so it's not clear why it was separated out in the first
place.
In fact, for a lot of code, it seemed quite arbitrary where it was put
(just one example: switchHeaderSource() was in CppTools, wheras
switchDeclarationDefinition() was in CppEditor).
Merging the plugins will enable us to get rid of various convoluted
pseudo-abstractions that were only introduced to keep up the artificial
separation.
Change-Id: Iafc3bce625b4794f6d4aa03df6cddc7f2d26716a
Reviewed-by: Christian Stenger <christian.stenger@qt.io>
|
|
|
|
|
|
|
| |
clang-tidy fixes from modernize-use-override check.
Change-Id: I0e6d6a9df3e87b8042ccc5ea0adc70070a3821d6
Reviewed-by: Ivan Donchevskii <ivan.donchevskii@qt.io>
|
|
|
|
|
|
|
|
| |
Provide refactoring engine for ClangCodeModel and
implement missing methods.
Change-Id: If5c913e0c5a7941cd2ced54d0fcfa4d625eadc93
Reviewed-by: Nikolai Kosjar <nikolai.kosjar@qt.io>
|
|
|
|
|
|
|
|
|
|
| |
Make this highlighting work without builtin code model
but based on the HighlightingMarks that we already have
from ClangCodeModel.
Redundant parameters are removed by this change.
Change-Id: I73b5dab46ba59d2f813236831818f0a9bc94c5bc
Reviewed-by: Nikolai Kosjar <nikolai.kosjar@qt.io>
|
|
|
|
|
|
|
|
|
| |
Invoke follow symbol in clang backend
if env variable QTC_CLANG_FOLLOW_SYMBOL is 1.
Does not include backend implementation.
Change-Id: Ia20a677830ebdd7f24800af5c5d6e8b1bf579205
Reviewed-by: Nikolai Kosjar <nikolai.kosjar@qt.io>
|
|
|
|
|
|
|
|
|
| |
Let CppUseSelectionsUpdater delegate the work to
*EditorDocumentProcessor so that the clang code model can also provide
results.
Change-Id: I6872afbfeea1a5c4a64fdf19fcb1992f134dde08
Reviewed-by: Marco Bubke <marco.bubke@qt.io>
|
|
|
|
|
| |
Change-Id: I8c84660b28c3e76b2cedd08ff3b44a38583f38a0
Reviewed-by: David Schulz <david.schulz@qt.io>
|
|
|
|
|
|
|
| |
Kudos to cgmb and https://github.com/cgmb/guardonce
Change-Id: Ifa8970734b8d43fd08c9260c645bdb0228633791
Reviewed-by: Tobias Hunger <tobias.hunger@theqtcompany.com>
|
|
|
|
|
|
|
| |
* Update files in src/plugins
Change-Id: Ia5d77fad7d19d4bb3498e78661982f68729adb22
Reviewed-by: Tobias Hunger <tobias.hunger@theqtcompany.com>
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
Fix use-after-free for the following case:
1. Open an editor
2. Trigger a long processing completion
(e.g. simulate with QThread::msleep in
CppCompletionAssistInterface::getCppSpecifics)
3. ...and immediately close the editor (e.g. with Ctrl+W)
4. Wait until it crashes.
The completion thread relied on the BuiltinEditorDocumentParser object,
which is deleted once the editor is closed. Fixed by sharing the
ownership of that object between the *EditorDocumentProcessor and the
completion assist interface.
This case came up when doing tests for the bug report below.
Task-number: QTCREATORBUG-14991
Change-Id: I0b009229e68fc6b7838740858cdc41a32403fe6f
Reviewed-by: David Schulz <david.schulz@theqtcompany.com>
|
|
|
|
|
|
|
|
| |
* Unneeded private declared constructors
* Q_DISABLE_COPY for classes deriving from QObject (not copyable)
Change-Id: I89669e8bb062cda16bab5812e2ac591f9dcf4af2
Reviewed-by: Marco Bubke <marco.bubke@theqtcompany.com>
|
|
|
|
|
|
|
|
|
|
|
|
| |
...for the not visible documents.
First reset the extra additional formats, then set the new ones, not the
other way around.
Task-number: QTCREATORBUG-14579
Change-Id: Iae465bd9a7bb0a397fd4917df45955713aaf87c5
Reviewed-by: Orgad Shaneh <orgads@gmail.com>
Reviewed-by: David Schulz <david.schulz@theqtcompany.com>
|
|
|
|
|
|
|
|
| |
semanticRehighlight() does a bit more than only rehighlighting and we
want to trigger (only) rehighlighting in a follow-up change.
Change-Id: Ic8da9ec8643f0f82f7c99ef9a8180b2868194254
Reviewed-by: Orgad Shaneh <orgads@gmail.com>
|
|
|
|
|
| |
Change-Id: I1b239a666b6605035e0f9c140d940e8c260bafd3
Reviewed-by: Nikolai Kosjar <nikolai.kosjar@theqtcompany.com>
|
|
|
|
|
| |
Change-Id: I711d5fb475ef814a1dc9d2822740e827f3f67125
Reviewed-by: Alessandro Portale <alessandro.portale@digia.com>
|
|
|
|
|
|
|
|
|
|
| |
This makes the editor document snapshot accessible through
BaseEditorDocumentProcessor since we need it for the include hierarchy
if the the clang code model is activated.
Task-number: QTCREATORBUG-13553
Change-Id: I7214cc578d05fe5cad6e12b4d29fe6f840a88e8d
Reviewed-by: Erik Verbruggen <erik.verbruggen@theqtcompany.com>
|
|
|
|
|
|
|
| |
The messages were computed, but not added to the document.
Change-Id: Ibeea802cf9f291ad14b2fe2e9d2a285c927a4449
Reviewed-by: Nikolai Kosjar <nikolai.kosjar@theqtcompany.com>
|
|
|
|
|
| |
Change-Id: I0acde2c3b995693de682679471f03af85bdd0a61
Reviewed-by: Alessandro Portale <alessandro.portale@digia.com>
|
|
|
|
|
|
|
|
|
| |
First step of some more 'Base' removal in TextEditor.
s/Core::TextDocument/Core::BaseTextDocument/
s/TextEditor::BaseTextDocument/TextEditor::TextDocument/
Change-Id: I71ba325a2f0ad72ec9dae0d96846cbae72d326f7
Reviewed-by: hjk <hjk121@nokiamail.com>
|
|
|
|
|
|
|
|
|
| |
This patch removes src/libs/utils/qtcoverride.h
and uses Q_DECL_OVERRIDE from Qt 5 instead.
Change-Id: I61ffa539648ffe996dc061eec7708c04580c0f09
Reviewed-by: Eike Ziller <eike.ziller@digia.com>
Reviewed-by: Fawzi Mohamed <fawzi.mohamed@digia.com>
|
|
|
|
|
|
|
| |
...since they are pointless.
Change-Id: I1c7925d3b1ad33ac0f1dc372797e3ab9a4bdc4b3
Reviewed-by: Erik Verbruggen <erik.verbruggen@digia.com>
|
|
|
|
|
|
|
|
|
| |
...so that SemanticInfoUpdater does not depend anymore on the
EditorDocumentParser. Accessing the snapshot was a blocking operation
that delayed the semantic info update longer than actually needed.
Change-Id: I348d22ef83ab310d4319b2e8b9678fe90ee24d6a
Reviewed-by: Erik Verbruggen <erik.verbruggen@digia.com>
|
|
|
|
|
| |
Change-Id: Ia91b4262d9dad60492f9175e453c950473689a8a
Reviewed-by: Nikolai Kosjar <nikolai.kosjar@digia.com>
|
|
This mainly takes CppEditorSupport apart.
* Parsing is now invoked by CPPEditorDocument itself by listening to
QTextDocument::contentsChanged().
* Upon construction and destruction CPPEditorDocument creates and
deletes an EditorDocumentHandle for (un)registration in the model
manager. This handle provides everything to generate the working copy
and to access the editor document processor.
* A CPPEditorDocument owns a BaseEditorDocumentProcessor instance that
controls parsing, semantic info recalculation and the semantic
highlighting for the document. This is more or less what is left from
CppEditorSupport and can be considered as the backend of a
CPPEditorDocument. CPPEditorDocument itself is quite small.
* BuiltinEditorDocumentProcessor and ClangEditorDocumentProcessor
derive from BaseEditorDocumentProcessor and implement the gaps.
* Since the semantic info calculation was bound to the widget, it
also calculated the local uses, which depend on the cursor
position. This calculation got moved into the extracted class
UseSeletionsUpdater in the cppeditor plugin, which is run once the
cursor position changes or the semantic info document is updated.
* Some more logic got extracted:
- SemanticInfoUpdater (logic was in CppEditorSupport)
- SemanticHighlighter (logic was in CppEditorSupport)
* The *Parser and *Processor classes can be easily accessed by the
static function get().
* CppHighlightingSupport is gone since it turned out to be useless.
* The editor dependency in CompletionAssistProviders is gone since we
actually only need the file path now.
Change-Id: I49d3a7bd138c5ed9620123e34480772535156508
Reviewed-by: Orgad Shaneh <orgads@gmail.com>
Reviewed-by: Erik Verbruggen <erik.verbruggen@digia.com>
|