From 980f94e493c349c6c86f1b3d05753ce3cfba38d8 Mon Sep 17 00:00:00 2001 From: Arno Date: Sat, 23 Nov 2019 15:53:37 +0100 Subject: Fix race in updateCopying If the storage is fast enough, passing a bool to updateCopying does not suffice. Then the SIGNAL with inProgress == true could arrive *after* the work is already done, leaving the copy indicator in an inconsitent state. So check the QThread directly by ->isRunning() instead of passing a bool. --- shemovcleaner.h | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'shemovcleaner.h') diff --git a/shemovcleaner.h b/shemovcleaner.h index db6399f..4553df8 100644 --- a/shemovcleaner.h +++ b/shemovcleaner.h @@ -21,7 +21,7 @@ class ShemovCleaner : public QMainWindow { void setSelectionCount(const QString &msg); void setDuration(const QString &msg); void updateFreeSpace(const QString &path); - void updateCopying(bool inProgress, const QString &count); + void updateCopying(const QString &count); void configure(); void tabChanged(int idx); void aboutThisProgram(); -- cgit v1.2.3-70-g09d2