mirror of
https://github.com/status-im/snorenotify.git
synced 2025-02-08 14:43:24 +00:00
Resolve macos compilation errors
This commit is contained in:
parent
1ea69e2329
commit
9adf7aba3a
@ -152,6 +152,8 @@ const QDir &PluginContainer::pluginDir()
|
|||||||
if (!isLoaded) {
|
if (!isLoaded) {
|
||||||
isLoaded = true;
|
isLoaded = true;
|
||||||
QString appDir = qApp->applicationDirPath();
|
QString appDir = qApp->applicationDirPath();
|
||||||
|
const auto suffix = QStringLiteral("/libsnore" SNORE_SUFFIX);
|
||||||
|
QStringList list { appDir };
|
||||||
#ifdef Q_OS_MAC
|
#ifdef Q_OS_MAC
|
||||||
if (appDir == QLatin1String("MacOS")) {
|
if (appDir == QLatin1String("MacOS")) {
|
||||||
list << appDir;
|
list << appDir;
|
||||||
@ -163,8 +165,6 @@ const QDir &PluginContainer::pluginDir()
|
|||||||
appDir = dir.absolutePath();
|
appDir = dir.absolutePath();
|
||||||
}
|
}
|
||||||
#endif
|
#endif
|
||||||
const auto suffix = QStringLiteral("/libsnore" SNORE_SUFFIX);
|
|
||||||
QStringList list { appDir };
|
|
||||||
for (const QString &s : qApp->libraryPaths()) {
|
for (const QString &s : qApp->libraryPaths()) {
|
||||||
list << s + suffix;
|
list << s + suffix;
|
||||||
}
|
}
|
||||||
|
@ -71,7 +71,7 @@ BOOL installNSBundleHook()
|
|||||||
qCDebug(SNORE) << "User clicked on notification";
|
qCDebug(SNORE) << "User clicked on notification";
|
||||||
int notificationId = [notification.userInfo[@"id"] intValue];
|
int notificationId = [notification.userInfo[@"id"] intValue];
|
||||||
[center removeDeliveredNotification: notification];
|
[center removeDeliveredNotification: notification];
|
||||||
if (not m_IdToNotification.contains(notificationId)) {
|
if (!m_IdToNotification.contains(notificationId)) {
|
||||||
qCWarning(SNORE) << "User clicked on notification that was not recognized";
|
qCWarning(SNORE) << "User clicked on notification that was not recognized";
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
@ -107,7 +107,7 @@ OSXNotificationCenter::OSXNotificationCenter()
|
|||||||
{
|
{
|
||||||
installNSBundleHook();
|
installNSBundleHook();
|
||||||
m_IdToNSNotification = [[NSMutableDictionary alloc] init];
|
m_IdToNSNotification = [[NSMutableDictionary alloc] init];
|
||||||
if (not delegate) {
|
if (!delegate) {
|
||||||
delegate = new UserNotificationItemClass();
|
delegate = new UserNotificationItemClass();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
Loading…
x
Reference in New Issue
Block a user