...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>
"Add Definition Inside/Outside Class" was wrongly shown when there was
already an definition outside the class.
Change-Id: I6409080c6a1a3abdd4511f7db14ecb4f63458411
Reviewed-by: Nikolai Kosjar <nikolai.kosjar@digia.com>
Words longer than 5 characters are always capitalized when
book-style caps are used.
Change-Id: I61d34aab74eb2fa3028681ef36b553347a0c34b1
Reviewed-by: Nikolai Kosjar <nikolai.kosjar@digia.com>
This quick fix inserts (pure) virtual functions of base classes to the
current class. For selecting the functions which should be inserted and
for choosing the insertion mode (only declarations or with definitions
inside, outside or in the implementation file) a dialog is shown.
Task-number: QTCREATORBUG-2210
Task-number: QTCREATORBUG-2692
Task-number: QTCREATORBUG-3908
Task-number: QTCREATORBUG-5868
Task-number: QTCREATORBUG-7982
Change-Id: I8e94905afcae4778986f4c3925a494e0c6b3b8ee
Reviewed-by: Nikolai Kosjar <nikolai.kosjar@digia.com>
Includes of moc files are not considered while determining the new
include's position. Further the new include is inserted at its
"alphabeticaly sorted" position.
Task-number: QTCREATORBUG-8871
Change-Id: I67b40a6f538112753298b960da488e24f4643808
Reviewed-by: Nikolai Kosjar <nikolai.kosjar@digia.com>
Now one can decide where the new definition should go: Inside the class,
outside the class or to the implementation file. Further the text cursor
is positioned inside the new created definition body.
Task-number: QTCREATORBUG-6973
Change-Id: I593955dd1e44e35240fa1e9b9a5c1a67eb119456
Reviewed-by: Leena Miettinen <riitta-leena.miettinen@digia.com>
Reviewed-by: Nikolai Kosjar <nikolai.kosjar@digia.com>
Caused by a dangling pointer of a template instantiation which had been
cloned into the wrong control. The fix is to remove that control and
refer to the control of the bindings (which is the correct one).
Change-Id: I951a60f2e613aae1e4ac901ce99c820212018709
Reviewed-by: Nikolai Kosjar <nikolai.kosjar@digia.com>
Reviewed-by: Erik Verbruggen <erik.verbruggen@digia.com>
Adds a local variable which stores the return value of a function call
or new expression.
Task-number: QTCREATORBUG-9052
Change-Id: I1fccbdd5b9f28c8409a4b0fa24610e406de61b24
Reviewed-by: Nikolai Kosjar <nikolai.kosjar@digia.com>
You can write definition of function, type Alt+Enter, as usual,
and select not only public but also other possible sections
like private, public slots and so on.
Change-Id: I2faefc3833c6f05c9e2e5a2a41328bcdbe17ba14
Reviewed-by: Nikolai Kosjar <nikolai.kosjar@digia.com>
operator+ is the official way for concatenating strings whereas operator%
is an optimization that needs certain defines.
The code which was using operator % is not performance critical.
Change-Id: I4c7f4310cc5708aa5f9009672d932f913a2eb59f
Reviewed-by: Erik Verbruggen <erik.verbruggen@digia.com>
Reviewed-by: Christian Kandeler <christian.kandeler@digia.com>
With this new operation it is possible to move a function definition
from a cpp file to the header file or vice versa. One can also move a
function definition outside the class body.
Task-number: QTCREATORBUG-516
Task-number: QTCREATORBUG-5364
Change-Id: Id3daefe79284bd9086282369c9d251e003951c11
Reviewed-by: Nikolai Kosjar <nikolai.kosjar@digia.com>
Moved content of cppinsertdecldef.(cpp|h) cppcompleteswitch.(cpp|h)
cppinsertqtpropertymembers.(cpp|h) and ApplyDeclDefLinkChanges to
cppquickfixes.(cpp|h).
Made msgQtStringLiteralDescription private member function of
WrapStringLiteral, added anonymous namespace, "extracted" useful
functions to the top of cppquickfixes.cpp.
Change-Id: I4f82a005a62be3c29d4b96902667bd3a2b9397cc
Reviewed-by: Nikolai Kosjar <nikolai.kosjar@digia.com>
If there are no includes, add new include at the top of file but skip
possible comments at the beginning.
Task-number: QTCREATORBUG-8799
Change-Id: Ie2be644f6ad0a948cf3d8700efa00087753d9863
Reviewed-by: Nikolai Kosjar <nikolai.kosjar@digia.com>
Ran script to remove inludes on a trial-and-error basis and
manually corrected it.
Change-Id: I61a5c2fff02616f6883ddf3923e4361fca6bf92b
Reviewed-by: Erik Verbruggen <erik.verbruggen@digia.com>
... and adjust INCLUDEPATH accordingly.
while i'm at messing with include statements, also re-order the include
blocks according to policy and sort them within bigger blocks.
Change-Id: I7762abfd7c4ecf59432b99db2f424e4fa25733a5
Reviewed-by: Tobias Hunger <tobias.hunger@digia.com>
Reviewed-by: Eike Ziller <eike.ziller@digia.com>
- Put declarations into quickfixes.h to simplify testing
- Give the factories more meaningful names
Change-Id: If74c29a8c17819d5369ffa3df94d146b14e53af9
Reviewed-by: Erik Verbruggen <erik.verbruggen@digia.com>