diff options
Diffstat (limited to 'include/ui')
-rwxr-xr-x | include/ui/KeyMgmt.h | 1 | ||||
-rw-r--r-- | include/ui/Wizard.h | 66 | ||||
-rw-r--r-- | include/ui/keygen/KeygenDialog.h | 5 | ||||
-rw-r--r-- | include/ui/keygen/KeygenThread.h | 50 | ||||
-rw-r--r-- | include/ui/keygen/SubkeyGenerateDialog.h | 10 | ||||
-rw-r--r-- | include/ui/keygen/SubkeyGenerateThread.h | 51 |
6 files changed, 1 insertions, 182 deletions
diff --git a/include/ui/KeyMgmt.h b/include/ui/KeyMgmt.h index 59592bdf..fa352149 100755 --- a/include/ui/KeyMgmt.h +++ b/include/ui/KeyMgmt.h @@ -26,7 +26,6 @@ #define __KEYMGMT_H__ #include "ui/widgets/KeyList.h" -#include "ui/keygen/KeygenThread.h" #include "ui/keypair_details/KeyDetailsDialog.h" #include "KeyImportDetailDialog.h" #include "KeyServerImportDialog.h" diff --git a/include/ui/Wizard.h b/include/ui/Wizard.h index b2451bf2..79c7e321 100644 --- a/include/ui/Wizard.h +++ b/include/ui/Wizard.h @@ -30,14 +30,6 @@ #include "gpg/GpgConstants.h" #include "SettingsDialog.h" -class QCheckBox; - -class QLabel; - -class QLineEdit; - -class QRadioButton; - class Wizard : public QWizard { Q_OBJECT Q_ENUMS(WizardPages) @@ -50,8 +42,6 @@ public: Wizard(GpgME::GpgContext *ctx, KeyMgmt *keyMgmt, QWidget *parent = nullptr); - static bool importPubAndSecKeysFromDir(const QString& dir, KeyMgmt *keyMgmt); - private: GpgME::GpgContext *mCtx; KeyMgmt *mKeyMgmt; @@ -102,62 +92,6 @@ private: int nextPage; }; -class ImportFromGpg4usbPage : public QWizardPage { -Q_OBJECT - -public: - ImportFromGpg4usbPage(GpgME::GpgContext *ctx, KeyMgmt *keyMgmt, QWidget *parent = nullptr); - -private slots: - - /** - * @details Import keys from gnupg-homedir, private or/and public depend on the checked boxes - */ - void slotImportFromOlderGpg4usb(); - - bool slotImportConfFromGpg4usb(const QString& dir); - -private: - [[nodiscard]] int nextId() const override; - - QString appPath; - QSettings settings; - - KeyMgmt *mKeyMgmt; - GpgME::GpgContext *mCtx; - QCheckBox *gpg4usbKeyCheckBox; - QCheckBox *gpg4usbConfigCheckBox; -}; - -class ImportFromGnupgPage : public QWizardPage { -Q_OBJECT - -public: - ImportFromGnupgPage(GpgME::GpgContext *ctx, KeyMgmt *keyMgmt, QWidget *parent = nullptr); - -private slots: - - /** - * @details Import keys from gnupg-homedir, private or/and public depend on the checked boxes - */ - void slotrImportKeysFromGnupg(); - -private: - KeyMgmt *mKeyMgmt; - - [[nodiscard]] int nextId() const override; - - /** - * @details String containing the gnupg-homedir - * @returns String containg the gnupg-homedir, but NULL, if the in windows registry entry - * doesn't exist or in linux ~/.gnupg doesn't exist - */ - static QString getGnuPGHome(); - - GpgME::GpgContext *mCtx; - QPushButton *importFromGnupgButton; -}; - class KeyGenPage : public QWizardPage { Q_OBJECT diff --git a/include/ui/keygen/KeygenDialog.h b/include/ui/keygen/KeygenDialog.h index a2718a1d..4a37590a 100644 --- a/include/ui/keygen/KeygenDialog.h +++ b/include/ui/keygen/KeygenDialog.h @@ -25,10 +25,8 @@ #ifndef __KEYGENDIALOG_H__ #define __KEYGENDIALOG_H__ -#include "KeygenThread.h" #include "gpg/GpgContext.h" - class KeyGenDialog : public QDialog { Q_OBJECT @@ -54,7 +52,6 @@ private: R"((?:[a-z0-9!#$%&'*+/=?^_`{|}~-]+(?:\.[a-z0-9!#$%&'*+/=?^_`{|}~-]+)*|"(?:[\x01-\x08\x0b\x0c\x0e-\x1f\x21\x23-\x5b\x5d-\x7f]|\\[\x01-\x09\x0b\x0c\x0e-\x7f])*")@(?:(?:[a-z0-9](?:[a-z0-9-]*[a-z0-9])?\.)+[a-z0-9](?:[a-z0-9-]*[a-z0-9])?|\[(?:(?:(2(5[0-5]|[0-4][0-9])|1[0-9][0-9]|[1-9]?[0-9]))\.){3}(?:(2(5[0-5]|[0-4][0-9])|1[0-9][0-9]|[1-9]?[0-9])|[a-z0-9-]*[a-z0-9]:(?:[\x01-\x08\x0b\x0c\x0e-\x1f\x21-\x5a\x53-\x7f]|\\[\x01-\x09\x0b\x0c\x0e-\x7f])+)\]))"}; GpgME::GpgContext *mCtx; /** The current gpg context */ - KeyGenThread *kg{}; /** Thread for key generation */ QStringList errorMessages; /** List of errors occuring when checking entries of lineedits */ GenKeyInfo genKeyInfo{}; @@ -107,8 +104,6 @@ private slots: void slotActivatedKeyType(int index); - void slotKeyGenResult(bool success); - }; #endif // __KEYGENDIALOG_H__ diff --git a/include/ui/keygen/KeygenThread.h b/include/ui/keygen/KeygenThread.h deleted file mode 100644 index 30478050..00000000 --- a/include/ui/keygen/KeygenThread.h +++ /dev/null @@ -1,50 +0,0 @@ -/** - * This file is part of GPGFrontend. - * - * GPGFrontend is free software: you can redistribute it and/or modify - * it under the terms of the GNU General Public License as published by - * the Free Software Foundation, either version 3 of the License, or - * (at your option) any later version. - * - * Foobar is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - * GNU General Public License for more details. - * - * You should have received a copy of the GNU General Public License - * along with Foobar. If not, see <https://www.gnu.org/licenses/>. - * - * The initial version of the source code is inherited from gpg4usb-team. - * Their source code version also complies with GNU General Public License. - * - * The source code version of this software was modified and released - * by Saturneric<[email protected]> starting on May 12, 2021. - * - */ - -#ifndef __KEYGENTHREAD_H__ -#define __KEYGENTHREAD_H__ - -#include "gpg/GpgContext.h" - -class KeyGenThread : public QThread { -Q_OBJECT - -public: - KeyGenThread(GenKeyInfo *keyGenParams, GpgME::GpgContext *ctx); - -signals: - void signalKeyGenerated(bool success); - -private: - GenKeyInfo *keyGenParams; - GpgME::GpgContext *mCtx; - QMutex mutex; - -protected: - - void run() override; - -}; - -#endif // __KEYGENTHREAD_H__ diff --git a/include/ui/keygen/SubkeyGenerateDialog.h b/include/ui/keygen/SubkeyGenerateDialog.h index b067122a..a1cfcf55 100644 --- a/include/ui/keygen/SubkeyGenerateDialog.h +++ b/include/ui/keygen/SubkeyGenerateDialog.h @@ -25,12 +25,7 @@ #ifndef GPGFRONTEND_SUBKEYGENERATEDIALOG_H #define GPGFRONTEND_SUBKEYGENERATEDIALOG_H -#include "GpgFrontend.h" -#include "gpg/GpgKey.h" -#include "gpg/GpgSubKey.h" -#include "gpg/GpgGenKeyInfo.h" - -#include "SubkeyGenerateThread.h" +#include "gpg/GpgContext.h" class SubkeyGenerateDialog : public QDialog { Q_OBJECT @@ -45,7 +40,6 @@ private: const GpgKey &mKey; GenKeyInfo genKeyInfo{}; - SubkeyGenerateThread *kg{}; /** Thread for key generation */ QGroupBox *keyUsageGroupBox{}; QDialogButtonBox *buttonBox; /** Box for standardbuttons */ @@ -91,8 +85,6 @@ private slots: void slotActivatedKeyType(int index); - void slotKeyGenResult(bool success); - }; diff --git a/include/ui/keygen/SubkeyGenerateThread.h b/include/ui/keygen/SubkeyGenerateThread.h deleted file mode 100644 index b442acea..00000000 --- a/include/ui/keygen/SubkeyGenerateThread.h +++ /dev/null @@ -1,51 +0,0 @@ -/** - * This file is part of GPGFrontend. - * - * GPGFrontend is free software: you can redistribute it and/or modify - * it under the terms of the GNU General Public License as published by - * the Free Software Foundation, either version 3 of the License, or - * (at your option) any later version. - * - * Foobar is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - * GNU General Public License for more details. - * - * You should have received a copy of the GNU General Public License - * along with Foobar. If not, see <https://www.gnu.org/licenses/>. - * - * The initial version of the source code is inherited from gpg4usb-team. - * Their source code version also complies with GNU General Public License. - * - * The source code version of this software was modified and released - * by Saturneric<[email protected]><[email protected]> starting on May 12, 2021. - * - */ - -#ifndef GPGFRONTEND_SUBKEYGENERATETHREAD_H -#define GPGFRONTEND_SUBKEYGENERATETHREAD_H - -#include "gpg/GpgContext.h" - -class SubkeyGenerateThread : public QThread { - Q_OBJECT - -public: - SubkeyGenerateThread(GpgKey key, GenKeyInfo *keyGenParams, GpgME::GpgContext *ctx); - -signals: - - void signalKeyGenerated(bool success); - -private: - const GpgKey mKey; - GenKeyInfo *keyGenParams; - GpgME::GpgContext *mCtx; - -protected: - - void run() override; -}; - - -#endif //GPGFRONTEND_SUBKEYGENERATETHREAD_H |