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>
The MoveDeclarationOutOfIf quick fix modified a IfStatementAST in case
there were several such ASTs in interface->path(). The resulting AST was
invalid (else_statement was pointing to 'this' afterwards), thus the
afterwards executed PointerDeclarationFormatter (an ASTVisitor) was not
able to finish his visit.
The actual problem was that op->pattern in the match() calls was not
reset.
Task-number: QTCREATORBUG-10919
Change-Id: Ifbcac73e75690321ef45b6d8c2dc32fcea236efa
Reviewed-by: Erik Verbruggen <erik.verbruggen@digia.com>
For the quick fix InsertDefOperation ("Add Definition ...") the order of
the offered operations is reversed to better support the typical use
case of inserting the definition in the corresponding source file.
Change-Id: I0cc502663c43fdeb4773a99d2cd5ae8ddf62f9f0
Reviewed-by: Christian Kandeler <christian.kandeler@digia.com>
Reviewed-by: Erik Verbruggen <erik.verbruggen@digia.com>
Only methods as programming functions are affected. Besides renaming
some actions like "Switch Between Function Declaration/Definition" this
mostly touches (api) code comments.
This is a follow-up patch to commit 872bfb7.
Change-Id: Icb65e8d73b59a022f8885b14df497169543a3b92
Reviewed-by: hjk <hjk121@nokiamail.com>
When a class was directly assigned to a variable the definition was
misplaced right after the variable.
Task-number: QTCREATORBUG-10303
Change-Id: I2cdfee784b085d856d7ff5ebe62bf791b9a6754e
Reviewed-by: Orgad Shaneh <orgads@gmail.com>
Reviewed-by: Nikolai Kosjar <nikolai.kosjar@digia.com>
Rewrites post increment/decrement operators (++ and --) as pre
increment/decrement operators and moves non string/numeric literals and
non id expressions from loops condition to loops initializer.
Change-Id: Id95334b6df6fcaa9af436cc1d2d0982d38bf8fe2
Reviewed-by: Leena Miettinen <riitta-leena.miettinen@digia.com>
Reviewed-by: Nikolai Kosjar <nikolai.kosjar@digia.com>
This function is generally useful when dealing with free functions.
Change-Id: I52c0057b587d81c4b0eddac24e4d7659f80cf840
Reviewed-by: Nikolai Kosjar <nikolai.kosjar@digia.com>
This also fixes a bug with setting text cursor in InsertDefOperation in
case of split editors (where the cursor could be set in a non-active
editor on the target file).
Change-Id: I1c011386537bc88a89d4d66bec79dfe06faac3c6
Reviewed-by: Erik Verbruggen <erik.verbruggen@digia.com>
Reviewed-by: Nikolai Kosjar <nikolai.kosjar@digia.com>
...in order to better tell apart the type related functions
isScope()/asScope() and the functions dealing with enclosing scopes:
* scope() --> enclosingScope()
* setScope() --> setEnclosingScope()
* resetScope() --> resetEnclosingScope()
Change-Id: Id743a7d1b6a1a1a0ffcd8568cbd8ebbdfc16eaa1
Reviewed-by: Fawzi Mohamed <fawzi.mohamed@digia.com>
* Affected quick fixes: InsertDefFromDecl, MoveFuncDefOutside
* Fix also reformating pointer declaration of operator functions for
qualified name ids
Change-Id: I6a7578f496221557d103f5fdbb5dacc9540ee779
Reviewed-by: Erik Verbruggen <erik.verbruggen@digia.com>
Now InsertDefFromDecl finds the right implementation file and the speed
of match() is improved.
Task-number: QTCREATORBUG-9627
Change-Id: Ibff824f52124e8cc10ccb6a97c133e11565473db
Reviewed-by: Orgad Shaneh <orgads@gmail.com>
Reviewed-by: Nikolai Kosjar <nikolai.kosjar@digia.com>
Consequent use of insertLocationForMethodDefinition respects the
surrounding namespace when moving/inserting definitions.
Task-number: QTCREATORBUG-2676
Task-number: QTCREATORBUG-9332
Change-Id: I6d83cf84d844dd4773900d03563581c88befa7b7
Reviewed-by: Nikolai Kosjar <nikolai.kosjar@digia.com>