aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorGravatar Chris Xiong <chirs241097@gmail.com> 2022-09-21 00:11:13 -0400
committerGravatar Chris Xiong <chirs241097@gmail.com> 2022-09-21 00:11:13 -0400
commit1d41325a9685cf677f8eeaa4940f032931fd8780 (patch)
tree17307c1d8d01f4550045dda91068e99ec390e652
parente2776411c72723e791b088b5cf37d4d67d42b0ec (diff)
downloaddeduper-1d41325a9685cf677f8eeaa4940f032931fd8780.tar.xz
STOP CALLING GUI SH*T IN OTHER THREADS!!!
-rw-r--r--qdeduper/mingui.cpp4
1 files changed, 2 insertions, 2 deletions
diff --git a/qdeduper/mingui.cpp b/qdeduper/mingui.cpp
index f2de718..ba802c7 100644
--- a/qdeduper/mingui.cpp
+++ b/qdeduper/mingui.cpp
@@ -442,8 +442,8 @@ void DeduperMainWindow::scan_dirs(std::vector<std::pair<fs::path, bool>> paths)
this->fsc = nullptr;
return;
}
- this->pd->setMaximum(fs->file_list().size() - 1);
- this->pd->setLabelText("Scanning...");
+ int flsize = fs->file_list().size() - 1;
+ QMetaObject::invokeMethod(this->pd, [flsize, this] {this->pd->setMaximum(flsize);}, Qt::ConnectionType::QueuedConnection);
this->sdb = new SignatureDB();
QObject::connect(this->sdb, &SignatureDB::image_scanned, this, [this](size_t n) {
static auto lt = std::chrono::steady_clock::now();