diff --git a/src/CMakeLists.txt b/src/CMakeLists.txt index 2f8c3b156..18a4313f1 100644 --- a/src/CMakeLists.txt +++ b/src/CMakeLists.txt @@ -58,8 +58,6 @@ set(keepassx_SOURCES core/PassphraseGenerator.cpp core/Resources.cpp core/SignalMultiplexer.cpp - core/ScreenLockListener.cpp - core/ScreenLockListenerPrivate.cpp core/TimeDelta.cpp core/TimeInfo.cpp core/Tools.cpp @@ -172,6 +170,8 @@ set(keepassx_SOURCES gui/reports/ReportsWidgetStatistics.cpp gui/reports/ReportsPageStatistics.cpp gui/osutils/OSUtilsBase.cpp + gui/osutils/ScreenLockListener.cpp + gui/osutils/ScreenLockListenerPrivate.cpp gui/settings/SettingsWidget.cpp gui/widgets/ElidedLabel.cpp gui/widgets/PopupHelpWidget.cpp @@ -195,29 +195,29 @@ set(keepassx_SOURCES if(APPLE) set(keepassx_SOURCES ${keepassx_SOURCES} - core/ScreenLockListenerMac.cpp core/MacPasteboard.cpp gui/osutils/macutils/MacUtils.cpp + gui/osutils/macutils/ScreenLockListenerMac.cpp gui/osutils/macutils/AppKitImpl.mm gui/osutils/macutils/AppKit.h) endif() if(UNIX AND NOT APPLE) set(keepassx_SOURCES ${keepassx_SOURCES} - core/ScreenLockListenerDBus.cpp gui/MainWindowAdaptor.cpp + gui/osutils/nixutils/ScreenLockListenerDBus.cpp gui/osutils/nixutils/NixUtils.cpp) endif() if(MINGW) set(keepassx_SOURCES ${keepassx_SOURCES} - core/ScreenLockListenerWin.cpp + gui/osutils/winutils/ScreenLockListenerWin.cpp gui/osutils/winutils/WinUtils.cpp) endif() if(MINGW OR (UNIX AND NOT APPLE)) set(keepassx_SOURCES ${keepassx_SOURCES} - core/OSEventFilter.cpp) + gui/osutils/OSEventFilter.cpp) endif() set(keepassx_SOURCES ${keepassx_SOURCES} diff --git a/src/gui/Application.cpp b/src/gui/Application.cpp index 0c389706f..2d48ee741 100644 --- a/src/gui/Application.cpp +++ b/src/gui/Application.cpp @@ -35,7 +35,7 @@ #include #if defined(Q_OS_WIN) || (defined(Q_OS_UNIX) && !defined(Q_OS_MACOS)) -#include "core/OSEventFilter.h" +#include "gui/osutils/OSEventFilter.h" #endif #if defined(Q_OS_UNIX) diff --git a/src/gui/MainWindow.h b/src/gui/MainWindow.h index 7da6b049b..a69fb5343 100644 --- a/src/gui/MainWindow.h +++ b/src/gui/MainWindow.h @@ -23,10 +23,10 @@ #include #include -#include "core/ScreenLockListener.h" #include "core/SignalMultiplexer.h" #include "gui/Application.h" #include "gui/DatabaseWidget.h" +#include "gui/osutils/ScreenLockListener.h" namespace Ui { diff --git a/src/core/OSEventFilter.cpp b/src/gui/osutils/OSEventFilter.cpp similarity index 100% rename from src/core/OSEventFilter.cpp rename to src/gui/osutils/OSEventFilter.cpp diff --git a/src/core/OSEventFilter.h b/src/gui/osutils/OSEventFilter.h similarity index 100% rename from src/core/OSEventFilter.h rename to src/gui/osutils/OSEventFilter.h diff --git a/src/core/ScreenLockListener.cpp b/src/gui/osutils/ScreenLockListener.cpp similarity index 100% rename from src/core/ScreenLockListener.cpp rename to src/gui/osutils/ScreenLockListener.cpp diff --git a/src/core/ScreenLockListener.h b/src/gui/osutils/ScreenLockListener.h similarity index 100% rename from src/core/ScreenLockListener.h rename to src/gui/osutils/ScreenLockListener.h diff --git a/src/core/ScreenLockListenerPrivate.cpp b/src/gui/osutils/ScreenLockListenerPrivate.cpp similarity index 90% rename from src/core/ScreenLockListenerPrivate.cpp rename to src/gui/osutils/ScreenLockListenerPrivate.cpp index 9dce17d4d..21cae07ec 100644 --- a/src/core/ScreenLockListenerPrivate.cpp +++ b/src/gui/osutils/ScreenLockListenerPrivate.cpp @@ -17,11 +17,11 @@ #include "ScreenLockListenerPrivate.h" #if defined(Q_OS_MACOS) -#include "ScreenLockListenerMac.h" +#include "macutils/ScreenLockListenerMac.h" #elif defined(Q_OS_UNIX) -#include "ScreenLockListenerDBus.h" +#include "nixutils/ScreenLockListenerDBus.h" #elif defined(Q_OS_WIN) -#include "ScreenLockListenerWin.h" +#include "winutils/ScreenLockListenerWin.h" #endif ScreenLockListenerPrivate::ScreenLockListenerPrivate(QWidget* parent) diff --git a/src/core/ScreenLockListenerPrivate.h b/src/gui/osutils/ScreenLockListenerPrivate.h similarity index 100% rename from src/core/ScreenLockListenerPrivate.h rename to src/gui/osutils/ScreenLockListenerPrivate.h diff --git a/src/core/ScreenLockListenerMac.cpp b/src/gui/osutils/macutils/ScreenLockListenerMac.cpp similarity index 100% rename from src/core/ScreenLockListenerMac.cpp rename to src/gui/osutils/macutils/ScreenLockListenerMac.cpp diff --git a/src/core/ScreenLockListenerMac.h b/src/gui/osutils/macutils/ScreenLockListenerMac.h similarity index 96% rename from src/core/ScreenLockListenerMac.h rename to src/gui/osutils/macutils/ScreenLockListenerMac.h index d2bee79b8..b07529430 100644 --- a/src/core/ScreenLockListenerMac.h +++ b/src/gui/osutils/macutils/ScreenLockListenerMac.h @@ -22,7 +22,7 @@ #include -#include "ScreenLockListenerPrivate.h" +#include "gui/osutils/ScreenLockListenerPrivate.h" class ScreenLockListenerMac : public ScreenLockListenerPrivate { diff --git a/src/core/ScreenLockListenerDBus.cpp b/src/gui/osutils/nixutils/ScreenLockListenerDBus.cpp similarity index 100% rename from src/core/ScreenLockListenerDBus.cpp rename to src/gui/osutils/nixutils/ScreenLockListenerDBus.cpp diff --git a/src/core/ScreenLockListenerDBus.h b/src/gui/osutils/nixutils/ScreenLockListenerDBus.h similarity index 96% rename from src/core/ScreenLockListenerDBus.h rename to src/gui/osutils/nixutils/ScreenLockListenerDBus.h index 59120eed3..0e473c0cc 100644 --- a/src/core/ScreenLockListenerDBus.h +++ b/src/gui/osutils/nixutils/ScreenLockListenerDBus.h @@ -17,7 +17,7 @@ #ifndef SCREENLOCKLISTENERDBUS_H #define SCREENLOCKLISTENERDBUS_H -#include "ScreenLockListenerPrivate.h" +#include "gui/osutils/ScreenLockListenerPrivate.h" #include #include #include diff --git a/src/core/ScreenLockListenerWin.cpp b/src/gui/osutils/winutils/ScreenLockListenerWin.cpp similarity index 100% rename from src/core/ScreenLockListenerWin.cpp rename to src/gui/osutils/winutils/ScreenLockListenerWin.cpp diff --git a/src/core/ScreenLockListenerWin.h b/src/gui/osutils/winutils/ScreenLockListenerWin.h similarity index 96% rename from src/core/ScreenLockListenerWin.h rename to src/gui/osutils/winutils/ScreenLockListenerWin.h index ba7c98cd3..edf6c2936 100644 --- a/src/core/ScreenLockListenerWin.h +++ b/src/gui/osutils/winutils/ScreenLockListenerWin.h @@ -21,7 +21,7 @@ #include #include -#include "ScreenLockListenerPrivate.h" +#include "gui/osutils/ScreenLockListenerPrivate.h" class ScreenLockListenerWin : public ScreenLockListenerPrivate, public QAbstractNativeEventFilter {