<table><tr><td style="">buschinski created this revision.<br />buschinski added a reviewer: KDevelop.<br />Herald added a project: KDevelop.<br />Herald added a subscriber: kdevelop-devel.<br />buschinski requested review of this revision.
</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/D16356">View Revision</a></tr></table><br /><div><strong>REVISION SUMMARY</strong><div><p>duchainitemquickopen always looks for FunctionDefinition based on the DeclarationId, but we don't need to do that if we already have a FunctionDefinition. This could cause problems if we have multiple (same) definitions.</p></div></div><br /><div><strong>TEST PLAN</strong><div><ul class="remarkup-list">
<li class="remarkup-list-item">create a small cmake (or whatever) project with 3 targets<ul class="remarkup-list">
<li class="remarkup-list-item">util1.c / util2.c / util3.c (same content):</li>
</ul></li>
</ul>

<div class="remarkup-code-block" style="margin: 12px 0;" data-code-lang="text" data-sigil="remarkup-code-block"><pre class="remarkup-code" style="font: 11px/15px "Menlo", "Consolas", "Monaco", monospace; padding: 12px; margin: 0; background: rgba(71, 87, 120, 0.08);">#include <stdio.h>
#include <stdlib.h>

void configure()
{
    printf("do stuff in %s\n", __FILE__);
}

int main(int argc, char *argv[])
{
    configure();
    puts("Hello, UTIL!");
    exit(EXIT_SUCCESS);
}</pre></div>



<ul class="remarkup-list">
<li class="remarkup-list-item">CMakeLists.txt:</li>
</ul>

<div class="remarkup-code-block" style="margin: 12px 0;" data-code-lang="text" data-sigil="remarkup-code-block"><pre class="remarkup-code" style="font: 11px/15px "Menlo", "Consolas", "Monaco", monospace; padding: 12px; margin: 0; background: rgba(71, 87, 120, 0.08);">add_executable(util1 util1.c)
add_executable(util2 util2.c)
add_executable(util3 util3.c)</pre></div>



<ul class="remarkup-list">
<li class="remarkup-list-item">open util1.c</li>
<li class="remarkup-list-item">open the outline and select "configure"</li>
<li class="remarkup-list-item">EXPECTED: it should open the configure in util1.c (or the currently opened file)</li>
<li class="remarkup-list-item">repeat with util2 and util3</li>
<li class="remarkup-list-item">ACTUAL: only one of them works, the other two point to the wrong file.</li>
</ul></div></div><br /><div><strong>REPOSITORY</strong><div><div>R32 KDevelop</div></div></div><br /><div><strong>REVISION DETAIL</strong><div><a href="https://phabricator.kde.org/D16356">https://phabricator.kde.org/D16356</a></div></div><br /><div><strong>AFFECTED FILES</strong><div><div>plugins/quickopen/duchainitemquickopen.cpp</div></div></div><br /><div><strong>To: </strong>buschinski, KDevelop<br /><strong>Cc: </strong>kdevelop-devel, glebaccon, antismap, iodelay, vbspam, geetamc, Pilzschaf, akshaydeo, surgenight, arrowd<br /></div>