From 2df1ad5b391b0e4bb7127cddc8d6d0a67d50619c Mon Sep 17 00:00:00 2001 From: jp9000 Date: Tue, 26 Jul 2022 06:54:42 -0700 Subject: [PATCH] UI: Ensure thread signal posts to UI thread This is more of a safety precaution to ensure that the "what's new" thread only executes its result function in the UI thread when emitted, because the result function can read/write config files. --- UI/window-basic-main.cpp | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/UI/window-basic-main.cpp b/UI/window-basic-main.cpp index ca01c7403..2d7384451 100644 --- a/UI/window-basic-main.cpp +++ b/UI/window-basic-main.cpp @@ -2066,7 +2066,7 @@ void OBSBasic::OnFirstLoad() if (cef) { WhatsNewInfoThread *wnit = new WhatsNewInfoThread(); connect(wnit, &WhatsNewInfoThread::Result, this, - &OBSBasic::ReceivedIntroJson); + &OBSBasic::ReceivedIntroJson, Qt::QueuedConnection); introCheckThread.reset(wnit); introCheckThread->start(); @@ -2180,7 +2180,7 @@ void OBSBasic::ReceivedIntroJson(const QString &text) new WhatsNewBrowserInitThread(QT_UTF8(info_url.c_str())); connect(wnbit, &WhatsNewBrowserInitThread::Result, this, - &OBSBasic::ShowWhatsNew); + &OBSBasic::ShowWhatsNew, Qt::QueuedConnection); whatsNewInitThread.reset(wnbit); whatsNewInitThread->start();