Qt: Drop Qt 6.1 workaround in Host::GetTopLevelWindowInfo()

This commit is contained in:
Stenzek
2023-11-27 00:15:55 +10:00
parent c40cc4ef43
commit 5a0a6ebe06
3 changed files with 11 additions and 10 deletions

View File

@ -2645,11 +2645,14 @@ void MainWindow::checkForSettingChanges()
updateWindowState();
}
void MainWindow::getWindowInfo(WindowInfo* wi)
std::optional<WindowInfo> MainWindow::getWindowInfo()
{
std::optional<WindowInfo> opt_wi(QtUtils::GetWindowInfoForWidget(this));
if (opt_wi.has_value())
*wi = opt_wi.value();
if (!m_display_widget || isRenderingToMain())
return QtUtils::GetWindowInfoForWidget(this);
else if (QWidget* widget = getDisplayContainer())
return QtUtils::GetWindowInfoForWidget(widget);
else
return std::nullopt;
}
void MainWindow::onCheckForUpdatesActionTriggered()