The first start of QtPass: find GnuPG (and pass and Git), make sure there is a secret key, pick or create the password store. Replaces the chain of message boxes ConfigDialog::wizard() used to run before showing the whole configuration dialog.
More...
#include <firstrunwizard.h>
|
| | FirstRunWizard (QWidget *parent=nullptr) |
| | Build the wizard from the current settings.
|
| auto | settings () const -> AppSettings |
| | The settings as the pages have edited them so far.
|
| void | accept () override |
| | Write the settings and, when the chosen store has no .gpg-id yet, create and initialise it for the chosen keys first.
|
|
| static auto | secretKeys (const QString &gpgExecutable) -> QList< UserInfo > |
| | The secret keys gpg lists for gpgExecutable.
|
| static auto | isStore (const QString &path) -> bool |
| | Whether path points at an initialised store.
|
|
| auto | initialiseStore (const QString &store) -> bool |
| | Make store a password store for the ticked keys: create the folder when it is missing, write and sign its .gpg-id, and set up Git when chosen. On failure what was written is taken back, so a second Finish runs the whole initialisation again.
|
| auto | initialiseGit (const QString &store) -> bool |
| | Give an existing store the Git repository it was chosen to have.
|
The first start of QtPass: find GnuPG (and pass and Git), make sure there is a secret key, pick or create the password store. Replaces the chain of message boxes ConfigDialog::wizard() used to run before showing the whole configuration dialog.
The wizard works on a copy of the settings and writes it back on Finish, after it has created and initialised the store when that was needed (ProfileInit). Cancel leaves the settings as they were; the caller keeps asking until the configuration is usable or the user gives up.
Definition at line 37 of file firstrunwizard.h.
◆ Page
◆ FirstRunWizard()
| FirstRunWizard::FirstRunWizard |
( |
QWidget * | parent = nullptr | ) |
|
|
explicit |
Build the wizard from the current settings.
- Parameters
-
Definition at line 70 of file firstrunwizard.cpp.
◆ accept()
| void FirstRunWizard::accept |
( |
| ) |
|
|
override |
Write the settings and, when the chosen store has no .gpg-id yet, create and initialise it for the chosen keys first.
Definition at line 180 of file firstrunwizard.cpp.
◆ initialiseGit()
| auto FirstRunWizard::initialiseGit |
( |
const QString & | store | ) |
-> bool |
|
private |
Give an existing store the Git repository it was chosen to have.
- Parameters
-
| store | The folder, cleaned. |
- Returns
- Whether the repository is ready (the user was told otherwise).
Definition at line 168 of file firstrunwizard.cpp.
◆ initialiseStore()
| auto FirstRunWizard::initialiseStore |
( |
const QString & | store | ) |
-> bool |
|
private |
Make store a password store for the ticked keys: create the folder when it is missing, write and sign its .gpg-id, and set up Git when chosen. On failure what was written is taken back, so a second Finish runs the whole initialisation again.
- Parameters
-
| store | The folder, cleaned. |
- Returns
- Whether the store is ready (the user was told otherwise).
Definition at line 123 of file firstrunwizard.cpp.
◆ isStore()
| auto FirstRunWizard::isStore |
( |
const QString & | path | ) |
-> bool |
|
static |
Whether path points at an initialised store.
- Parameters
-
- Returns
- true when it holds a .gpg-id.
Definition at line 118 of file firstrunwizard.cpp.
◆ secretKeys()
| auto FirstRunWizard::secretKeys |
( |
const QString & | gpgExecutable | ) |
-> QList< UserInfo > |
|
static |
The secret keys gpg lists for gpgExecutable.
- Parameters
-
| gpgExecutable | The gpg binary. |
- Returns
- The keys, or an empty list when gpg cannot run.
Definition at line 100 of file firstrunwizard.cpp.
◆ settings()
The settings as the pages have edited them so far.
- Returns
- A copy.
Definition at line 51 of file firstrunwizard.h.
◆ DoneWizardPage
◆ KeyWizardPage
◆ ProgramsWizardPage
◆ StoreWizardPage
◆ m_keys
The secret keys as listed on the key page; the enabled ones become the recipients of a new store.
Definition at line 109 of file firstrunwizard.h.
◆ m_settings
The pages' working copy of the settings, loaded in the constructor and saved by accept(); the pages edit it through their friend access.
Definition at line 106 of file firstrunwizard.h.
The documentation for this class was generated from the following files: