D5447: Only add auto-detected compilers to model if they actually exist
noreply at phabricator.kde.org
Thu Jan 24 16:38:06 GMT 2019
arrowd added a comment.
In D5447#399235 <https://phabricator.kde.org/D5447#399235>, @mwolff wrote:
> the path of the compiler is now always the path of the compiler in the local host, which breaks when you have a runtime with a different setup.
Hum. Before being passed to `rt->pathInHost()`, the compiler path gets wrapped into `KDevelop::Path`. Doesn't this make it absolute/invalid? Judging from `Path::Path(QString)` constructor, it should't even accept things like `"gcc"`.
And what are we checking there? I still don't make any sense from this check.
> So, the question really is: Why was the code inloc 213 in `compilerprovider.cpp` not working for you? If `gcc` wasn't installed, we should get:
> - `compiler->path() == "gcc"`, i.e. not absolute
> - `QStandardpaths::findExecutable("gcc", path)` should always return false for all the entries in your `PATH`
> - we should thus never set the gcc compiler
> please debug why the above didn't work for you
Are you talking about old code? Then it is not `QStandardpaths::findExecutable("gcc", path)` that doesn't work for me, it is `QFileInfo::exists(rt->pathInHost())` part. Why do we skip adding a compiler if it **does** exist?
To: arrowd, mwolff, arichardson
Cc: skalinichev, apol, kdevelop-devel
-------------- next part --------------
An HTML attachment was scrubbed...
More information about the KDevelop-devel