D5889: Keep QIcon::fromTheme in main thread
David Edmundson
noreply at phabricator.kde.org
Tue May 16 15:31:59 UTC 2017
davidedmundson created this revision.
Restricted Application added projects: Plasma on Wayland, Frameworks.
Restricted Application added subscribers: Frameworks, plasma-devel.
REVISION SUMMARY
QIcon::fromTheme is not thread safe, we can't have it done in the future watcher.
We can solve this by returning null in the watcher, and doing fromTheme in the main thread
when the watcher finishes if we don't have an icon.
(offtopic, I once made the obvious patch to Qt, but it was rejected with
the response that QIcon isn't entirely thread safe, and that apparently
meant none of it should be, which I don't fully agree with but whatever...)
TEST PLAN
Current unit tests still pass
REPOSITORY
R127 KWayland
BRANCH
master
REVISION DETAIL
https://phabricator.kde.org/D5889
AFFECTED FILES
src/client/plasmawindowmanagement.cpp
To: davidedmundson, #plasma
Cc: plasma-devel, #frameworks, ZrenBot, spstarr, progwolff, lesliezhai, ali-mohamed, jensreuterberg, abetts, eliasp, sebas, apol, hein, lukas
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://mail.kde.org/pipermail/kde-frameworks-devel/attachments/20170516/ad04d997/attachment-0001.html>
More information about the Kde-frameworks-devel
mailing list