hopefully it will now compile on linux

This commit is contained in:
apa420 2018-09-01 13:01:54 +02:00
parent 05d0b20919
commit ca5bb104db
4 changed files with 13 additions and 4 deletions

View file

@ -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
}

View file

@ -11,7 +11,9 @@
#include "singletons/WindowManager.hpp"
#include "widgets/Window.hpp"
#include <wintoastlib.h>
#ifdef Q_OS_WIN
# include <wintoastlib.h>
#endif
#include <QDesktopServices>
#include <QDir>

View file

@ -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)

View file

@ -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<void(QString)> successCallback);