<table><tr><td style="">nalvarez created this revision.<br />nalvarez added a project: KDevelop.<br />Restricted Application added a subscriber: kdevelop-devel.
</td><a style="text-decoration: none; padding: 4px 8px; margin: 0 8px 8px; float: right; color: #464C5C; font-weight: bold; border-radius: 3px; background-color: #F7F7F9; background-image: linear-gradient(to bottom,#fff,#f1f0f1); display: inline-block; border: 1px solid rgba(71,87,120,.2);" href="https://phabricator.kde.org/D5533" rel="noreferrer">View Revision</a></tr></table><br /><div><strong>REVISION SUMMARY</strong><div><p>As discussed on the mailing list, <tt style="background: #ebebeb; font-size: 13px;">AbstractDeclarationBuilder::openDeclaration(QualifiedIdentifier)</tt> makes little sense semantically. I added an overload taking an <tt style="background: #ebebeb; font-size: 13px;">Identifier</tt>, with the intention of deprecating and removing the QID overload in the future.</p>
<p>This commit makes the QMLJS plugin use the <tt style="background: #ebebeb; font-size: 13px;">openDeclaration(Identifier)</tt> overload everywhere.</p>
<p>Since I made a lot of code use <tt style="background: #ebebeb; font-size: 13px;">Identifier</tt> directly, I had to add a few conversions to <tt style="background: #ebebeb; font-size: 13px;">QualifiedIdentifier</tt> in order to pass it to <tt style="background: #ebebeb; font-size: 13px;">openContext</tt>. Ideally <tt style="background: #ebebeb; font-size: 13px;">openContext</tt> should take an <tt style="background: #ebebeb; font-size: 13px;">Identifier</tt> too, but that's harder to change (I posted a separate thread in the mailing list about it).</p></div></div><br /><div><strong>TEST PLAN</strong><div><p>Compiled, ran unit tests. The tests don't actually pass due to unrelated problems (eg. <a href="https://phabricator.kde.org/R33:76765692538d3af40374b0c9ae63eb6eb41c53c0" style="background-color: #e7e7e7;
border-color: #e7e7e7;
border-radius: 3px;
padding: 0 4px;
font-weight: bold;
color: black;text-decoration: none;" rel="noreferrer">R33:76765692</a>), but the failures are exactly the same as without this commit.</p></div></div><br /><div><strong>REPOSITORY</strong><div><div>R32 KDevelop</div></div></div><br /><div><strong>BRANCH</strong><div><div>master</div></div></div><br /><div><strong>REVISION DETAIL</strong><div><a href="https://phabricator.kde.org/D5533" rel="noreferrer">https://phabricator.kde.org/D5533</a></div></div><br /><div><strong>AFFECTED FILES</strong><div><div>languages/qmljs/duchain/declarationbuilder.cpp<br />
languages/qmljs/duchain/declarationbuilder.h<br />
languages/qmljs/duchain/frameworks/nodejs.cpp</div></div></div><br /><div><strong>To: </strong>nalvarez<br /><strong>Cc: </strong>kdevelop-devel, geetamc, Pilzschaf, akshaydeo, surgenight, arrowdodger<br /></div>