Review Request 122915: check we are started from the correct thread before starting timer

David Edmundson david at davidedmundson.co.uk
Thu Mar 12 13:27:58 UTC 2015



> On March 12, 2015, 12:50 p.m., David Edmundson wrote:
> > src/plasma/theme.cpp, line 424
> > <https://git.reviewboard.kde.org/r/122915/diff/1/?file=354535#file354535line424>
> >
> >     Would it work to:
> >     
> >     QMetaObject::invoke(d->rectSaveTimer, SLOT("start()"));
> >     
> >     that will mean we always use the timer?
> 
> Marco Martin wrote:
>     Seems so: does invokeMethod always call it from the own thread?

It will be called in the thread of the receiver.

https://doc-snapshots.qt.io/qt5-5.4/qt.html#ConnectionType-enum


- David


-----------------------------------------------------------
This is an automatically generated e-mail. To reply, visit:
https://git.reviewboard.kde.org/r/122915/#review77358
-----------------------------------------------------------


On March 12, 2015, 1:25 p.m., Marco Martin wrote:
> 
> -----------------------------------------------------------
> This is an automatically generated e-mail. To reply, visit:
> https://git.reviewboard.kde.org/r/122915/
> -----------------------------------------------------------
> 
> (Updated March 12, 2015, 1:25 p.m.)
> 
> 
> Review request for Plasma.
> 
> 
> Repository: plasma-framework
> 
> 
> Description
> -------
> 
> rectSaveTimer is used to event compress the save and sync of the configuration file that is used as a cache of the rectangles of svg items (in order to avoid svg renderers creation when possible)
> there is exactly one situation where it seems to not work: during creation of svgitems/framesvgitems, insertintorectcache ends up being called by another thread than the Theme's qobject thread, and that is not allowed. so in this case 
> 
> during normal svg resizes, all goes as before
> 
> 
> Diffs
> -----
> 
>   src/plasma/theme.cpp 18d4ed6 
> 
> Diff: https://git.reviewboard.kde.org/r/122915/diff/
> 
> 
> Testing
> -------
> 
> 
> Thanks,
> 
> Marco Martin
> 
>

-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://mail.kde.org/pipermail/plasma-devel/attachments/20150312/e02751e1/attachment-0001.html>


More information about the Plasma-devel mailing list