Restrict Q_OS_UNIX ifdefs to non-Mac platforms

This commit is contained in:
Janek Bevendorff 2017-12-27 20:31:15 +01:00
parent e29d3497eb
commit 71f38f17cd
3 changed files with 8 additions and 10 deletions

View File

@ -16,13 +16,11 @@
*/
#include "ScreenLockListenerPrivate.h"
#if defined(Q_OS_OSX)
#if defined(Q_OS_MAC)
#include "ScreenLockListenerMac.h"
#endif
#if defined(Q_OS_UNIX)
#elif defined(Q_OS_UNIX)
#include "ScreenLockListenerDBus.h"
#endif
#if defined(Q_OS_WIN)
#elif defined(Q_OS_WIN)
#include "ScreenLockListenerWin.h"
#endif
@ -33,7 +31,7 @@ ScreenLockListenerPrivate::ScreenLockListenerPrivate(QWidget* parent)
ScreenLockListenerPrivate* ScreenLockListenerPrivate::instance(QWidget* parent)
{
#if defined(Q_OS_OSX)
#if defined(Q_OS_MAC)
Q_UNUSED(parent);
return ScreenLockListenerMac::instance();
#elif defined(Q_OS_UNIX)

View File

@ -23,7 +23,7 @@
#include <QShortcut>
#include <QTimer>
#if defined(Q_OS_UNIX) && !defined(QT_NO_DBUS)
#if defined(Q_OS_UNIX) && !defined(Q_OS_MAC) && !defined(QT_NO_DBUS)
#include <QList>
#include <QtDBus/QtDBus>
#endif
@ -888,7 +888,7 @@ void MainWindow::toggleWindow()
raise();
activateWindow();
#if defined(Q_OS_UNIX) && !defined(QT_NO_DBUS) && (QT_VERSION < QT_VERSION_CHECK(5, 9, 0))
#if defined(Q_OS_UNIX) && !defined(Q_OS_MAC) && !defined(QT_NO_DBUS) && (QT_VERSION < QT_VERSION_CHECK(5, 9, 0))
// re-register global D-Bus menu (needed on Ubuntu with Unity)
// see https://github.com/keepassxreboot/keepassxc/issues/271
// and https://bugreports.qt.io/browse/QTBUG-58723

View File

@ -37,9 +37,9 @@
#ifdef QT_STATIC
#include <QtPlugin>
#ifdef Q_OS_WIN
#if defined(Q_OS_WIN)
Q_IMPORT_PLUGIN(QWindowsIntegrationPlugin)
#elif Q_OS_UNIX
#elif defined(Q_OS_UNIX) && !defined(Q_OS_MAC)
Q_IMPORT_PLUGIN(QXcbIntegrationPlugin)
#endif
#endif