Fix MacOS build.

square-messages
Black Hat 2018-10-20 09:53:35 +08:00
parent c80ff1380e
commit dd5c361b32
2 changed files with 2 additions and 0 deletions

View File

@ -117,5 +117,6 @@ win32 {
}
mac {
QMAKE_LFLAGS += -framework Foundation -framework Cocoa
SOURCES += src/notifications/managermac.mm
}

View File

@ -30,6 +30,7 @@ NotificationsManager::postNotification(
notif.title = roomName.toNSString();
notif.subtitle = QString("%1 sent a message").arg(senderName).toNSString();
notif.informativeText = text.toNSString();
notif.soundName = NSUserNotificationDefaultSoundName;
[[NSUserNotificationCenter defaultUserNotificationCenter] deliverNotification: notif];
[notif autorelease];