D14710: Inject default environment group variables into debug process environment.

Vyacheslav Korneev noreply at phabricator.kde.org
Wed Aug 15 22:26:29 BST 2018


vkorneev added inline comments.

INLINE COMMENTS

> Kebianizao wrote in pdblauncher.cpp:134
> Sorry I meant:
> 
>   for(const auto &i : environment)
>   {
>            job->m_environment << i + "=" + environment[i];
>   }
> 
> But anyway, I'll stick with what @brauch suggests.

> But anyway, I'll stick with what @brauch suggests.

Sure. The version suggested by @brauch is the best one here. The one I was thinking about is wrong, because dereferencing QMap`s const_iterator returns value, not the pair or key (I didn't notice that).

@brauch's version is right and the scope of the iterator is more limited than in your first version, so it's better. Although, if you're not modifying anything, maybe you can use cbegin() and cend() instead of begin() and end(), but as @brauch said it really doesn't matter much.

REPOSITORY
  R53 KDevelop: Python Support

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

To: Kebianizao, #kdevelop
Cc: brauch, vkorneev, apol, kdevelop-devel, antismap, iodelay, vbspam, geetamc, Pilzschaf, akshaydeo, surgenight, arrowd
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://mail.kde.org/pipermail/kdevelop-devel/attachments/20180815/866c1b2f/attachment-0001.html>


More information about the KDevelop-devel mailing list