Manually keep track of jobs sources
Review Request #123502 - Created April 25, 2015 and submitted
|Kai Uwe Broulik|
DataSource sources is a QStringList property which means changes within cannot be tracked causing all the job delegates to be destroyed and re-created when sourcesChanged it emitted. This is pretty wasteful but also causes the delegate to lose their sate (eg. details expanded).
Adding, removing and pausing jobs works as expected, when a job appears or disappears the other delegates keep their state.
The only slight imperfection is now that the indeterminate state of multiple jobs is no longer move in sync because the items are no longer created at the same time.
Rebased to current master
Revision 2 (+24 -14)
indeterminate state of multiple jobs is no longer move in sync
If this is desired, the indet. state could be reset on all the jobs that are in that state (like set it again or set different state and right back to indeterminate) when new indet. job appears