mirror of
https://github.com/keepassxreboot/keepassxc.git
synced 2024-12-28 00:39:43 -05:00
Use Q_OS_* defines instead of Q_WS_*.
This commit is contained in:
parent
13eb1f6330
commit
9de4cbbbd6
@ -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()) {
|
||||
|
@ -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
|
||||
|
@ -21,7 +21,7 @@
|
||||
#include <QtGui/QApplication>
|
||||
#include <QtGui/QClipboard>
|
||||
|
||||
#ifdef Q_WS_X11
|
||||
#if defined(Q_OS_UNIX) && !defined(Q_OS_MACOS)
|
||||
#include <QtDBus/QDBusConnection>
|
||||
#include <QtDBus/QDBusMessage>
|
||||
#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
|
||||
|
Loading…
Reference in New Issue
Block a user