...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>
With this patch it is checked if the function/new-expression is used in
a function call or return statement the whole AST down to the
translation unit.
Task-number: QTCREATORBUG-9525
Change-Id: I34b30ee64b9436c9c9d2586c28fd22f148bee892
Reviewed-by: Nikolai Kosjar <nikolai.kosjar@digia.com>
When triggering move or insert definition outside and no other class
symbol is found in the file, the definition is moved or inserted right
after the enclosing Class.
Change-Id: I74ffa872015753ba7372e21b868d3cf7fa49e84a
Reviewed-by: Nikolai Kosjar <nikolai.kosjar@digia.com>
For the quick fix AddIncludeForUndefinedIdentifier, if no class is found
via the locator, check the "Qt include paths" for a header file with the
same name as the class name.
Task-number: QTCREATORBUG-9538
Change-Id: I13c86844c2ff653fa479dc91eb109af2a6d76fae
Reviewed-by: Lorenz Haas <lykurg@gmail.com>
Reviewed-by: hjk <hjk121@nokiamail.com>
Now definitions are inserted at the same position inside the
implementation file for MoveFuncDefOutside and InsertDefFromDecl.
Task-number: QTCREATORBUG-9389
Change-Id: If823ffd15ec39a7bc2edb53519380cb9cabb4c55
Reviewed-by: Nikolai Kosjar <nikolai.kosjar@digia.com>
...to be consistent with inserting "Outside Class" and "in xxx.cpp".
Change-Id: I32a43153d5d3bdec9fae0be731484a26b108c438
Reviewed-by: Lorenz Haas <lykurg@gmail.com>
Reviewed-by: Erik Verbruggen <erik.verbruggen@digia.com>
...by detecting include groups (separated by new lines, include types
and same dir prefix).
Task-number: QTCREATORBUG-9317
Change-Id: I73e80fdc715104901cb2d4f5b15b4cab5d04d305
Reviewed-by: Erik Verbruggen <erik.verbruggen@digia.com>
Do not trigger for functions inside a function call.
Task-number: QTCREATORBUG-9510
Change-Id: I908483fe80ff3ac0f737b21061375e206c1b1d1d
Reviewed-by: Nikolai Kosjar <nikolai.kosjar@digia.com>
Also make sure that "Apply function signature change" gets to the top
of the list.
Task-number: QTCREATORBUG-9441
Change-Id: Iaf67f8ea9c99ddfc973e610f7e0f4c35b7967629
Reviewed-by: Nikolai Kosjar <nikolai.kosjar@digia.com>
By default virtual functions of QObject, QWidget and QPaintDevice are
unchecked by default.
Change-Id: I863c3f63ee92d2ddc6f533bd8a65740e87503165
Reviewed-by: Nikolai Kosjar <nikolai.kosjar@digia.com>