Переглянути джерело

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