D12743: Unit tests fixes

Gleb Popov noreply at phabricator.kde.org
Sat May 26 16:52:49 UTC 2018

arrowdodger added inline comments.


> kossebau wrote in test_pluginenabling.cpp:138
> Thanks for investigations, @arrowdodger . Being the one who is to blame for writing this chained code and possibly having copied the same approach elsewhere, I feel bad now.
> IIRC I wrote this code without having deeply looked at the API docs, at least I do not remember to have spotted that overload of operator[] for non-const calls :/
> Being unsure about  C++ object scope rules in such call chains, while you have your setup around, could you do me a quick favour and inspect if changing the `auto` to an explicit `QJsonValue` might save us here, or using `value(QString)` instead of `operator[QString]`?

Both using `QJsonValue` instead of `auto` or `value()` instead of `operator[]` also make the crash go away. How would you prefer me fixing this code?

  R32 KDevelop


To: arrowdodger, #kdevelop, mwolff
Cc: kossebau, mwolff, kdevelop-devel
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://mail.kde.org/pipermail/kdevelop-devel/attachments/20180526/7b7aac05/attachment.html>

More information about the KDevelop-devel mailing list