Skip to content

Commit

Permalink
Qt: Drop Qt 6.7.0 workarounds
Browse files Browse the repository at this point in the history
Fedora 41 is out with Qt 6.8.0.
  • Loading branch information
stenzek committed Nov 5, 2024
1 parent ca2ed61 commit b5c83e6
Show file tree
Hide file tree
Showing 4 changed files with 4 additions and 23 deletions.
4 changes: 2 additions & 2 deletions CMakeModules/DuckStationDependencies.cmake
Original file line number Diff line number Diff line change
Expand Up @@ -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)
Expand All @@ -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)
Expand Down
2 changes: 1 addition & 1 deletion src/duckstation-qt/logwindow.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -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<u32>(level), qmessage);
}
Expand Down
16 changes: 1 addition & 15 deletions src/duckstation-qt/qthost.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down Expand Up @@ -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<quint32>(event)),
Q_ARG(quint32, param1.uint_param), Q_ARG(quint32, param2.uint_param),
Expand Down
5 changes: 0 additions & 5 deletions src/duckstation-qt/qthost.h
Original file line number Diff line number Diff line change
Expand Up @@ -87,11 +87,6 @@ class EmuThread : public QThread
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; }
Expand Down

0 comments on commit b5c83e6

Please sign in to comment.