Преглед изворни кода

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