diff --git a/dependencies/wintoast.pri b/dependencies/wintoast.pri index 1966436a..b8a5ee85 100644 --- a/dependencies/wintoast.pri +++ b/dependencies/wintoast.pri @@ -1,3 +1,5 @@ -INCLUDEPATH += $$PWD/../lib/wintoast/src/ -SOURCES += \ - $$PWD/../lib/WinToast/src/wintoastlib.cpp +win32 { + INCLUDEPATH += $$PWD/../lib/wintoast/src/ + SOURCES += \ + $$PWD/../lib/WinToast/src/wintoastlib.cpp +} diff --git a/src/controllers/notifications/NotificationController.cpp b/src/controllers/notifications/NotificationController.cpp index bab44b76..2b68b130 100644 --- a/src/controllers/notifications/NotificationController.cpp +++ b/src/controllers/notifications/NotificationController.cpp @@ -11,7 +11,9 @@ #include "singletons/WindowManager.hpp" #include "widgets/Window.hpp" -#include +#ifdef Q_OS_WIN +# include +#endif #include #include diff --git a/src/singletons/Toasts.cpp b/src/singletons/Toasts.cpp index af342675..33df8e3b 100644 --- a/src/singletons/Toasts.cpp +++ b/src/singletons/Toasts.cpp @@ -26,8 +26,11 @@ namespace chatterino { bool Toasts::isEnabled() { +#ifdef Q_OS_WIN return WinToastLib::WinToast::isCompatible() && getSettings()->notificationToast; +#endif + return false; } void Toasts::sendChannelNotification(const QString &channelName, Platform p) diff --git a/src/singletons/Toasts.hpp b/src/singletons/Toasts.hpp index 4ffb8d74..3a245346 100644 --- a/src/singletons/Toasts.hpp +++ b/src/singletons/Toasts.hpp @@ -15,7 +15,9 @@ public: static bool isEnabled(); private: +#ifdef Q_OS_WIN void sendWindowsNotification(const QString &channelName, Platform p); +#endif static void fetchChannelAvatar( const QString channelName, std::function successCallback);