diff --git a/src/CMakeLists.txt b/src/CMakeLists.txt
index b5d15060f..20f4ca52c 100644
--- a/src/CMakeLists.txt
+++ b/src/CMakeLists.txt
@@ -18,7 +18,6 @@ include_directories( ${CMAKE_CURRENT_SOURCE_DIR} ${CMAKE_CURRENT_BINARY_DIR} )
configure_file( config-keepassx.h.cmake ${CMAKE_CURRENT_BINARY_DIR}/config-keepassx.h )
set(keepassx_SOURCES
- core/KeePassApp.cpp
core/Config.cpp
core/Database.cpp
core/DatabaseIcons.cpp
@@ -53,6 +52,7 @@ set(keepassx_SOURCES
format/KeePass2XmlReader.cpp
format/KeePass2XmlWriter.cpp
gui/AboutDialog.cpp
+ gui/Application.cpp
gui/ChangeMasterKeyWidget.cpp
gui/DatabaseOpenDialog.cpp
gui/DatabaseSettingsWidget.cpp
@@ -87,7 +87,6 @@ set(keepassx_SOURCES
)
set(keepassx_MOC
- core/KeePassApp.h
core/Database.h
core/Entry.h
core/EntryAttachments.h
@@ -95,6 +94,7 @@ set(keepassx_MOC
core/Group.h
core/Metadata.h
gui/AboutDialog.h
+ gui/Application.h
gui/ChangeMasterKeyWidget.h
gui/DatabaseOpenDialog.h
gui/DatabaseSettingsWidget.h
diff --git a/src/core/KeePassApp.cpp b/src/gui/Application.cpp
similarity index 88%
rename from src/core/KeePassApp.cpp
rename to src/gui/Application.cpp
index 557dc2625..882f1b23d 100644
--- a/src/core/KeePassApp.cpp
+++ b/src/gui/Application.cpp
@@ -15,20 +15,20 @@
* along with this program. If not, see .
*/
-#include "KeePassApp.h"
+#include "Application.h"
#include
-KeePassApp::KeePassApp(int& argc, char** argv)
+Application::Application(int& argc, char** argv)
: QApplication(argc, argv)
{
}
-KeePassApp::~KeePassApp()
+Application::~Application()
{
}
-bool KeePassApp::event(QEvent *event)
+bool Application::event(QEvent *event)
{
// Handle Apple QFileOpenEvent from finder (double click on .kdbx file)
if (event->type() == QEvent::FileOpen) {
diff --git a/src/core/KeePassApp.h b/src/gui/Application.h
similarity index 81%
rename from src/core/KeePassApp.h
rename to src/gui/Application.h
index aabd74f64..491d7ebab 100644
--- a/src/core/KeePassApp.h
+++ b/src/gui/Application.h
@@ -15,19 +15,24 @@
* along with this program. If not, see .
*/
+#ifndef KEEPASSX_APPLICATION_H
+#define KEEPASSX_APPLICATION_H
+
#include
#include "gui/MainWindow.h"
-class KeePassApp : public QApplication
+class Application : public QApplication
{
Q_OBJECT
public:
- KeePassApp(int& argc, char** argv);
- ~KeePassApp();
+ Application(int& argc, char** argv);
+ ~Application();
bool event(QEvent *event);
Q_SIGNALS:
void openDatabase(const QString& filename);
};
+
+#endif // KEEPASSX_APPLICATION_H
diff --git a/src/main.cpp b/src/main.cpp
index a6f3b831c..f5f4768c1 100644
--- a/src/main.cpp
+++ b/src/main.cpp
@@ -20,14 +20,14 @@
#include
#include "crypto/Crypto.h"
+#include "gui/Application.h"
#include "gui/MainWindow.h"
-#include "core/KeePassApp.h"
#include "keys/CompositeKey.h"
#include "keys/PasswordKey.h"
int main(int argc, char** argv)
{
- KeePassApp app(argc, argv);
+ Application app(argc, argv);
// don't set applicationName or organizationName as that changes
// QDesktopServices::storageLocation()