D16356: quickopen: only look for (new/other) function definition if we don't have one
Bernd Buschinski
noreply at phabricator.kde.org
Sun Oct 21 16:48:29 BST 2018
buschinski created this revision.
buschinski added a reviewer: KDevelop.
Herald added a project: KDevelop.
Herald added a subscriber: kdevelop-devel.
buschinski requested review of this revision.
REVISION SUMMARY
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.
TEST PLAN
- create a small cmake (or whatever) project with 3 targets
- util1.c / util2.c / util3.c (same content):
#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);
}
- CMakeLists.txt:
add_executable(util1 util1.c)
add_executable(util2 util2.c)
add_executable(util3 util3.c)
- open util1.c
- open the outline and select "configure"
- EXPECTED: it should open the configure in util1.c (or the currently opened file)
- repeat with util2 and util3
- ACTUAL: only one of them works, the other two point to the wrong file.
REPOSITORY
R32 KDevelop
REVISION DETAIL
https://phabricator.kde.org/D16356
AFFECTED FILES
plugins/quickopen/duchainitemquickopen.cpp
To: buschinski, #kdevelop
Cc: kdevelop-devel, glebaccon, antismap, iodelay, vbspam, geetamc, Pilzschaf, akshaydeo, surgenight, arrowd
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://mail.kde.org/pipermail/kdevelop-devel/attachments/20181021/931d67b1/attachment.html>
More information about the KDevelop-devel
mailing list