Просмотр исходного кода

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.
jp9000 3 лет назад
Родитель
Сommit
2df1ad5b39
1 измененных файлов с 2 добавлено и 2 удалено
  1. 2 2
      UI/window-basic-main.cpp

+ 2 - 2
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();