... by keying on Utils::FileName
Task-number: QTCREATORBUG-12390
Change-Id: Ia98afb5a9160a7fd9225a2f9e02539ff3c35ae86
Reviewed-by: Nikolai Kosjar <nikolai.kosjar@theqtcompany.com>
* Fixes multiple addition of same include.
* Takes over the check of AddIncludeForForwardDeclaration for forward
headers.
Task-number: QTCREATORBUG-9704
Change-Id: I84629d35ae433385942a9157e5d32ef04159d07f
Reviewed-by: Christian Stenger <christian.stenger@digia.com>
...when adding an include for an undefined identifier.
Change-Id: Ia338e924901262a847d3bd7ed9733d8e66c631dd
Task-number: QTCREATORBUG-10391
Reviewed-by: Christian Stenger <christian.stenger@digia.com>
...in AddIncludeForUndefinedIdentifier. Even without this locator filter
we can offer an refactoring action. See findIncludeForQtClass().
Change-Id: Ic616b82b0af9d59984da882e08f6ede714e85a86
Reviewed-by: Christian Stenger <christian.stenger@digia.com>
Now there is no need to position the cursor on "C" of "Namespace::C" to
trigger the quick fix. It will already trigger if the cursor is
somewhere within the name.
Change-Id: Ic99325f95b5cf5551fc74b55606c402461849fb0
Reviewed-by: Christian Stenger <christian.stenger@digia.com>
...to make the high level code path easier to follow.
Change-Id: If0ff9a15c9de399286e3a7f59a571949ca8f04de
Reviewed-by: Christian Stenger <christian.stenger@digia.com>
Limitations:
* Overloads are not yet handled
* Action is not offered if the slot can't be looked up in the
receiver expression (e.g. when it's a base class pointer).
Change-Id: I5779ff1b74657025d058d4f3690f6723b4784497
Reviewed-by: Nikolai Kosjar <nikolai.kosjar@digia.com>
Replace the CppModelManagerInterface/derived CppModelManager
combo by a more common CppModelManager/CppModelManagerPrivate
pimpl pattern.
Change-Id: Ia4582845ed94d5ef60b8571bab9b2260c6290287
Reviewed-by: Nikolai Kosjar <nikolai.kosjar@digia.com>
It logically depends on the Snapshot and has a related lifetime.
Keeping it in the Snapshot avoids some code compelxity.
Change-Id: I24ee4483b44d9b0d7f2e4d494ae7ea624b949f9c
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>
No declarator was provided but we assumed one.
Task-number: QTCREATORBUG-12853
Change-Id: I5faf96b63f39aff43c0165f7277345737e53f191
Reviewed-by: Erik Verbruggen <erik.verbruggen@digia.com>
Reviewed-by: Eike Ziller <eike.ziller@digia.com>
The ConvertFromAndToPointer quickfix allows to convert a pointer to a
stack variable and vice versa. The initializer of the declaration is
adjusted. Member accesses change to . or -> accordingly.
Usages of the & and * operators are automatically fixed.
Task-number: QTCREATORBUG-9598
Task-number: QTCREATORBUG-12733
Change-Id: I388a9bd32179c79bff808615299a91a225acea64
Reviewed-by: Nikolai Kosjar <nikolai.kosjar@digia.com>
The base pattern is FooEditor for BaseTextEditor derived classes
and FooEditorWidget for BaseTextEditorWidget derived classes. So:
CPPEditorWidget -> CppEditorWidget
CPPEditorWidgetPrivate -> CppEditorWidgetPrivate
...::EditorWidget -> PythonEditorWidget
GLSLTextEditorWidget -> GlslEditorWidget
GLSLEditorEditable -> GlslEditor
Change-Id: I76d34a3694c2fb35491982d86e83f7e4774c0be6
Reviewed-by: Daniel Teske <daniel.teske@digia.com>
Reviewed-by: Christian Stenger <christian.stenger@digia.com>
...if enum type is defined inside a class or namespace.
Task-number: QTCREATORBUG-12311
Change-Id: I71b64bbe9d419707b66caacd10550041efc1520c
Reviewed-by: Erik Verbruggen <erik.verbruggen@digia.com>
Lambdas do not have a name.
Change-Id: Ifda4816c62dcfe19bdbb1649dc1caf408e056b37
Task-number: QTCREATORBUG-12686
Reviewed-by: Daniel Teske <daniel.teske@digia.com>
Instead of having two lists of paths, now only one list is used where
both include paths and framework paths can be mixed. This reflects the
way the compiler is invoked, and retains the (correct) search order.
Task-number: QTCREATORBUG-11599
Change-Id: I373953e3e305df5b7a0d10920e12d146584adf9f
Reviewed-by: Nikolai Kosjar <nikolai.kosjar@digia.com>
If a variable's name is only "m_" it should not be recognized as a
prefix (resulting in an invalid/empty getter and meaningless setter) but
rather as a name with the "_" postfix. This way, it results in getM()
and setM().
Change-Id: I9a8249fc12319034b95532415f40b6c3183f7754
Reviewed-by: Nikolai Kosjar <nikolai.kosjar@digia.com>
And move it into its own header and source files.
Change-Id: I37401badd819e028e1d767425759dc0ff27afe31
Reviewed-by: Nikolai Kosjar <nikolai.kosjar@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>
* Remove using Utils::ChangeSet from header files
* Remove unused typedef for Range
* Add it only in source files that contain many occurrences
Change-Id: I60a8b77e2d5a46431507f53b6d60186d511ccf30
Reviewed-by: Nikolai Kosjar <nikolai.kosjar@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>
It contains many components, doesn't make sense to have it with all
other quickfixes.
Change-Id: Idede14c90ba9b612ae9e9048f5795d674811acfe
Reviewed-by: Erik Verbruggen <erik.verbruggen@digia.com>
... for functions implemented in the target class
Change-Id: I284b9965d4def13ff45190473303627f4ac0d0dc
Reviewed-by: Erik Verbruggen <erik.verbruggen@digia.com>