Merge pull request #1328 from keepassxreboot/feature/openbsd-support

Enable OpenBSD support
This commit is contained in:
Janek Bevendorff 2017-12-27 20:50:06 +01:00 committed by GitHub
commit c7eb466e63
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
4 changed files with 10 additions and 12 deletions

View File

@ -161,7 +161,7 @@ if(APPLE)
core/MacPasteboard.cpp
)
endif()
if(${CMAKE_SYSTEM_NAME} STREQUAL "Linux")
if(${CMAKE_SYSTEM_NAME} STREQUAL "Linux" OR ${CMAKE_SYSTEM_NAME} STREQUAL "OpenBSD")
set(keepassx_SOURCES ${keepassx_SOURCES}
core/ScreenLockListenerDBus.h
core/ScreenLockListenerDBus.cpp

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_LINUX)
#elif defined(Q_OS_UNIX)
#include "ScreenLockListenerDBus.h"
#endif
#if defined(Q_OS_WIN)
#elif defined(Q_OS_WIN)
#include "ScreenLockListenerWin.h"
#endif
@ -33,10 +31,10 @@ 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_LINUX)
#elif defined(Q_OS_UNIX)
return new ScreenLockListenerDBus(parent);
#elif defined(Q_OS_WIN)
return new ScreenLockListenerWin(parent);

View File

@ -23,7 +23,7 @@
#include <QShortcut>
#include <QTimer>
#if defined(Q_OS_LINUX) && ! 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_LINUX) && ! 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_LINUX
#elif defined(Q_OS_UNIX) && !defined(Q_OS_MAC)
Q_IMPORT_PLUGIN(QXcbIntegrationPlugin)
#endif
#endif