Rename functionDeclarationForCalledDeclaration -> functionForCalled and tweak types.

Authored by flherne on Nov 29 2016, 12:44 AM.



(unchanged from the one I linked on IRC)

Take a Declaration* instead of DeclarationPointer.

Returns struct { FunctionDeclaration* declaration, bool isConstructor } instead of QPair<FunctionDeclarationPointer, bool>.

Struct for readable attribute names rather than .first and .second.

Drop the magic pointer type because most callers only wrap a normal one for this call anyway.
Sanity-check? I don't see a need for them, and many other helper methods use normal pointers.

Test Plan

No test changes or regressions, no (intended) behaviour changes.
Tested on a couple of projects, didn't crash.

Diff Detail

R53 KDevelop: Python Support
Automatic diff as part of commit; lint not applicable.
Automatic diff as part of commit; unit tests not applicable.
flherne updated this revision to Diff 8579.Nov 29 2016, 12:44 AM
flherne retitled this revision from to Rename functionDeclarationForCalledDeclaration -> functionForCalled and tweak types..
flherne updated this object.
flherne edited the test plan for this revision. (Show Details)
flherne added a reviewer: brauch.
flherne set the repository for this revision to R53 KDevelop: Python Support.
Restricted Application added a subscriber: kdevelop-devel. · View Herald TranscriptNov 29 2016, 12:44 AM
brauch accepted this revision.Nov 29 2016, 11:17 PM
brauch edited edge metadata.

+1, as discussed on IRC -- replacing QPair is always good ;)

This revision is now accepted and ready to land.Nov 29 2016, 11:17 PM
This revision was automatically updated to reflect the committed changes.