Commit Graph

10 Commits

Author SHA1 Message Date
Nikolai Kosjar
0c62b29f97 CppEditor: Fix position of virtual override list
...when using the mouse (Ctrl + Left click).

Task-number: QTCREATORBUG-10479

Change-Id: I54a21c449d8bb8e608d383752beb3b31c9c81783
Reviewed-by: Erik Verbruggen <erik.verbruggen@digia.com>
2013-10-24 11:50:28 +02:00
Nikolai Kosjar
61c0de88c2 CppEditor: Simplify VirtualFunctionAssist{Processor,Provider}
...by extracting parameters to a dedicated struct.

Change-Id: I2f3b83cbc62a8b4a91b44b3a729d0f0c578b53f2
Reviewed-by: Erik Verbruggen <erik.verbruggen@digia.com>
2013-10-24 11:50:11 +02:00
Nikolai Kosjar
3e79d33d85 CppEditor: Trigger override search for reference types
...if the access token is T_DOT.

Task-number: QTCREATORBUG-10286
Change-Id: I85621a8166d4f18b3099488ac0ac05a0d6982c43
Reviewed-by: Orgad Shaneh <orgads@gmail.com>
Reviewed-by: Erik Verbruggen <erik.verbruggen@digia.com>
2013-10-24 11:47:49 +02:00
Nikolai Kosjar
e79d4ed2e1 CppEditor: Follow Symbol Under Cursor opens the preprocessor dialog
... when invoked on a macro that is defined inside that dialog.

Change-Id: I419c6675d70cfb8dd174f6a33f502b4c584baa3a
Reviewed-by: David Schulz <david.schulz@digia.com>
2013-10-22 15:58:54 +02:00
hjk
2b532c73ee CPlusPlus: Make (sub-)languague selection more generic
Change-Id: I4e2df6992b446adec662ab07671acd41715e41fd
Reviewed-by: Nikolai Kosjar <nikolai.kosjar@digia.com>
2013-10-15 16:22:28 +02:00
Friedemann Kleint
31b8fbbcbf Fix MSVC-warnings in CppEditor.
cppfollowsymbolundercursor.cpp(174) : warning C4100: 'widget' :
unreferenced parameter

cppvirtualfunctionassistprovider.cpp(61) : warning C4138: '*/' found
outside of comment

Change-Id: I9c14aff54b88daa6eda9a217db2fc314e9f07742
Reviewed-by: Nikolai Kosjar <nikolai.kosjar@digia.com>
2013-10-04 09:43:41 +02:00
Joerg Bornemann
1ee1416646 CppEditor: fix follow symbol under cursor in SIGNAL/SLOT macros
If the cursor was on the first character of a SIGNAL/SLOT name in a
QObject::connect call, the detection in findLinkAt failed.
Token::end() is the first position behind the token, so we must check
if positionInBlock is less than tk.end().
An extra branch has been added to handle the case where the cursor is
on the opening parenthesis after the identifier within a SIGNAL/SLOT
macro. This worked before, because of the "fuzziness" of the former
condition.

Task-number: QTCREATORBUG-10264

Change-Id: I2122bc2c13af1eb6c37dba9134d2b5ab931f80a9
Reviewed-by: Nikolai Kosjar <nikolai.kosjar@digia.com>
2013-10-01 15:53:02 +02:00
Joerg Bornemann
321ac6cc51 CppEditor: fix "follow symbol under cursor" for operators
Like for functions we can call attemptFuncDeclDef for operators. The
check for function names has been enhanced to take operators into
account.
For the switch from definition to declaration
SymbolFinder::findMatchingDeclaration has been enriched with operator
knowledge.

Task-number: QTCREATORBUG-7485

Change-Id: I29eebee337e26c8bf67dc8b4a15c43883045589d
Reviewed-by: Nikolai Kosjar <nikolai.kosjar@digia.com>
2013-10-01 15:43:33 +02:00
Nikolai Kosjar
11aeaea86f CppEditor: "Follow Symbol Under Cursor" for virtual functions
F2 on a virtual function call presents a list of overrides in derived
classes. The function declaration of the static type is shown
immediately at the top.

Task-number: QTCREATORBUG-9611

Change-Id: I80ce906fa06272dc9fbd1662cd17500b8c77067f
Reviewed-by: Joerg Bornemann <joerg.bornemann@digia.com>
2013-10-01 14:23:00 +02:00
Nikolai Kosjar
ab9846a9f8 CppEditor: findLinkAt() delegates to FollowSymbolUnderCursor
Moves functionality of CPPEditorWidget::findLinkAt into a newly created
class FollowSymbolUnderCursor. This slim downs cppeditor.cpp a bit and
makes Follow Symbol Under Cursor more easily testable.

Change-Id: I106c7fbfc6869dd13c75381fbe87c90dc88998a7
Reviewed-by: Joerg Bornemann <joerg.bornemann@digia.com>
2013-10-01 12:22:50 +02:00