Use openDeclaration(Identifier) in QMLJS plugin
ClosedPublic

Authored by nalvarez on Apr 21 2017, 5:45 AM.

Details

Summary

As discussed on the mailing list, AbstractDeclarationBuilder::openDeclaration(QualifiedIdentifier) makes little sense semantically. I added an overload taking an Identifier, with the intention of deprecating and removing the QID overload in the future.

This commit makes the QMLJS plugin use the openDeclaration(Identifier) overload everywhere.

Since I made a lot of code use Identifier directly, I had to add a few conversions to QualifiedIdentifier in order to pass it to openContext. Ideally openContext should take an Identifier too, but that's harder to change (I posted a separate thread in the mailing list about it).

Test Plan

Compiled, ran unit tests. A few tests fail due to unrelated problems (could be my local environment), but the failures are exactly the same as without this commit.

Diff Detail

Repository
R32 KDevelop
Lint
Automatic diff as part of commit; lint not applicable.
Unit
Automatic diff as part of commit; unit tests not applicable.
nalvarez created this revision.Apr 21 2017, 5:45 AM
Restricted Application added a subscriber: kdevelop-devel. · View Herald TranscriptApr 21 2017, 5:45 AM
nalvarez removed a project: KDevelop.
kfunk accepted this revision.Apr 27 2017, 8:17 AM
kfunk added a subscriber: kfunk.

In the meantime, https://phabricator.kde.org/R33:76765692538d3af40374b0c9ae63eb6eb41c53c0 has been reverted. Good to go now?

Please make sure there are no new test failures. Even better: Help fixing current test failures :)

This revision is now accepted and ready to land.Apr 27 2017, 8:17 AM
nalvarez edited the test plan for this revision. (Show Details)May 5 2017, 2:11 AM
This revision was automatically updated to reflect the committed changes.