Qt5/Mac header finding in KDevelop5 (clang parser??)
René J.V. Bertin
rjvbertin at gmail.com
Tue Jun 21 15:29:05 UTC 2016
On Tuesday June 21 2016 16:26:27 Milian Wolff wrote:
> > FWIW, even on Linux that file didn't get parse correctly initially, with I
> > think the main culprit being the fact that <QList> isn't found:
>
> What is "that file" here, the wrapped Qt header file in the code snippet you
> pasted? Note how "that file" would never show up in your editor. It may still
No, because that particular, wrapped file isn't named in the code. "That" referred to parsesession.cpp .
> So how is the pasted code snippet related then?
I said that it seemed like it might be related; in any case it appears to be more about finding header files on the search path than about constructing the search path.
> Interesting, someone should investigate why our embedded clang is not capable
> of parsing this. I've never seen this myself.
FWIW, I'm using libclang from llvm/clang 3.5 on linux. Note that the errors also do not show up in the problem reporter, only on the terminal when I set the trace env. variables.
> > That whole output snippet was on Linux.
>
> OK, very confusing.
Sorry, but I thought it was relevant to mention. Until now I'd never seen parsing failures on Linux due to headers not being found; I copied the trace output because it shows the reason why that happens (parsessions.cpp being "compiled" a first time without the proper -isystem arguments).
Also see below, re: /opt/local/include/qt5.
> > Is that supposed to work? It doesn't for me, at least not for the headers
> > from the system frameworks.
>
> Again, confusing. Frameworks is a macOS thing, no? Please clarify what you
> mean here.
Yeah, it's kind of confusing that KDE now has frameworks too :) I'll try to call the OS X things framework bundles.
Did you follow this thread from the beginning? The issue I reported is that KDevelop doesn't find Qt's header files which live in OS X framework bundles. CMake does set the appropriate -isystem /opt/local/libexec/qt5/Library/Frameworks/Qt*.framework/Headers arguments which *should* be enough but which aren't. As a result the parser doesn't recognise any Qt type or class.
I have myself set up symlinks to those "Headers" directories (/opt/local/include/qt5/QtFoo -> /opt/local/libexec/qt5/Library/Frameworks/QtFoo.framework/Headers). Adding /opt/local/include/qt5 as a custom search path solves the issue.
> I don't understand what you want to say with this, so I'm ignoring it for now.
> If it is relevant to the discussions, please rephrase.
Don't bother if it doesn't make sense (and you already know to stay away from gcc on OS X :)). It wasn't completely irrelevant but far from central to the issue at hand.
R.
More information about the KDevelop-devel
mailing list