Fix possible race in bin job count

parent 22ddedb5
......@@ -509,6 +509,7 @@ void SmallJobLabel::slotTimeLineFinished()
void SmallJobLabel::slotSetJobCount(int jobCount)
{
QMutexLocker lk(&locker);
if (jobCount > 0) {
// prepare animation
setText(i18np("%1 job", "%1 jobs", jobCount));
......
......@@ -123,6 +123,7 @@ private:
QTimeLine *m_timeLine;
QAction *m_action{nullptr};
QMutex locker;
public slots:
void slotSetJobCount(int jobCount);
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment