D15955: clang: Also detect Clang builtin dirs at runtime

Friedrich W. H. Kossebau noreply at phabricator.kde.org
Fri Oct 5 12:11:54 BST 2018


kossebau added inline comments.

INLINE COMMENTS

> clanghelpers.cpp:375
>      static const auto dir = []() -> QString {
> -        auto dir = qgetenv("KDEV_CLANG_BUILTIN_DIR");
> -        if (dir.isEmpty()) {
> -            dir = KDEV_CLANG_BUILTIN_DIR;
> +        auto dir = QString::fromUtf8(qgetenv("KDEV_CLANG_BUILTIN_DIR"));
> +        if (!dir.isEmpty()) {

Always confused about those, but should this not be QString::fromLocal8Bit, given it's consuming a raw string from the system?
Not that there might be actually and non-UTF8 around these days, but given the method exists, let's use it.

REPOSITORY
  R32 KDevelop

REVISION DETAIL
  https://phabricator.kde.org/D15955

To: kfunk, kossebau, aaronpuchert
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/20181005/fc5af465/attachment.html>


More information about the KDevelop-devel mailing list