浏览代码

KonvergoWindow: turn most UI signal handlers into queued connections

Possibly helps with reentrancy issues, causing messed up window states
and crashes. Unknown whether this will help, or whether this is the true
cause of these issues.
Vincent Lang 7 年之前
父节点
当前提交
935c3f8eb1
共有 1 个文件被更改,包括 6 次插入6 次删除
  1. 6 6
      src/ui/KonvergoWindow.cpp

+ 6 - 6
src/ui/KonvergoWindow.cpp

@@ -77,21 +77,21 @@ KonvergoWindow::KonvergoWindow(QWindow* parent) :
           this, &KonvergoWindow::onVisibilityChanged);
 
   connect(this, &KonvergoWindow::screenChanged,
-          this, &KonvergoWindow::updateCurrentScreen);
+          this, &KonvergoWindow::updateCurrentScreen, Qt::QueuedConnection);
   connect(this, &KonvergoWindow::xChanged,
-          this, &KonvergoWindow::updateCurrentScreen);
+          this, &KonvergoWindow::updateCurrentScreen, Qt::QueuedConnection);
   connect(this, &KonvergoWindow::yChanged,
-          this, &KonvergoWindow::updateCurrentScreen);
+          this, &KonvergoWindow::updateCurrentScreen, Qt::QueuedConnection);
   connect(this, &KonvergoWindow::visibilityChanged,
-          this, &KonvergoWindow::updateCurrentScreen);
+          this, &KonvergoWindow::updateCurrentScreen, Qt::QueuedConnection);
   connect(this, &KonvergoWindow::windowStateChanged,
-          this, &KonvergoWindow::updateCurrentScreen);
+          this, &KonvergoWindow::updateCurrentScreen, Qt::QueuedConnection);
 
   connect(this, &KonvergoWindow::enableVideoWindowSignal,
           this, &KonvergoWindow::enableVideoWindow, Qt::QueuedConnection);
 
   connect(&PlayerComponent::Get(), &PlayerComponent::windowVisible,
-          this, &KonvergoWindow::playerWindowVisible);
+          this, &KonvergoWindow::playerWindowVisible, Qt::QueuedConnection);
 
   // this is using old syntax because ... reasons. QQuickCloseEvent is not public class
   connect(this, SIGNAL(closing(QQuickCloseEvent*)), this, SLOT(closingWindow()));