D14710: Inject default environment group variables into debug process environment.
Raúl Sánchez Siles
noreply at phabricator.kde.org
Wed Aug 15 21:58:24 BST 2018
Kebianizao added a comment.
In D14710#309769 <https://phabricator.kde.org/D14710#309769>, @brauch wrote:
> Thanks for the patch!
>
> Sorry, it has been years since I looked at the debugger code. Why do you need to set the environment twice, once on the job and once on the process? Otherwise, this looks fine.
As I review the code, I slowly remember what the "improved" version did. I think what it does is first storing the environment profile name in a DebugSession class member and then merging the default process environment with the profile environment variables in the DebugSession start function. If you have the patience I'll fix this differential following the initial approach and afterwards I'll consolidate the simplified environment handling approach in a new differential.
INLINE COMMENTS
> brauch wrote in debugsession.cpp:98
> No, you are right, it's fine like you have it
OK.
> Kebianizao wrote in pdblauncher.cpp:134
> I well may wrong, but what I can tell is that:
> environment is a QMap<QString,QString>
> when I do:
> for(const auto &i: environment), i type is QString so I should have to write this chunk as:
>
> for(const auto &i : environment)
> {
> job->m_environment << environment[i];
> }
>
> I don't know if this is what you were thinking.
> Now I got to this, maybe this is a good idea. I can submit the patch with this change if you like.
> Reference: https://stackoverflow.com/questions/8517853/iterating-over-a-qmap-with-for#8529237
Sorry I meant:
for(const auto &i : environment)
{
job->m_environment << i + "=" + environment[i];
}
But anyway, I'll stick with what @brauch suggests.
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/d2c14cd6/attachment.html>
More information about the KDevelop-devel
mailing list