Am 28.09.2011 09:21, schrieb Christian Kamm:
> On Wednesday 28 September 2011 08:21:18 ext Wilhelm wrote:
>> if you create a subdirs-project with 2 or more qt-application-projects
>> containing source- and header-files with the same names, then the switch
>> between source- and header-files via F4 (F2) chooses the wrong file. It
>> looks like it searches all subprojects and selects the first matching
>> filename regardless of the subproject.
>>
>> Are there any wordarounds? Is this a know bug?
>
> It's not a known bug. Pressing F4 should look for matches in the same
> directory before checking the files of the current project - where it will 
> take
> the first match.

If have this situation, all is fine:

subdirsproject/p01/test.cc
subdirsproject/p01/test.h
subdirsproject/p02/test.cc
subdirsproject/p02/test.h

if you thena add this:

subdirsproject/p03/test.cpp       <-- attention: cpp instead of cc
subdirsproject/p03/test.h

qtcreator gets confused:
e.g. it switches p01/test.cc -> p01/test.h -> p03/test.cpp

Ok, just tested: if I rename the file to p03/test.cc all is fine ;-)

>
> That means as long as header and source are in the same directory, it should
> always work. If you have a layout like
>
> subproject1/include/foo.h
> subproject1/src/foo.c
> subproject2/include/foo.h
> subproject2/src/foo.c
>
> I can imagine it navigating to the wrong file. If that's your case, please 
> make
> a report about it. We could prefer jumping to the matching file in the same
> subproject.
>
> If you want to give it a try yourself, the logic is in
> CppToolsPlugin::correspondingHeaderOrSourceI.
>
> Regards,
> Christian


-- 
Wilhelm

_______________________________________________
Qt-creator mailing list
[email protected]
http://lists.qt.nokia.com/mailman/listinfo/qt-creator

Reply via email to