Resolve macos compilation errors

This commit is contained in:
Max Risuhin 2018-07-09 14:27:13 +03:00
parent 1ea69e2329
commit 9adf7aba3a
No known key found for this signature in database
GPG Key ID: BF733F5ACA0B4448
2 changed files with 4 additions and 4 deletions

View File

@ -152,6 +152,8 @@ const QDir &PluginContainer::pluginDir()
if (!isLoaded) {
isLoaded = true;
QString appDir = qApp->applicationDirPath();
const auto suffix = QStringLiteral("/libsnore" SNORE_SUFFIX);
QStringList list { appDir };
#ifdef Q_OS_MAC
if (appDir == QLatin1String("MacOS")) {
list << appDir;
@ -163,8 +165,6 @@ const QDir &PluginContainer::pluginDir()
appDir = dir.absolutePath();
}
#endif
const auto suffix = QStringLiteral("/libsnore" SNORE_SUFFIX);
QStringList list { appDir };
for (const QString &s : qApp->libraryPaths()) {
list << s + suffix;
}

View File

@ -71,7 +71,7 @@ BOOL installNSBundleHook()
qCDebug(SNORE) << "User clicked on notification";
int notificationId = [notification.userInfo[@"id"] intValue];
[center removeDeliveredNotification: notification];
if (not m_IdToNotification.contains(notificationId)) {
if (!m_IdToNotification.contains(notificationId)) {
qCWarning(SNORE) << "User clicked on notification that was not recognized";
return;
}
@ -107,7 +107,7 @@ OSXNotificationCenter::OSXNotificationCenter()
{
installNSBundleHook();
m_IdToNSNotification = [[NSMutableDictionary alloc] init];
if (not delegate) {
if (!delegate) {
delegate = new UserNotificationItemClass();
}