Currently we pass in some places by value, elsewhere by const ref and
for some weird reason also by const value in a lot of places. The latter
is particularly annoying, as it is also used in interfaces and therefore
forces all implementors to do the same, since leaving the "const" off is
causing compiler warnings with MSVC.
Change-Id: I65b87dc3cce0986b8a55ff6119cb752361027803
Reviewed-by: hjk <hjk121@nokiamail.com>
Assumption: model never has 1 entry for immediate result
(there is always the natural result + "Searching for overrides"
Change-Id: I5de7e7933b1309f995a6111a2ab1c7aed31c086e
Reviewed-by: Nikolai Kosjar <nikolai.kosjar@digia.com>
...instead going the way over CppClass. This makes
FunctionHelper::overrides independent of the cppeditor plugin.
Change-Id: Ifaedb94da1f67b3876e06cce9e745aaf3c1050a7
Reviewed-by: Erik Verbruggen <erik.verbruggen@digia.com>
Required for correct resolving of first virtual appearance
Change-Id: I2307027f769fb2f4c0942f4aa4e0d2b5327562b5
Reviewed-by: Nikolai Kosjar <nikolai.kosjar@digia.com>
Instead of building the hierarchy from the most basic class that
implements the virtual function, start from the looked up class.
Change-Id: Ia674fbb4a92dd45d4ca7bc621c54b411264cbe3d
Reviewed-by: Nikolai Kosjar <nikolai.kosjar@digia.com>
...when searching the overrides for virtual functions.
In case there is no override for the static type of a function call
expression, make sure to:
1) include the last provided override (look up bases)
2) and all overrides whose classes are derived from that static type
Task-number: QTCREATORBUG-10470
Change-Id: I2c01bfdc6cb35c5a01a000ebd81a2b322ce2b795
Reviewed-by: Orgad Shaneh <orgads@gmail.com>
Reviewed-by: Erik Verbruggen <erik.verbruggen@digia.com>
- Moves the findMatchingClassDeclaration() call from
FollowSymbolUnderCursor::findLink into VirtualFunctionsAssistProcessor
since we already have a SymbolFinder there
- Make canLookupVirtualFunctionOverrides a class member because we plan
to add some methods
- Better parameter names/order for FunctionHelper::overrides()
Change-Id: I0a93ff5445352d47e808adad45485e520f06946e
Reviewed-by: Erik Verbruggen <erik.verbruggen@digia.com>
...when using the mouse (Ctrl + Left click).
Task-number: QTCREATORBUG-10479
Change-Id: I54a21c449d8bb8e608d383752beb3b31c9c81783
Reviewed-by: Erik Verbruggen <erik.verbruggen@digia.com>
...by extracting parameters to a dedicated struct.
Change-Id: I2f3b83cbc62a8b4a91b44b3a729d0f0c578b53f2
Reviewed-by: Erik Verbruggen <erik.verbruggen@digia.com>
...instead declaration (F2 on a virtual function call).
Task-number: QTCREATORBUG-10287
Change-Id: Ib913bd4e777c7253659458ae17584354c7416d23
Reviewed-by: Orgad Shaneh <orgads@gmail.com>
Reviewed-by: Erik Verbruggen <erik.verbruggen@digia.com>
And before the first use outside the class. This will make sure the
template specialization is generated in the right place. If not, a
static assert is triggered when C++11 is enabled.
Change-Id: I8de7fa52a9986a1f99f3ad32696121ef565ee3b6
Reviewed-by: Jędrzej Nowacki <jedrzej.nowacki@digia.com>
Reviewed-by: Nikolai Kosjar <nikolai.kosjar@digia.com>
Reviewed-by: Orgad Shaneh <orgads@gmail.com>
* Function is pure only by its own declaration
* Support "final"
* Add unit tests
Change-Id: I8b9ded7c7336e2e42ddc551132fac974547fd634
Reviewed-by: Nikolai Kosjar <nikolai.kosjar@digia.com>
1) Virtual template functions make no sense.
2) It does not help us to find out if a function is virtual or not
Change-Id: Icb15f46b3aba5571e16fa55613a4806ad5de5940
Reviewed-by: Nikolai Kosjar <nikolai.kosjar@digia.com>
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>