Review Request: Add buddy document functionality to cpp plugin

Martin Heide martin.heide at gmx.net
Fri Mar 25 15:58:08 UTC 2011



> On March 24, 2011, 10:35 p.m., Dmitry Risenberg wrote:
> > Cannot compile this:
> > 
> > In file included from /data/commando/Development/KDE/kdevelop/languages/cpp/codecompletion/context.cpp:48:0:                                                 
> > /data/commando/Development/KDE/kdevelop/languages/cpp/codecompletion/../cpplanguagesupport.h:28:45: fatal error: interfaces/ibuddydocumentfinder.h: No such file or directory
> > 
> > Probably this is because https://git.reviewboard.kde.org/r/100795/ wasn't properly updated after splitting in two.

Please use this kdevelop patch together with that kdevplatform patch: https://git.reviewboard.kde.org/r/100874/
Sorry.... we forgot to update the link in the description on top of the page. That's now done.


> On March 24, 2011, 10:35 p.m., Dmitry Risenberg wrote:
> > languages/cpp/cpplanguagesupport.cpp, lines 156-163
> > <http://git.reviewboard.kde.org/r/100796/diff/3/?file=11562#file11562line156>
> >
> >     Isn't the list of mimetypes already stored somewhere inside IPlugin?

I searched, but didn't find anything yet. But also see comment below...


> On March 24, 2011, 10:35 p.m., Dmitry Risenberg wrote:
> > languages/cpp/cpplanguagesupport.cpp, lines 510-524
> > <http://git.reviewboard.kde.org/r/100796/diff/3/?file=11562#file11562line510>
> >
> >     I think it would be better to look at mimetypes, not file extensions, because 
> >     1) Your code recognizes *.cs as a buddy.
> >     2) There can be weird extensions, such as .inl, .tcc and so on.

OK, might be better. But in this case I cannot use the mimetype list from the .desktop-file, because there is only the line:
X-KDevelop-SupportedMimeTypes=text/x-chdr,text/x-c++hdr,text/x-csrc,text/x-c++src
...so no separate lists for headers and sources. So I would need again to hard-code the mimetypes (which Milian discouraged), like
QString headerMimeTypes[] = {"text/x-chdr","text/x-c++hdr"};
QString sourceMimeTypes[] = {"text/x-csrc","text/x-c++src"};

So if I get you right, you suggest this: To if path1/file1.ex1 and path2/file2.ex2 are related, I have to verify via QFileInfo that path1/file1 == path2/file2, and that one of the mimetypes specifies a c(++)header and the other one a c(++)source?


- Martin


-----------------------------------------------------------
This is an automatically generated e-mail. To reply, visit:
http://git.reviewboard.kde.org/r/100796/#review2157
-----------------------------------------------------------


On March 25, 2011, 2:23 p.m., Yannick Motta wrote:
> 
> -----------------------------------------------------------
> This is an automatically generated e-mail. To reply, visit:
> http://git.reviewboard.kde.org/r/100796/
> -----------------------------------------------------------
> 
> (Updated March 25, 2011, 2:23 p.m.)
> 
> 
> Review request for KDevelop.
> 
> 
> Summary
> -------
> 
> Add buddy document functionality to cpp plugin.
> Related to "Add smart clean up and buddy document architecture" review request (https://git.reviewboard.kde.org/r/100874/ )
> Cpp plugin implements IBuddyDocumentFinder. foo.h an foo.cpp are buddies and the header will be placed on the left of the cpp.
> 
> 
> Diffs
> -----
> 
>   languages/cpp/cpplanguagesupport.h a1736d6 
>   languages/cpp/cpplanguagesupport.cpp 7f28518 
> 
> Diff: http://git.reviewboard.kde.org/r/100796/diff
> 
> 
> Testing
> -------
> 
> See other review.
> 
> 
> Thanks,
> 
> Yannick
> 
>

-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://mail.kde.org/pipermail/kdevelop-devel/attachments/20110325/1a14091d/attachment.html>


More information about the KDevelop-devel mailing list