From b5c83e671f834b1bc11cb7bdc9681d7e4a285d89 Mon Sep 17 00:00:00 2001 From: Stenzek Date: Tue, 5 Nov 2024 12:09:48 +1000 Subject: [PATCH] Qt: Drop Qt 6.7.0 workarounds Fedora 41 is out with Qt 6.8.0. --- CMakeModules/DuckStationDependencies.cmake | 4 ++-- src/duckstation-qt/logwindow.cpp | 2 +- src/duckstation-qt/qthost.cpp | 16 +--------------- src/duckstation-qt/qthost.h | 5 ----- 4 files changed, 4 insertions(+), 23 deletions(-) diff --git a/CMakeModules/DuckStationDependencies.cmake b/CMakeModules/DuckStationDependencies.cmake index badeebf4b..f7e592bb0 100644 --- a/CMakeModules/DuckStationDependencies.cmake +++ b/CMakeModules/DuckStationDependencies.cmake @@ -20,7 +20,7 @@ find_package(lunasvg 2.4.1 REQUIRED) find_package(cpuinfo REQUIRED) find_package(DiscordRPC 3.4.0 REQUIRED) find_package(SoundTouch 2.3.3 REQUIRED) -find_package(libzip 1.10.1 REQUIRED) +find_package(libzip 1.11.1 REQUIRED) if(NOT WIN32) find_package(CURL REQUIRED) @@ -40,7 +40,7 @@ if(ENABLE_WAYLAND) endif() if(BUILD_QT_FRONTEND) - find_package(Qt6 6.7.0 COMPONENTS Core Gui Widgets LinguistTools REQUIRED) + find_package(Qt6 6.8.0 COMPONENTS Core Gui Widgets LinguistTools REQUIRED) endif() find_package(Shaderc REQUIRED) diff --git a/src/duckstation-qt/logwindow.cpp b/src/duckstation-qt/logwindow.cpp index 8b7b9f58f..ea180fa42 100644 --- a/src/duckstation-qt/logwindow.cpp +++ b/src/duckstation-qt/logwindow.cpp @@ -269,7 +269,7 @@ void LogWindow::logCallback(void* pUserParam, const char* channelName, const cha const QLatin1StringView qchannel((level <= Log::Level::Warning) ? functionName : channelName); - if (EmuThread::isMainThread()) + if (QThread::isMainThread()) { this_ptr->appendMessage(qchannel, static_cast(level), qmessage); } diff --git a/src/duckstation-qt/qthost.cpp b/src/duckstation-qt/qthost.cpp index 49f59bf2d..108700946 100644 --- a/src/duckstation-qt/qthost.cpp +++ b/src/duckstation-qt/qthost.cpp @@ -131,20 +131,6 @@ EmuThread::EmuThread(QThread* ui_thread) : QThread(), m_ui_thread(ui_thread) EmuThread::~EmuThread() = default; -#if QT_VERSION < QT_VERSION_CHECK(6, 8, 0) - -bool EmuThread::isMainThread() -{ - return (QThread::currentThread() == g_emu_thread->m_ui_thread); -} - -bool EmuThread::isCurrentThread() const -{ - return QThread::currentThread() == this; -} - -#endif - void QtHost::RegisterTypes() { // Register any standard types we need elsewhere @@ -1757,7 +1743,7 @@ void EmuThread::queueAuxiliaryRenderWindowInputEvent(Host::AuxiliaryRenderWindow Host::AuxiliaryRenderWindowEventParam param2, Host::AuxiliaryRenderWindowEventParam param3) { - DebugAssert(isMainThread()); + DebugAssert(QThread::isMainThread()); QMetaObject::invokeMethod(this, "processAuxiliaryRenderWindowInputEvent", Qt::QueuedConnection, Q_ARG(void*, userdata), Q_ARG(quint32, static_cast(event)), Q_ARG(quint32, param1.uint_param), Q_ARG(quint32, param2.uint_param), diff --git a/src/duckstation-qt/qthost.h b/src/duckstation-qt/qthost.h index b01c60275..5e234c91c 100644 --- a/src/duckstation-qt/qthost.h +++ b/src/duckstation-qt/qthost.h @@ -87,11 +87,6 @@ public: static void start(); static void stop(); -#if QT_VERSION < QT_VERSION_CHECK(6, 8, 0) - static bool isMainThread(); - bool isCurrentThread() const; -#endif - ALWAYS_INLINE QEventLoop* getEventLoop() const { return m_event_loop; } ALWAYS_INLINE bool isFullscreen() const { return m_is_fullscreen; }