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 core/MacPasteboard.cpp
) )
endif() endif()
if(${CMAKE_SYSTEM_NAME} STREQUAL "Linux") if(${CMAKE_SYSTEM_NAME} STREQUAL "Linux" OR ${CMAKE_SYSTEM_NAME} STREQUAL "OpenBSD")
set(keepassx_SOURCES ${keepassx_SOURCES} set(keepassx_SOURCES ${keepassx_SOURCES}
core/ScreenLockListenerDBus.h core/ScreenLockListenerDBus.h
core/ScreenLockListenerDBus.cpp core/ScreenLockListenerDBus.cpp

View File

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

View File

@ -23,7 +23,7 @@
#include <QShortcut> #include <QShortcut>
#include <QTimer> #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 <QList>
#include <QtDBus/QtDBus> #include <QtDBus/QtDBus>
#endif #endif
@ -888,7 +888,7 @@ void MainWindow::toggleWindow()
raise(); raise();
activateWindow(); 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) // re-register global D-Bus menu (needed on Ubuntu with Unity)
// see https://github.com/keepassxreboot/keepassxc/issues/271 // see https://github.com/keepassxreboot/keepassxc/issues/271
// and https://bugreports.qt.io/browse/QTBUG-58723 // and https://bugreports.qt.io/browse/QTBUG-58723

View File

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