Selaa lähdekoodia

KonvergoWindow: strictly ignore forceFSScreen if it's empty

In theory, QScreen::name() could return an empty string. Then this could
would do something, even if the forceFSScreen setting is disabled.

Check it explicitly to avoid this. This also means the setting won't
work if a screen actually has an empty name, but such is life.
Vincent Lang 7 vuotta sitten
vanhempi
commit
9fa3a5d19d
1 muutettua tiedostoa jossa 3 lisäystä ja 0 poistoa
  1. 3 0
      src/ui/KonvergoWindow.cpp

+ 3 - 0
src/ui/KonvergoWindow.cpp

@@ -442,6 +442,9 @@ void KonvergoWindow::updateForcedScreen()
 {
   QString screenName = SettingsComponent::Get().value(SETTINGS_SECTION_MAIN, "forceFSScreen").toString();
 
+  if (screenName.isEmpty())
+    return;
+
   for (QScreen* scr : QGuiApplication::screens())
   {
     if (scr->name() == screenName)