From 8dc55144bf7d5581a1c13b5dbe5b79730df080b3 Mon Sep 17 00:00:00 2001 From: "d.kilic" <d.kilic@fz-juelich.de> Date: Wed, 26 Jul 2023 11:05:56 +0200 Subject: [PATCH] Delete concurrent call to updateImage This commit deletes the concurrent call to updateImage, since it lead to instability. Especially on Mac, PeTrack would randomly freeze and perform poorly overall; sometimes even crash. (Due to functions executed on different threads which should only be executed from a specific thread, potentially over a queued connection, i.e. signal-slot) --- src/player.cpp | 4 +--- 1 file changed, 1 insertion(+), 3 deletions(-) diff --git a/src/player.cpp b/src/player.cpp index 8ea02e614..9453f3dab 100644 --- a/src/player.cpp +++ b/src/player.cpp @@ -33,7 +33,6 @@ #include <QStyle> #include <QToolButton> #include <QVBoxLayout> -#include <QtConcurrent> Player::Player(Animation *anim, QWidget *parent) : QWidget(parent) { @@ -250,8 +249,7 @@ bool Player::updateImage() } qApp->processEvents(); - QFuture<void> future = QtConcurrent::run([&]() { mMainWindow->updateImage(mImg); }); - future.waitForFinished(); + mMainWindow->updateImage(mImg); if(mRec) { -- GitLab