aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
Diffstat (limited to '')
-rw-r--r--CMakeLists.txt14
-rw-r--r--include/GPG4USB.h3
-rw-r--r--include/MainWindow.h (renamed from include/mainwindow.h)20
-rw-r--r--include/Mime.h (renamed from include/mime.h)1
-rw-r--r--include/gpg/GpgConstants.h (renamed from include/gpgconstants.h)0
-rw-r--r--include/gpg/GpgContext.h (renamed from include/gpgcontext.h)16
-rw-r--r--include/ui/AboutDialog.h (renamed from include/aboutdialog.h)2
-rw-r--r--include/ui/AttachmentTableModel.h (renamed from include/attachmenttablemodel.h)6
-rw-r--r--include/ui/Attachments.h (renamed from include/attachments.h)2
-rw-r--r--include/ui/EditorPage.h (renamed from include/editorpage.h)10
-rwxr-xr-xinclude/ui/FileEncryptionDialog.h (renamed from include/fileencryptiondialog.h)6
-rw-r--r--include/ui/FindWidget.h (renamed from include/findwidget.h)2
-rw-r--r--include/ui/HelpPage.h (renamed from include/helppage.h)0
-rw-r--r--include/ui/KeyDetailsDialog.h (renamed from include/keydetailsdialog.h)2
-rw-r--r--include/ui/KeyImportDetailDialog.h (renamed from include/keyimportdetaildialog.h)2
-rw-r--r--include/ui/KeyList.h (renamed from include/keylist.h)4
-rwxr-xr-xinclude/ui/KeyMgmt.h (renamed from include/keymgmt.h)12
-rw-r--r--include/ui/KeyServerImportDialog.h (renamed from include/keyserverimportdialog.h)6
-rw-r--r--include/ui/KeygenDialog.h (renamed from include/keygendialog.h)4
-rw-r--r--include/ui/KeygenThread.h (renamed from include/keygenthread.h)2
-rwxr-xr-xinclude/ui/QuitDialog.h (renamed from include/quitdialog.h)0
-rwxr-xr-xinclude/ui/SettingsDialog.h (renamed from include/settingsdialog.h)2
-rw-r--r--include/ui/TextEdit.h (renamed from include/textedit.h)6
-rw-r--r--include/ui/VerifyDetailsDialog.h (renamed from include/verifydetailsdialog.h)4
-rw-r--r--include/ui/VerifyKeyDetailBox.h (renamed from include/verifykeydetailbox.h)4
-rw-r--r--include/ui/VerifyNotification.h (renamed from include/verifynotification.h)4
-rw-r--r--include/ui/Wizard.h (renamed from include/wizard.h)8
-rw-r--r--src/CMakeLists.txt11
-rw-r--r--src/MainWindow.cpp (renamed from src/mainwindow.cpp)2
-rw-r--r--src/Mime.cpp (renamed from src/mime.cpp)2
-rw-r--r--src/gpg/CMakeLists.txt7
-rw-r--r--src/gpg/GpgConstants.cpp (renamed from src/gpgconstants.cpp)3
-rw-r--r--src/gpg/GpgContext.cpp (renamed from src/gpgcontext.cpp)2
-rw-r--r--src/main.cpp3
-rw-r--r--src/ui/AboutDialog.cpp (renamed from src/aboutdialog.cpp)2
-rw-r--r--src/ui/AttachmentTableModel.cpp (renamed from src/attachmenttablemodel.cpp)2
-rw-r--r--src/ui/Attachments.cpp (renamed from src/attachments.cpp)4
-rw-r--r--src/ui/CMakeLists.txt5
-rw-r--r--src/ui/EditorPage.cpp (renamed from src/editorpage.cpp)2
-rwxr-xr-xsrc/ui/FileEncryptionDialog.cpp (renamed from src/fileencryptiondialog.cpp)2
-rw-r--r--src/ui/FindWidget.cpp (renamed from src/findwidget.cpp)2
-rw-r--r--src/ui/HelpPage.cpp (renamed from src/helppage.cpp)2
-rw-r--r--src/ui/KeyDetailsDialog.cpp (renamed from src/keydetailsdialog.cpp)2
-rw-r--r--src/ui/KeyImportDetailDialog.cpp (renamed from src/keyimportdetaildialog.cpp)4
-rw-r--r--src/ui/KeyList.cpp (renamed from src/keylist.cpp)2
-rwxr-xr-xsrc/ui/KeyMgmt.cpp (renamed from src/keymgmt.cpp)2
-rw-r--r--src/ui/KeyServerImportDialog.cpp (renamed from src/keyserverimportdialog.cpp)2
-rw-r--r--src/ui/KeygenDialog.cpp (renamed from src/keygendialog.cpp)2
-rw-r--r--src/ui/KeygenThread.cpp (renamed from src/keygenthread.cpp)2
-rwxr-xr-xsrc/ui/QuitDialog.cpp (renamed from src/quitdialog.cpp)2
-rwxr-xr-xsrc/ui/SettingsDialog.cpp (renamed from src/settingsdialog.cpp)2
-rw-r--r--src/ui/TextEdit.cpp (renamed from src/textedit.cpp)2
-rw-r--r--src/ui/VerifyDetailsDialog.cpp (renamed from src/verifydetailsdialog.cpp)2
-rw-r--r--src/ui/VerifyKeyDetailBox.cpp (renamed from src/verifykeydetailbox.cpp)2
-rw-r--r--src/ui/VerifyNotification.cpp (renamed from src/verifynotification.cpp)2
-rw-r--r--src/ui/Wizard.cpp (renamed from src/wizard.cpp)2
56 files changed, 116 insertions, 107 deletions
diff --git a/CMakeLists.txt b/CMakeLists.txt
index 8b00413e..6df464f1 100644
--- a/CMakeLists.txt
+++ b/CMakeLists.txt
@@ -10,24 +10,18 @@ set(CMAKE_AUTORCC ON)
set(CMAKE_AUTOUIC OM)
set(CMAKE_INCLUDE_CURRENT_DIR ON)
+find_package(Qt5Core REQUIRED)
+find_package(Qt5Test REQUIRED)
find_package(Qt5Widgets REQUIRED)
find_package(Qt5PrintSupport REQUIRED)
find_package(Qt5Network REQUIRED)
find_package(Qt5Test REQUIRED)
-file(GLOB GPG4USB_HEADER_FILES include/* "*.h")
-
-aux_source_directory(src SOURCES)
-
include_directories(include)
include_directories(/usr/local/include)
-
link_directories(/usr/local/lib)
-message(STATUS "${GPG4USB_HEADER_FILES}")
-qt5_wrap_cpp(QT5_MOCS ${GPG4USB_HEADER_FILES} TARGET gpg4usb)
+add_subdirectory(src)
+
-add_executable(gpg4usb ${SOURCES} gpg4usb.qrc ${QT5_MOCS})
-target_link_libraries(gpg4usb gpg-error gpgme)
-qt5_use_modules(gpg4usb Network PrintSupport Widgets Test Core) \ No newline at end of file
diff --git a/include/GPG4USB.h b/include/GPG4USB.h
index 05c979e6..aa8dc270 100644
--- a/include/GPG4USB.h
+++ b/include/GPG4USB.h
@@ -10,8 +10,7 @@
#include <cmath>
#include <clocale>
#include <cerrno>
-
-#include <qglobal.h>
+#include <utility>
#include <QtCore>
#include <QtWidgets>
diff --git a/include/mainwindow.h b/include/MainWindow.h
index a72696bf..3e236b16 100644
--- a/include/mainwindow.h
+++ b/include/MainWindow.h
@@ -22,16 +22,16 @@
#ifndef __GPGWIN_H__
#define __GPGWIN_H__
-#include "gpgconstants.h"
-#include "attachments.h"
-#include "keymgmt.h"
-#include "textedit.h"
-#include "fileencryptiondialog.h"
-#include "settingsdialog.h"
-#include "aboutdialog.h"
-#include "verifynotification.h"
-#include "findwidget.h"
-#include "wizard.h"
+#include "gpg/GpgConstants.h"
+#include "ui/Attachments.h"
+#include "ui/KeyMgmt.h"
+#include "ui/TextEdit.h"
+#include "ui/FileEncryptionDialog.h"
+#include "ui/SettingsDialog.h"
+#include "ui/AboutDialog.h"
+#include "ui/VerifyNotification.h"
+#include "ui/FindWidget.h"
+#include "ui/Wizard.h"
/**
diff --git a/include/mime.h b/include/Mime.h
index be25b627..eaede364 100644
--- a/include/mime.h
+++ b/include/Mime.h
@@ -23,7 +23,6 @@
#define __MIME_H__
#include <GPG4USB.h>
-
#include <utility>
class HeadElem {
diff --git a/include/gpgconstants.h b/include/gpg/GpgConstants.h
index fe690b36..fe690b36 100644
--- a/include/gpgconstants.h
+++ b/include/gpg/GpgConstants.h
diff --git a/include/gpgcontext.h b/include/gpg/GpgContext.h
index 9e807992..d361c412 100644
--- a/include/gpgcontext.h
+++ b/include/gpg/GpgContext.h
@@ -24,7 +24,7 @@
#include <GPG4USB.h>
-#include "gpgconstants.h"
+#include "GpgConstants.h"
class GpgKey {
@@ -111,9 +111,9 @@ namespace GpgME {
void clearPasswordCache();
- void exportSecretKey(const QString& uid, QByteArray *outBuffer);
+ void exportSecretKey(const QString &uid, QByteArray *outBuffer);
- gpgme_key_t getKeyDetails(const QString& uid);
+ gpgme_key_t getKeyDetails(const QString &uid);
gpgme_signature_t verify(QByteArray *inBuffer, QByteArray *sigBuffer = nullptr);
@@ -128,9 +128,9 @@ namespace GpgME {
*/
static void preventNoDataErr(QByteArray *in);
- GpgKey getKeyByFpr(const QString& fpr);
+ GpgKey getKeyByFpr(const QString &fpr);
- GpgKey getKeyById(const QString& id);
+ GpgKey getKeyById(const QString &id);
static QString gpgErrString(gpgme_error_t err);
@@ -169,9 +169,9 @@ namespace GpgME {
[[maybe_unused]] bool debug;
GpgKeyList mKeyList;
- [[nodiscard]] static void checkErr(gpgme_error_t gpgmeError) ;
+ static void checkErr(gpgme_error_t gpgmeError);
- [[nodiscard]] static void checkErr(gpgme_error_t gpgmeError, const QString& comment) ;
+ static void checkErr(gpgme_error_t gpgmeError, const QString &comment);
static gpgme_error_t passphraseCb(void *hook, const char *uid_hint,
const char *passphrase_info,
@@ -181,7 +181,7 @@ namespace GpgME {
const char *passphrase_info,
int last_was_bad, int fd);
- void executeGpgCommand(const QStringList& arguments,
+ void executeGpgCommand(const QStringList &arguments,
QByteArray *stdOut,
QByteArray *stdErr);
diff --git a/include/aboutdialog.h b/include/ui/AboutDialog.h
index 4235199e..c71e8476 100644
--- a/include/aboutdialog.h
+++ b/include/ui/AboutDialog.h
@@ -24,7 +24,7 @@
#include <GPG4USB.h>
-#include "gpgcontext.h"
+#include "gpg/GpgContext.h"
/**
* @brief Class containing the main tab of about dialog
diff --git a/include/attachmenttablemodel.h b/include/ui/AttachmentTableModel.h
index 9e9d937a..6c60f484 100644
--- a/include/attachmenttablemodel.h
+++ b/include/ui/AttachmentTableModel.h
@@ -22,7 +22,7 @@
#ifndef __ATTACHMENTTABLEMODEL_H__
#define __ATTACHMENTTABLEMODEL_H__
-#include "mime.h"
+#include "Mime.h"
class AttachmentTableModel : public QAbstractTableModel {
Q_OBJECT
@@ -36,9 +36,9 @@ public:
int columnCount(const QModelIndex &parent) const override;
- QVariant data(const QModelIndex &index, int role) const override;
+ [[nodiscard]] QVariant data(const QModelIndex &index, int role) const override;
- QVariant headerData(int section, Qt::Orientation orientation, int role) const override;
+ [[nodiscard]] QVariant headerData(int section, Qt::Orientation orientation, int role) const override;
void add(const MimePart& mp);
diff --git a/include/attachments.h b/include/ui/Attachments.h
index b5bbc7ca..9e8c382c 100644
--- a/include/attachments.h
+++ b/include/ui/Attachments.h
@@ -22,7 +22,7 @@
#ifndef __ATTACHMENTS_H__
#define __ATTACHMENTS_H__
-#include "attachmenttablemodel.h"
+#include "AttachmentTableModel.h"
class Attachments : public QWidget {
Q_OBJECT
diff --git a/include/editorpage.h b/include/ui/EditorPage.h
index bf32ec0f..b1ee4c49 100644
--- a/include/editorpage.h
+++ b/include/ui/EditorPage.h
@@ -24,7 +24,7 @@
#include <GPG4USB.h>
-#include "gpgconstants.h"
+#include "gpg/GpgConstants.h"
QT_BEGIN_NAMESPACE
@@ -89,11 +89,11 @@ public:
private:
QTextEdit *textPage; /** The textedit of the tab */
QVBoxLayout *mainLayout; /** The layout for the tab */
- [[maybe_unused]] QWidget *notificationWidget; /** The notification widget shown at the buttom of the tab */
- [[maybe_unused]] QMenu *verifyMenu; /** The menu in the notifiaction widget */
+ [[maybe_unused]] QWidget *notificationWidget{}; /** The notification widget shown at the buttom of the tab */
+ [[maybe_unused]] QMenu *verifyMenu{}; /** The menu in the notifiaction widget */
QString fullFilePath; /** The path to the file handled in the tab */
- [[maybe_unused]] QLabel *verifyLabel; /** The label of the verify-notification widget */
- bool signMarked; /** true, if the signed header is marked, false if not */
+ [[maybe_unused]] QLabel *verifyLabel{}; /** The label of the verify-notification widget */
+ bool signMarked{}; /** true, if the signed header is marked, false if not */
private slots:
diff --git a/include/fileencryptiondialog.h b/include/ui/FileEncryptionDialog.h
index f929716b..ffad362d 100755
--- a/include/fileencryptiondialog.h
+++ b/include/ui/FileEncryptionDialog.h
@@ -22,9 +22,9 @@
#ifndef __FILEENCRYPTIONDIALOG_H__
#define __FILEENCRYPTIONDIALOG_H__
-#include "gpgcontext.h"
-#include "keylist.h"
-#include "verifydetailsdialog.h"
+#include "gpg/GpgContext.h"
+#include "KeyList.h"
+#include "VerifyDetailsDialog.h"
/**
diff --git a/include/findwidget.h b/include/ui/FindWidget.h
index e135b354..275c66ab 100644
--- a/include/findwidget.h
+++ b/include/ui/FindWidget.h
@@ -2,7 +2,7 @@
#ifndef FINDWIDGET_H
#define FINDWIDGET_H
-#include "editorpage.h"
+#include "EditorPage.h"
/**
* @brief Class for handling the find widget shown at buttom of a textedit-page
diff --git a/include/helppage.h b/include/ui/HelpPage.h
index 981f3c10..981f3c10 100644
--- a/include/helppage.h
+++ b/include/ui/HelpPage.h
diff --git a/include/keydetailsdialog.h b/include/ui/KeyDetailsDialog.h
index 851f5def..2eb7f226 100644
--- a/include/keydetailsdialog.h
+++ b/include/ui/KeyDetailsDialog.h
@@ -22,7 +22,7 @@
#ifndef __KEYDETAILSDIALOG_H__
#define __KEYDETAILSDIALOG_H__
-#include "gpgcontext.h"
+#include "gpg/GpgContext.h"
#include <gpgme.h>
QT_BEGIN_NAMESPACE
diff --git a/include/keyimportdetaildialog.h b/include/ui/KeyImportDetailDialog.h
index 966f8828..1c1a175e 100644
--- a/include/keyimportdetaildialog.h
+++ b/include/ui/KeyImportDetailDialog.h
@@ -22,7 +22,7 @@
#ifndef __KEYIMPORTDETAILSDIALOG_H__
#define __KEYIMPORTDETAILSDIALOG_H__
-#include "gpgcontext.h"
+#include "gpg/GpgContext.h"
class KeyImportDetailDialog : public QDialog
diff --git a/include/keylist.h b/include/ui/KeyList.h
index 1b8bb7ff..4e478bc0 100644
--- a/include/keylist.h
+++ b/include/ui/KeyList.h
@@ -22,8 +22,8 @@
#ifndef __KEYLIST_H__
#define __KEYLIST_H__
-#include "gpgcontext.h"
-#include "keyimportdetaildialog.h"
+#include "gpg/GpgContext.h"
+#include "KeyImportDetailDialog.h"
class KeyList : public QWidget {
diff --git a/include/keymgmt.h b/include/ui/KeyMgmt.h
index 0a6057d2..1e874310 100755
--- a/include/keymgmt.h
+++ b/include/ui/KeyMgmt.h
@@ -22,12 +22,12 @@
#ifndef __KEYMGMT_H__
#define __KEYMGMT_H__
-#include "keylist.h"
-#include "keygenthread.h"
-#include "keydetailsdialog.h"
-#include "keyimportdetaildialog.h"
-#include "keyserverimportdialog.h"
-#include "keygendialog.h"
+#include "KeyList.h"
+#include "KeygenThread.h"
+#include "KeyDetailsDialog.h"
+#include "KeyImportDetailDialog.h"
+#include "KeyServerImportDialog.h"
+#include "KeygenDialog.h"
class KeyMgmt : public QMainWindow {
diff --git a/include/keyserverimportdialog.h b/include/ui/KeyServerImportDialog.h
index 289aa231..5ea6f800 100644
--- a/include/keyserverimportdialog.h
+++ b/include/ui/KeyServerImportDialog.h
@@ -23,9 +23,9 @@
#ifndef __KEYSERVERIMPORTDIALOG_H__
#define __KEYSERVERIMPORTDIALOG_H__
-#include "gpgcontext.h"
-#include "keyimportdetaildialog.h"
-#include "keylist.h"
+#include "gpg/GpgContext.h"
+#include "KeyImportDetailDialog.h"
+#include "KeyList.h"
class KeyServerImportDialog : public QDialog {
diff --git a/include/keygendialog.h b/include/ui/KeygenDialog.h
index 9a6b219c..cca92830 100644
--- a/include/keygendialog.h
+++ b/include/ui/KeygenDialog.h
@@ -22,8 +22,8 @@
#ifndef __KEYGENDIALOG_H__
#define __KEYGENDIALOG_H__
-#include "keygenthread.h"
-#include "gpgcontext.h"
+#include "KeygenThread.h"
+#include "gpg/GpgContext.h"
class KeyGenDialog : public QDialog {
diff --git a/include/keygenthread.h b/include/ui/KeygenThread.h
index 839111bd..c7406881 100644
--- a/include/keygenthread.h
+++ b/include/ui/KeygenThread.h
@@ -22,7 +22,7 @@
#ifndef __KEYGENTHREAD_H__
#define __KEYGENTHREAD_H__
-#include "gpgcontext.h"
+#include "gpg/GpgContext.h"
QT_BEGIN_NAMESPACE
diff --git a/include/quitdialog.h b/include/ui/QuitDialog.h
index 0927ebef..0927ebef 100755
--- a/include/quitdialog.h
+++ b/include/ui/QuitDialog.h
diff --git a/include/settingsdialog.h b/include/ui/SettingsDialog.h
index c0395598..81373cae 100755
--- a/include/settingsdialog.h
+++ b/include/ui/SettingsDialog.h
@@ -22,7 +22,7 @@
#ifndef __SETTINGSDIALOG_H__
#define __SETTINGSDIALOG_H__
-#include "keylist.h"
+#include "ui/KeyList.h"
class GeneralTab : public QWidget {
Q_OBJECT
diff --git a/include/textedit.h b/include/ui/TextEdit.h
index 9a7a0cae..6b1b9add 100644
--- a/include/textedit.h
+++ b/include/ui/TextEdit.h
@@ -22,9 +22,9 @@
#ifndef __TEXTEDIT_H__
#define __TEXTEDIT_H__
-#include "editorpage.h"
-#include "helppage.h"
-#include "quitdialog.h"
+#include "ui/EditorPage.h"
+#include "ui/HelpPage.h"
+#include "QuitDialog.h"
/**
diff --git a/include/verifydetailsdialog.h b/include/ui/VerifyDetailsDialog.h
index cb9d1bfa..24ba6f02 100644
--- a/include/verifydetailsdialog.h
+++ b/include/ui/VerifyDetailsDialog.h
@@ -22,8 +22,8 @@
#ifndef __VERIFYDETAILSDIALOG_H__
#define __VERIFYDETAILSDIALOG_H__
-#include "editorpage.h"
-#include "verifykeydetailbox.h"
+#include "ui/EditorPage.h"
+#include "VerifyKeyDetailBox.h"
class VerifyDetailsDialog : public QDialog {
Q_OBJECT
diff --git a/include/verifykeydetailbox.h b/include/ui/VerifyKeyDetailBox.h
index 4f93ab67..df354ef5 100644
--- a/include/verifykeydetailbox.h
+++ b/include/ui/VerifyKeyDetailBox.h
@@ -22,8 +22,8 @@
#ifndef __VERIFYKEYDETAILBOX_H__
#define __VERIFYKEYDETAILBOX_H__
-#include "keylist.h"
-#include "keyserverimportdialog.h"
+#include "ui/KeyList.h"
+#include "ui/KeyServerImportDialog.h"
class VerifyKeyDetailBox : public QGroupBox {
Q_OBJECT
diff --git a/include/verifynotification.h b/include/ui/VerifyNotification.h
index 309814ed..85df1b3e 100644
--- a/include/verifynotification.h
+++ b/include/ui/VerifyNotification.h
@@ -22,8 +22,8 @@
#ifndef __VERIFYNOTIFICATION_H__
#define __VERIFYNOTIFICATION_H__
-#include "editorpage.h"
-#include "verifydetailsdialog.h"
+#include "ui/EditorPage.h"
+#include "VerifyDetailsDialog.h"
QT_BEGIN_NAMESPACE
class QLabel;
diff --git a/include/wizard.h b/include/ui/Wizard.h
index 7008c77c..39b48a26 100644
--- a/include/wizard.h
+++ b/include/ui/Wizard.h
@@ -23,10 +23,10 @@
#ifndef WIZARD_H
#define WIZARD_H
-#include "keygendialog.h"
-#include "keymgmt.h"
-#include "gpgconstants.h"
-#include "settingsdialog.h"
+#include "ui/KeygenDialog.h"
+#include "ui/KeyMgmt.h"
+#include "gpg/GpgConstants.h"
+#include "SettingsDialog.h"
class QCheckBox;
diff --git a/src/CMakeLists.txt b/src/CMakeLists.txt
new file mode 100644
index 00000000..d65c791a
--- /dev/null
+++ b/src/CMakeLists.txt
@@ -0,0 +1,11 @@
+add_subdirectory(gpg)
+add_subdirectory(ui)
+
+aux_source_directory(. BASE_SOURCE)
+
+file(GLOB_RECURSE GPG4USB_HEADER_FILES RELACTIVE ../include/* *.h)
+qt5_wrap_cpp(QT5_MOCS ${GPG4USB_HEADER_FILES} TARGET gpg4usb)
+
+add_executable(gpg4usb ${BASE_SOURCE} ../gpg4usb.qrc ${QT5_MOCS})
+
+target_link_libraries(gpg4usb qtui gpg Qt5::Network Qt5::PrintSupport Qt5::Widgets Qt5::Test Qt5::Core) \ No newline at end of file
diff --git a/src/mainwindow.cpp b/src/MainWindow.cpp
index 81703cd9..3ffdb88f 100644
--- a/src/mainwindow.cpp
+++ b/src/MainWindow.cpp
@@ -19,7 +19,7 @@
* along with gpg4usb. If not, see <http://www.gnu.org/licenses/>
*/
-#include "mainwindow.h"
+#include "MainWindow.h"
MainWindow::MainWindow() {
mCtx = new GpgME::GpgContext();
diff --git a/src/mime.cpp b/src/Mime.cpp
index 98caf3e0..a6634713 100644
--- a/src/mime.cpp
+++ b/src/Mime.cpp
@@ -31,7 +31,7 @@
*
*/
-#include "mime.h"
+#include "Mime.h"
Mime::Mime(QByteArray *message) {
splitParts(message);
diff --git a/src/gpg/CMakeLists.txt b/src/gpg/CMakeLists.txt
new file mode 100644
index 00000000..881cd7d4
--- /dev/null
+++ b/src/gpg/CMakeLists.txt
@@ -0,0 +1,7 @@
+aux_source_directory(. GPG_SOURCE)
+
+add_library(gpg STATIC ${GPG_SOURCE})
+
+target_link_libraries(gpg gpg-error gpgme)
+
+qt5_use_modules(gpg Network PrintSupport Widgets Test Core) \ No newline at end of file
diff --git a/src/gpgconstants.cpp b/src/gpg/GpgConstants.cpp
index 9e919386..7fe800fb 100644
--- a/src/gpgconstants.cpp
+++ b/src/gpg/GpgConstants.cpp
@@ -19,8 +19,7 @@
* along with gpg4usb. If not, see <http://www.gnu.org/licenses/>
*/
-#include "gpgconstants.h"
-#include <QString>
+#include "gpg/GpgConstants.h"
const char *GpgConstants::PGP_CRYPT_BEGIN = "-----BEGIN PGP MESSAGE-----";
const char *GpgConstants::PGP_CRYPT_END = "-----END PGP MESSAGE-----";
diff --git a/src/gpgcontext.cpp b/src/gpg/GpgContext.cpp
index 08315083..d0694638 100644
--- a/src/gpgcontext.cpp
+++ b/src/gpg/GpgContext.cpp
@@ -19,7 +19,7 @@
* along with gpg4usb. If not, see <http://www.gnu.org/licenses/>
*/
-#include "gpgcontext.h"
+#include "gpg/GpgContext.h"
#include <unistd.h> /* contains read/write */
#ifdef _WIN32
diff --git a/src/main.cpp b/src/main.cpp
index 846f4143..6ee3ccf5 100644
--- a/src/main.cpp
+++ b/src/main.cpp
@@ -19,8 +19,7 @@
* along with gpg4usb. If not, see <http://www.gnu.org/licenses/>
*/
-#include "mainwindow.h"
-#include "gpgconstants.h"
+#include "MainWindow.h"
int main(int argc, char *argv[]) {
diff --git a/src/aboutdialog.cpp b/src/ui/AboutDialog.cpp
index d119c6af..9e635df7 100644
--- a/src/aboutdialog.cpp
+++ b/src/ui/AboutDialog.cpp
@@ -19,7 +19,7 @@
* along with gpg4usb. If not, see <http://www.gnu.org/licenses/>
*/
-#include "aboutdialog.h"
+#include "ui/AboutDialog.h"
AboutDialog::AboutDialog(QWidget *parent)
: QDialog(parent) {
diff --git a/src/attachmenttablemodel.cpp b/src/ui/AttachmentTableModel.cpp
index 07d380f4..d1056053 100644
--- a/src/attachmenttablemodel.cpp
+++ b/src/ui/AttachmentTableModel.cpp
@@ -19,7 +19,7 @@
* along with gpg4usb. If not, see <http://www.gnu.org/licenses/>
*/
-#include "attachmenttablemodel.h"
+#include "ui/AttachmentTableModel.h"
#include <utility>
diff --git a/src/attachments.cpp b/src/ui/Attachments.cpp
index be6ed663..6c242218 100644
--- a/src/attachments.cpp
+++ b/src/ui/Attachments.cpp
@@ -34,9 +34,7 @@
*/
-#include "attachments.h"
-
-#include <utility>
+#include "ui/Attachments.h"
Attachments::Attachments(QWidget *parent)
: QWidget(parent) {
diff --git a/src/ui/CMakeLists.txt b/src/ui/CMakeLists.txt
new file mode 100644
index 00000000..a9782fcc
--- /dev/null
+++ b/src/ui/CMakeLists.txt
@@ -0,0 +1,5 @@
+aux_source_directory(. QTUI_SOURCE)
+
+add_library(qtui STATIC ${QTUI_SOURCE})
+
+qt5_use_modules(qtui Network PrintSupport Widgets Test Core) \ No newline at end of file
diff --git a/src/editorpage.cpp b/src/ui/EditorPage.cpp
index 0e8b596b..e3202449 100644
--- a/src/editorpage.cpp
+++ b/src/ui/EditorPage.cpp
@@ -19,7 +19,7 @@
* along with gpg4usb. If not, see <http://www.gnu.org/licenses/>
*/
-#include "editorpage.h"
+#include "ui/EditorPage.h"
#include <utility>
diff --git a/src/fileencryptiondialog.cpp b/src/ui/FileEncryptionDialog.cpp
index 9b433ce8..d13520a6 100755
--- a/src/fileencryptiondialog.cpp
+++ b/src/ui/FileEncryptionDialog.cpp
@@ -19,7 +19,7 @@
* along with gpg4usb. If not, see <http://www.gnu.org/licenses/>
*/
-#include "fileencryptiondialog.h"
+#include "ui/FileEncryptionDialog.h"
FileEncryptionDialog::FileEncryptionDialog(GpgME::GpgContext *ctx, QStringList keyList, DialogAction action,
QWidget *parent)
diff --git a/src/findwidget.cpp b/src/ui/FindWidget.cpp
index 7bbbe0df..710e8207 100644
--- a/src/findwidget.cpp
+++ b/src/ui/FindWidget.cpp
@@ -1,5 +1,5 @@
-#include "findwidget.h"
+#include "ui/FindWidget.h"
FindWidget::FindWidget(QWidget *parent, QTextEdit *edit) :
QWidget(parent)
diff --git a/src/helppage.cpp b/src/ui/HelpPage.cpp
index c054dd36..6639574c 100644
--- a/src/helppage.cpp
+++ b/src/ui/HelpPage.cpp
@@ -19,7 +19,7 @@
* along with gpg4usb. If not, see <http://www.gnu.org/licenses/>
*/
-#include "helppage.h"
+#include "ui/HelpPage.h"
#include <utility>
diff --git a/src/keydetailsdialog.cpp b/src/ui/KeyDetailsDialog.cpp
index 53ba26e4..3a7b4dc9 100644
--- a/src/keydetailsdialog.cpp
+++ b/src/ui/KeyDetailsDialog.cpp
@@ -19,7 +19,7 @@
* along with gpg4usb. If not, see <http://www.gnu.org/licenses/>
*/
-#include "keydetailsdialog.h"
+#include "ui/KeyDetailsDialog.h"
KeyDetailsDialog::KeyDetailsDialog(GpgME::GpgContext *ctx, gpgme_key_t key, QWidget *parent)
: QDialog(parent) {
diff --git a/src/keyimportdetaildialog.cpp b/src/ui/KeyImportDetailDialog.cpp
index c4b10675..c46202ce 100644
--- a/src/keyimportdetaildialog.cpp
+++ b/src/ui/KeyImportDetailDialog.cpp
@@ -19,9 +19,7 @@
* along with gpg4usb. If not, see <http://www.gnu.org/licenses/>
*/
-#include "keyimportdetaildialog.h"
-
-#include <utility>
+#include <ui/KeyImportDetailDialog.h>
KeyImportDetailDialog::KeyImportDetailDialog(GpgME::GpgContext *ctx, GpgImportInformation result, QWidget *parent)
: QDialog(parent) {
diff --git a/src/keylist.cpp b/src/ui/KeyList.cpp
index fbf5bb13..48624b71 100644
--- a/src/keylist.cpp
+++ b/src/ui/KeyList.cpp
@@ -19,7 +19,7 @@
* along with gpg4usb. If not, see <http://www.gnu.org/licenses/>
*/
-#include "keylist.h"
+#include "ui/KeyList.h"
#include <utility>
diff --git a/src/keymgmt.cpp b/src/ui/KeyMgmt.cpp
index 9d75a3fd..fa1586d2 100755
--- a/src/keymgmt.cpp
+++ b/src/ui/KeyMgmt.cpp
@@ -20,7 +20,7 @@
* along with gpg4usb. If not, see <http://www.gnu.org/licenses/>
*/
-#include "keymgmt.h"
+#include "ui/KeyMgmt.h"
#include <utility>
diff --git a/src/keyserverimportdialog.cpp b/src/ui/KeyServerImportDialog.cpp
index c68851b4..3f3ed95c 100644
--- a/src/keyserverimportdialog.cpp
+++ b/src/ui/KeyServerImportDialog.cpp
@@ -20,7 +20,7 @@
* along with gpg4usb. If not, see <http://www.gnu.org/licenses/>
*/
-#include "keyserverimportdialog.h"
+#include "ui/KeyServerImportDialog.h"
#include <utility>
diff --git a/src/keygendialog.cpp b/src/ui/KeygenDialog.cpp
index 16d8f9b5..762acd52 100644
--- a/src/keygendialog.cpp
+++ b/src/ui/KeygenDialog.cpp
@@ -20,7 +20,7 @@
* along with gpg4usb. If not, see <http://www.gnu.org/licenses/>
*/
-#include "keygendialog.h"
+#include "ui/KeygenDialog.h"
KeyGenDialog::KeyGenDialog(GpgME::GpgContext *ctx, QWidget *parent)
: QDialog(parent) {
diff --git a/src/keygenthread.cpp b/src/ui/KeygenThread.cpp
index 3b004799..2bb21eca 100644
--- a/src/keygenthread.cpp
+++ b/src/ui/KeygenThread.cpp
@@ -19,7 +19,7 @@
* along with gpg4usb. If not, see <http://www.gnu.org/licenses/>
*/
-#include "keygenthread.h"
+#include "ui/KeygenThread.h"
#include <utility>
diff --git a/src/quitdialog.cpp b/src/ui/QuitDialog.cpp
index a26dab6a..8003527f 100755
--- a/src/quitdialog.cpp
+++ b/src/ui/QuitDialog.cpp
@@ -20,7 +20,7 @@
* along with gpg4usb. If not, see <http://www.gnu.org/licenses/>
*/
-#include "quitdialog.h"
+#include "ui/QuitDialog.h"
QuitDialog::QuitDialog(QWidget *parent, const QHash<int, QString>& unsavedDocs)
: QDialog(parent) {
diff --git a/src/settingsdialog.cpp b/src/ui/SettingsDialog.cpp
index 212287d9..141b89cd 100755
--- a/src/settingsdialog.cpp
+++ b/src/ui/SettingsDialog.cpp
@@ -19,7 +19,7 @@
* along with gpg4usb. If not, see <http://www.gnu.org/licenses/>
*/
-#include "settingsdialog.h"
+#include "ui/SettingsDialog.h"
SettingsDialog::SettingsDialog(GpgME::GpgContext *ctx, QWidget *parent)
: QDialog(parent) {
diff --git a/src/textedit.cpp b/src/ui/TextEdit.cpp
index 52fdaf17..6f458da7 100644
--- a/src/textedit.cpp
+++ b/src/ui/TextEdit.cpp
@@ -19,7 +19,7 @@
* along with gpg4usb. If not, see <http://www.gnu.org/licenses/>
*/
-#include "textedit.h"
+#include "ui/TextEdit.h"
TextEdit::TextEdit() {
countPage = 0;
diff --git a/src/verifydetailsdialog.cpp b/src/ui/VerifyDetailsDialog.cpp
index 2c4ab880..edad8ece 100644
--- a/src/verifydetailsdialog.cpp
+++ b/src/ui/VerifyDetailsDialog.cpp
@@ -19,7 +19,7 @@
* along with gpg4usb. If not, see <http://www.gnu.org/licenses/>
*/
-#include "verifydetailsdialog.h"
+#include "ui/VerifyDetailsDialog.h"
VerifyDetailsDialog::VerifyDetailsDialog(QWidget *parent, GpgME::GpgContext *ctx, KeyList *keyList,
QByteArray *inputData, QByteArray *inputSignature) :
diff --git a/src/verifykeydetailbox.cpp b/src/ui/VerifyKeyDetailBox.cpp
index e5f88aaa..27c92ff6 100644
--- a/src/verifykeydetailbox.cpp
+++ b/src/ui/VerifyKeyDetailBox.cpp
@@ -19,7 +19,7 @@
* along with gpg4usb. If not, see <http://www.gnu.org/licenses/>
*/
-#include "verifykeydetailbox.h"
+#include "ui/VerifyKeyDetailBox.h"
VerifyKeyDetailBox::VerifyKeyDetailBox(QWidget *parent, GpgME::GpgContext *ctx, KeyList *keyList,
gpgme_signature_t signature) :
diff --git a/src/verifynotification.cpp b/src/ui/VerifyNotification.cpp
index 746fa1ed..53f1d3c8 100644
--- a/src/verifynotification.cpp
+++ b/src/ui/VerifyNotification.cpp
@@ -19,7 +19,7 @@
* along with gpg4usb. If not, see <http://www.gnu.org/licenses/>
*/
-#include "verifynotification.h"
+#include "ui/VerifyNotification.h"
VerifyNotification::VerifyNotification(QWidget *parent, GpgME::GpgContext *ctx, KeyList *keyList, QTextEdit *edit) :
QWidget(parent) {
diff --git a/src/wizard.cpp b/src/ui/Wizard.cpp
index ed94ac8d..0191951d 100644
--- a/src/wizard.cpp
+++ b/src/ui/Wizard.cpp
@@ -18,7 +18,7 @@
* along with gpg4usb. If not, see <http://www.gnu.org/licenses/>
*/
-#include "wizard.h"
+#include "ui/Wizard.h"
#ifdef Q_OS_WIN
#include "windows.h"