From 9de4cbbbd66dddb9cd7881c06386d38a01202770 Mon Sep 17 00:00:00 2001 From: Felix Geyer Date: Thu, 12 Jul 2012 13:58:40 +0200 Subject: [PATCH] Use Q_OS_* defines instead of Q_WS_*. --- src/core/Config.cpp | 2 +- src/core/DataPath.cpp | 6 +++--- src/gui/Clipboard.cpp | 4 ++-- 3 files changed, 6 insertions(+), 6 deletions(-) diff --git a/src/core/Config.cpp b/src/core/Config.cpp index 97420fd4b..b3f7678c1 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_WS_X11) +#if defined(Q_OS_UNIX) && !defined(Q_OS_MACOS) // 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 d12c997ca..a3e064c36 100644 --- a/src/core/DataPath.cpp +++ b/src/core/DataPath.cpp @@ -69,15 +69,15 @@ DataPath::DataPath() else if (testSetDir(QString(KEEPASSX_SOURCE_DIR) + "/share")) { } #endif -#ifdef Q_WS_X11 +#if defined(Q_OS_UNIX) && !defined(Q_OS_MACOS) else if (testSetDir(QCoreApplication::applicationDirPath() + "/../share/keepassx")) { } #endif -#ifdef Q_WS_MAC +#ifdef Q_OS_MACOS else if (testSetDir(QCoreApplication::applicationDirPath() + "/../Resources")) { } #endif -#ifdef Q_WS_WIN +#ifdef Q_OS_WIN else if (testSetDir(QCoreApplication::applicationDirPath() + "/share")) { } #endif diff --git a/src/gui/Clipboard.cpp b/src/gui/Clipboard.cpp index a1e95860e..28a3995b9 100644 --- a/src/gui/Clipboard.cpp +++ b/src/gui/Clipboard.cpp @@ -21,7 +21,7 @@ #include #include -#ifdef Q_WS_X11 +#if defined(Q_OS_UNIX) && !defined(Q_OS_MACOS) #include #include #endif @@ -71,7 +71,7 @@ void Clipboard::clearClipboard() clipboard->clear(QClipboard::Selection); } -#ifdef Q_WS_X11 +#if defined(Q_OS_UNIX) && !defined(Q_OS_MACOS) QDBusMessage message = QDBusMessage::createMethodCall("org.kde.klipper", "/klipper", "", "clearClipboardHistory"); QDBusConnection::sessionBus().send(message); #endif