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.
This commit is contained in:
jp9000 2022-07-26 06:54:42 -07:00
parent db789cfa44
commit 2df1ad5b39

View File

@ -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();