From 965dba63d77c8bbf122dd2b59929fc885544fe13 Mon Sep 17 00:00:00 2001 From: Felix Geyer Date: Mon, 16 Jul 2012 17:49:12 +0200 Subject: [PATCH] Use Q_OS_MAC instead of the nonexistent Q_OS_MACOS. Thanks to Richard Johnson for spotting this. Closes #33 --- src/autotype/AutoType.cpp | 2 +- src/core/Config.cpp | 2 +- src/core/DataPath.cpp | 4 ++-- src/gui/Clipboard.cpp | 8 ++++---- 4 files changed, 8 insertions(+), 8 deletions(-) diff --git a/src/autotype/AutoType.cpp b/src/autotype/AutoType.cpp index cd31dc32..b6062944 100644 --- a/src/autotype/AutoType.cpp +++ b/src/autotype/AutoType.cpp @@ -40,7 +40,7 @@ AutoType::AutoType(QObject* parent) m_pluginLoader->setLoadHints(QLibrary::ResolveAllSymbolsHint); // TODO: scan in proper paths -#if defined(Q_OS_UNIX) && !defined(Q_OS_MACOS) +#if defined(Q_OS_UNIX) && !defined(Q_OS_MAC) m_pluginLoader->setFileName(QCoreApplication::applicationDirPath() + "/autotype/x11/libkeepassx-autotype-x11.so"); #endif diff --git a/src/core/Config.cpp b/src/core/Config.cpp index b3f7678c..94fd1490 100644 --- a/src/core/Config.cpp +++ b/src/core/Config.cpp @@ -52,7 +52,7 @@ Config::Config(QObject* parent) QString userPath; QString homePath = QDir::homePath(); -#if defined(Q_OS_UNIX) && !defined(Q_OS_MACOS) +#if defined(Q_OS_UNIX) && !defined(Q_OS_MAC) // we can't use QDesktopServices on X11 as it uses XDG_DATA_HOME instead of XDG_CONFIG_HOME QByteArray env = qgetenv("XDG_CONFIG_HOME"); if (env.isEmpty()) { diff --git a/src/core/DataPath.cpp b/src/core/DataPath.cpp index a3e064c3..e27ed195 100644 --- a/src/core/DataPath.cpp +++ b/src/core/DataPath.cpp @@ -69,11 +69,11 @@ DataPath::DataPath() else if (testSetDir(QString(KEEPASSX_SOURCE_DIR) + "/share")) { } #endif -#if defined(Q_OS_UNIX) && !defined(Q_OS_MACOS) +#if defined(Q_OS_UNIX) && !defined(Q_OS_MAC) else if (testSetDir(QCoreApplication::applicationDirPath() + "/../share/keepassx")) { } #endif -#ifdef Q_OS_MACOS +#ifdef Q_OS_MAC else if (testSetDir(QCoreApplication::applicationDirPath() + "/../Resources")) { } #endif diff --git a/src/gui/Clipboard.cpp b/src/gui/Clipboard.cpp index 28a3995b..283c8d26 100644 --- a/src/gui/Clipboard.cpp +++ b/src/gui/Clipboard.cpp @@ -21,9 +21,9 @@ #include #include -#if defined(Q_OS_UNIX) && !defined(Q_OS_MACOS) - #include - #include +#if defined(Q_OS_UNIX) && !defined(Q_OS_MAC) +#include +#include #endif #include "core/Config.h" @@ -71,7 +71,7 @@ void Clipboard::clearClipboard() clipboard->clear(QClipboard::Selection); } -#if defined(Q_OS_UNIX) && !defined(Q_OS_MACOS) +#if defined(Q_OS_UNIX) && !defined(Q_OS_MAC) QDBusMessage message = QDBusMessage::createMethodCall("org.kde.klipper", "/klipper", "", "clearClipboardHistory"); QDBusConnection::sessionBus().send(message); #endif