Qt: Drop Qt 6.1 workaround in Host::GetTopLevelWindowInfo()
This commit is contained in:
@@ -118,6 +118,7 @@ EmuThread::~EmuThread() = default;
|
||||
void QtHost::RegisterTypes()
|
||||
{
|
||||
// Register any standard types we need elsewhere
|
||||
qRegisterMetaType<std::optional<WindowInfo>>("std::optional<WindowInfo>()");
|
||||
qRegisterMetaType<std::optional<bool>>();
|
||||
qRegisterMetaType<std::function<void()>>("std::function<void()>");
|
||||
qRegisterMetaType<std::shared_ptr<SystemBootParameters>>();
|
||||
@@ -1632,11 +1633,8 @@ void Host::RequestExit(bool allow_confirm)
|
||||
|
||||
std::optional<WindowInfo> Host::GetTopLevelWindowInfo()
|
||||
{
|
||||
// Normally we'd just feed the std::optional all the way through here. But that won't work because of some bug
|
||||
// in Qt 6.1, and we can't upgrade that because of raging/abusive Win7 users... to anyone still using that dead
|
||||
// OS, this is a passive-aggressive "screw you".
|
||||
WindowInfo ret;
|
||||
QMetaObject::invokeMethod(g_main_window, "getWindowInfo", Qt::BlockingQueuedConnection, Q_ARG(WindowInfo*, &ret));
|
||||
std::optional<WindowInfo> ret;
|
||||
QMetaObject::invokeMethod(g_main_window, &MainWindow::getWindowInfo, Qt::BlockingQueuedConnection, &ret);
|
||||
return ret;
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user