From f13543c2721d1199ef9e9f96b65fde14886b9726 Mon Sep 17 00:00:00 2001 From: Klemens Nanni Date: Wed, 22 Feb 2023 08:09:16 +0400 Subject: [PATCH] fix build/clear notifications on exit on OpenBSD CMake builds ManagerLinux.cpp on `!MAC && !WIN`, that is BSD and Linux. Fix the Linux-only assumption in the shared header. Qt's `Q_OS_UNIX` is defined on Linux, BSDs and macOS alike. --- src/ChatPage.cpp | 2 +- src/notifications/Manager.h | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/src/ChatPage.cpp b/src/ChatPage.cpp index 07406cc8..37449980 100644 --- a/src/ChatPage.cpp +++ b/src/ChatPage.cpp @@ -1661,7 +1661,7 @@ ChatPage::isRoomActive(const QString &room_id) void ChatPage::removeAllNotifications() { -#if defined(Q_OS_LINUX) +#if defined(Q_OS_UNIX) && !defined(Q_OS_MACOS) notificationsManager->closeAllNotifications(); #endif } diff --git a/src/notifications/Manager.h b/src/notifications/Manager.h index ee37b3aa..129b5131 100644 --- a/src/notifications/Manager.h +++ b/src/notifications/Manager.h @@ -53,7 +53,7 @@ public slots: #if defined(NHEKO_DBUS_SYS) public: void closeNotifications(QString roomId); -#if defined(Q_OS_LINUX) +#if defined(Q_OS_UNIX) && !defined(Q_OS_MACOS) void closeAllNotifications(); #endif