QtPass 2.0.0
Developer documentation
Loading...
Searching...
No Matches
ConfigDialog Class Reference

The ConfigDialog handles the configuration interface. More...

#include <configdialog.h>

Inheritance diagram for ConfigDialog:
Collaboration diagram for ConfigDialog:

Classes

struct  ProfileEntry
 One row of the profile list while the dialog is open. A QList rather than the Profiles map so a profile can pass through an empty or duplicate name while it is being typed; getProfiles() builds the map. More...
struct  ProfileProblems
 What is wrong with one profile's fields; empty strings where nothing is. More...
struct  SigningStores

Public Member Functions

 ConfigDialog (QWidget *parent)
 Construct a ConfigDialog associated with the given main window.
void useSelection (bool useSelection)
 Enable or disable clipboard selection mode.
auto getProfiles () -> Profiles
 Return all configured profiles.
void useTrayIcon (bool useSystray)
 Show or hide the system tray icon.
void useGit (bool useGit)
 Enable or disable git integration.
void useOtp (bool useOtp)
 Enable or disable OTP support.
void useGrepSearch (bool useGrepSearch)
 Enable or disable grep content search.
void useQrencode (bool useQrencode)
 Enable or disable QR code display.
void setPwgenPath (const QString &path)
 Set the path to the pwgen executable.
void usePwgen (bool usePwgen)
 Enable or disable pwgen-based password generation.
void setPasswordConfiguration (const PasswordConfiguration &config)
 Apply a password configuration to the dialog controls.
auto getPasswordConfiguration () -> PasswordConfiguration
 Read the current password configuration from the dialog controls.

Static Public Member Functions

static auto isFingerprintList (const QString &setting) -> bool
 Whether a signing-key setting holds only full key fingerprints (40 or 64 hexadecimal characters each, space separated); empty passes.

Protected Member Functions

void changeEvent (QEvent *event) override
 Forget the signing keys gpg did not know while the dialog is in the background, and check them again once it is back in front.

Private Slots

void on_accepted ()
 On OK: warn about a dubious SSH_AUTH_SOCK override, save the settings and the profiles, let the active profile follow a rename, and create and initialise the stores of profiles added in this session.
void on_autodetectButton_clicked ()
 Fill the pass, gpg (gpg2 first), git and pwgen paths from PATH, keeping a field as it is when nothing is found, and choose the pass backend when pass was found.
void on_radioButtonNative_clicked ()
 Native (gpg/git) backend chosen: enable its group box, disable pass's.
void on_radioButtonPass_clicked ()
 pass backend chosen: enable its group box, disable the native one.
void on_toolButtonGit_clicked ()
 Pick the git executable in a file dialog; a cancelled dialog turns Git off and disables its checkbox, as a missing git does.
void on_toolButtonGpg_clicked ()
 Pick the gpg executable in a file dialog; cancel keeps the field.
void on_pushButtonGenerateKey_clicked ()
 Open KeygenDialog for the gpg shown in the dialog.
void on_toolButtonPwgen_clicked ()
 Pick the pwgen executable; a choice enables "use pwgen", a cancelled dialog unticks and disables it.
void on_toolButtonPass_clicked ()
 Pick the pass executable in a file dialog; cancel keeps the field.
void on_toolButtonStore_clicked ()
 Pick the password store folder for the pass backend's store path.
void on_comboBoxClipboard_activated (int index)
 Enable the controls that only mean something with a clipboard (selection, hiding, autoclear) unless "No clipboard" is chosen.
void on_passwordCharTemplateSelector_activated (int index)
 Show the chosen character set's characters in the line edit, editable only for the custom set.
void on_checkBoxSelection_clicked ()
 Re-apply the clipboard gating for the current clipboard mode.
void on_addButton_clicked ()
 Append a "New profile" row pointing at the global store path, select it and put the cursor in the name field.
void on_deleteButton_clicked ()
 Remove the selected profile row (a message when none is); the list's currentRowChanged re-points the form at a neighbour.
void on_profilePathBrowse_clicked ()
 Pick the selected profile's store folder and store it in its entry.
void on_checkBoxUseTrayIcon_clicked ()
 Hide-on-close and start-minimised are only offered with a tray icon.
void on_checkBoxUseGit_clicked ()
 Enable the Git-dependent boxes (add .gpg-id, auto pull/push, and in native mode the parent-repository switch) with "use Git".
void on_checkBoxUsePwgen_clicked ()
 Enable pwgen's flags or the character-set controls, whichever the "use pwgen" box selects; nothing in pass mode, where pass generates.
void onProfileSelected (int row)
 The profile list's current row changed: show that profile.
void onProfileNameEdited (const QString &name)
 The name field was typed in: store it in the entry and the list item, then validate (duplicates, empty).
void onProfilePathEdited (const QString &path)
 The path field was typed in: store it in the entry, validate and refresh the status line.
void onProfileSigningKeyEdited (const QString &key)
 The signing-key field was typed in: store it in the entry and validate (fingerprints only, shared keys).
void onProfileGitToggled ()
 One of the profile's Git boxes was clicked: all three flags become the profile's own (no longer following the globals), and push and pull are enabled only with Git.

Private Member Functions

void updateSecretFieldsEnabled ()
void loadProfileForm (int row)
 Show row row's profile in the form (or clear and disable it for -1), with m_loadingForm set so the fields' edited-signals do not write back. The Git boxes show the profile's own flags, else the global ones.
auto currentEntry () -> ProfileEntry *
 The entry the form is editing.
void updateProfileStatus ()
 Refresh the status line under the form: the profile's name and cleaned path, marked "New" while the folder does not exist, or a reminder to fill in the required fields.
void setGitPath (const QString &path)
 Show path as the git executable; an empty path disables and turns off "use Git".
void setProfiles (Profiles profiles, const QString &currentProfile)
 Fill the profile list and m_entries from profiles, dropping the empty-named leftover older versions wrote, select currentProfile and validate.
void usePass (bool usePass)
 Tick the pass or the native radio button and enable the matching group box.
void applySettings (const AppSettings &settings)
 Load the dialog's value widgets from an AppSettings struct.
auto readSettings () -> AppSettings
 Build an AppSettings struct from the dialog's widgets.
void setGroupBoxState ()
 Enable the group box of the chosen backend and, in pass mode, disable the password-generation controls pass takes care of; in native mode hand them back to on_checkBoxUsePwgen_clicked().
auto selectExecutable () -> QString
 Ask for an existing file in a read-only file dialog.
auto selectFolder () -> QString
 Ask for a directory in a directories-only file dialog.
void criticalMessage (const QString &title, const QString &text)
 QMessageBox::critical with a single OK button. Once a workaround for crashes in Qt 5.4.1 before QApplication::exec(); no caller today.
auto isQrencodeAvailable (const QString &configuredPath) -> bool
 Whether qrencode can run: configuredPath when it is an executable file, else a qrencode on Util's PATH, which is then saved as the qrencode executable. Always false on Windows.
void validate ()
 Check every profile (problemsOf(), sharingTheKey()), mark the rows and the form, enable OK only when no profile has a problem, and refresh the pass Git warning.
void updatePassGitWarning ()
auto problemsOf (const ProfileEntry &entry, const QHash< QString, int > &names) const -> ProfileProblems
 What is wrong with entry's name, store path and signing keys.
void showProblems (int row, const ProfileProblems &problems)
 Mark row row of the profile list, and the form fields when it is the row being edited, with problems.
auto signingStores () const -> SigningStores
 Resolve every profile's store and fingerprints once.
auto signerKeys (const QString &signingKey, const QProcessEnvironment &env) const -> QSet< QString >
 One profile's signing keys as signers: each key as written, plus the primary fingerprint gpg gives for a complete key ID or (sub)key fingerprint.
auto sharingTheKey (int row, const SigningStores &resolved) const -> QStringList
 The other profiles, for other stores, whose signing keys share a fingerprint with row row's.
void initializeNewProfiles (const Profiles &existingProfiles)
 For every saved profile whose store was not a profile's store when the dialog opened: offer to create the folder and, when it has no .gpg-id, ask for recipients and initialise it.
auto ensureProfileFolder (const QString &path) -> bool
 Offer to create a new profile's store folder when it is missing.
void initialiseProfileStore (const QString &name, const Profile &profile, const QString &path)
 Ask for a new profile's recipients and initialise its store with them, keeping the active backend's settings and queue on the active store (#1774).
void warnAboutSshAuthSockOverride ()
void followActiveProfile (const Profiles &profiles)
 Point the active profile at its new name after a rename (or at none after a deletion), and let its own Git flags replace the global ones, as switching to it does.

Private Attributes

QString m_nameTip
QString m_pathTip
QString m_keyTip
QLabel * m_sharedKeyWarning = nullptr
 Below the signing key: the profiles that share it, if any.
QLabel * m_passGitWarning = nullptr
 In the pass box: the stores pass would commit outside of, if any.
QHash< QString, QString > m_primaryOf
bool m_recheckSigners = false
std::optional< AppSettings > m_gpgSettings
QList< ProfileEntry > m_entries
 The profiles as shown; index == row in profileList.
int m_currentEntry = -1
 Row whose fields the form shows, -1 for none.
bool m_loadingForm = false
QScopedPointer< Ui::ConfigDialog > ui
 The widgets from configdialog.ui.
QString m_customPasswordChars

Detailed Description

The ConfigDialog handles the configuration interface.

Presents controls for profiles, generation tools (pwgen/pass), GPG/git/OTP/qrencode integration, template handling, tray icon and autoclear options, and exposes methods to read and update those settings.

Definition at line 39 of file configdialog.h.

Constructor & Destructor Documentation

◆ ConfigDialog()

ConfigDialog::ConfigDialog ( QWidget * parent)
explicit

Construct a ConfigDialog associated with the given main window.

Parameters
parentParent widget, usually the main window.

Definition at line 45 of file configdialog.cpp.

Here is the call graph for this function:
Here is the caller graph for this function:

Member Function Documentation

◆ applySettings()

void ConfigDialog::applySettings ( const AppSettings & settings)
private

Load the dialog's value widgets from an AppSettings struct.

Mirrors the legacy per-getter constructor loads. Sets values only; the constructor still handles environment-dependent gating (tray/OTP/qrencode availability, clipboard combo population, primary-selection support) and the profile table. Password-generation and pwgen-path widgets are intentionally not loaded here, matching the previous behaviour.

Parameters
settingsValues to display.

Definition at line 181 of file configdialog.cpp.

Here is the call graph for this function:
Here is the caller graph for this function:

◆ changeEvent()

void ConfigDialog::changeEvent ( QEvent * event)
overrideprotected

Forget the signing keys gpg did not know while the dialog is in the background, and check them again once it is back in front.

Parameters
eventThe change; only activation changes matter here.

Definition at line 454 of file configdialog.cpp.

Here is the call graph for this function:

◆ criticalMessage()

void ConfigDialog::criticalMessage ( const QString & title,
const QString & text )
private

QMessageBox::critical with a single OK button. Once a workaround for crashes in Qt 5.4.1 before QApplication::exec(); no caller today.

Parameters
titleThe box's title.
textThe message.

Definition at line 925 of file configdialog.cpp.

◆ currentEntry()

auto ConfigDialog::currentEntry ( ) -> ProfileEntry *
private

The entry the form is editing.

Returns
A pointer into m_entries, or nullptr when no row is current.

Definition at line 780 of file configdialog.cpp.

Here is the caller graph for this function:

◆ ensureProfileFolder()

auto ConfigDialog::ensureProfileFolder ( const QString & path) -> bool
private

Offer to create a new profile's store folder when it is missing.

Parameters
pathThe folder, cleaned.
Returns
Whether the folder exists now.

Definition at line 822 of file configdialog.cpp.

Here is the call graph for this function:
Here is the caller graph for this function:

◆ followActiveProfile()

void ConfigDialog::followActiveProfile ( const Profiles & profiles)
private

Point the active profile at its new name after a rename (or at none after a deletion), and let its own Git flags replace the global ones, as switching to it does.

Parameters
profilesThe profiles as saved.

Definition at line 575 of file configdialog.cpp.

Here is the call graph for this function:
Here is the caller graph for this function:

◆ getPasswordConfiguration()

auto ConfigDialog::getPasswordConfiguration ( ) -> PasswordConfiguration

Read the current password configuration from the dialog controls.

Returns
Current PasswordConfiguration.

Definition at line 1051 of file configdialog.cpp.

Here is the caller graph for this function:

◆ getProfiles()

auto ConfigDialog::getProfiles ( ) -> Profiles

Return all configured profiles.

Returns
Hash of profile name to key-value settings map.

Definition at line 814 of file configdialog.cpp.

Here is the caller graph for this function:

◆ initialiseProfileStore()

void ConfigDialog::initialiseProfileStore ( const QString & name,
const Profile & profile,
const QString & path )
private

Ask for a new profile's recipients and initialise its store with them, keeping the active backend's settings and queue on the active store (#1774).

Parameters
nameThe profile's name, for titles and messages.
profileThe profile.
pathIts store folder, cleaned.

Definition at line 841 of file configdialog.cpp.

Here is the call graph for this function:
Here is the caller graph for this function:

◆ initializeNewProfiles()

void ConfigDialog::initializeNewProfiles ( const Profiles & existingProfiles)
private

For every saved profile whose store was not a profile's store when the dialog opened: offer to create the folder and, when it has no .gpg-id, ask for recipients and initialise it.

Parameters
existingProfilesThe profiles as they were when the dialog opened.

Definition at line 875 of file configdialog.cpp.

Here is the call graph for this function:
Here is the caller graph for this function:

◆ isFingerprintList()

auto ConfigDialog::isFingerprintList ( const QString & setting) -> bool
static

Whether a signing-key setting holds only full key fingerprints (40 or 64 hexadecimal characters each, space separated); empty passes.

Parameters
settingThe profile's signing key field.
Returns
true when every token is a fingerprint.

Definition at line 333 of file configdialog.cpp.

Here is the caller graph for this function:

◆ isQrencodeAvailable()

auto ConfigDialog::isQrencodeAvailable ( const QString & configuredPath) -> bool
private

Whether qrencode can run: configuredPath when it is an executable file, else a qrencode on Util's PATH, which is then saved as the qrencode executable. Always false on Windows.

Parameters
configuredPathThe saved qrencode executable, possibly empty.
Returns
true when QR codes can be shown.

Definition at line 931 of file configdialog.cpp.

Here is the call graph for this function:
Here is the caller graph for this function:

◆ loadProfileForm()

void ConfigDialog::loadProfileForm ( int row)
private

Show row row's profile in the form (or clear and disable it for -1), with m_loadingForm set so the fields' edited-signals do not write back. The Git boxes show the profile's own flags, else the global ones.

Parameters
rowRow in m_entries, or -1 for none.

Definition at line 789 of file configdialog.cpp.

Here is the call graph for this function:
Here is the caller graph for this function:

◆ on_accepted

void ConfigDialog::on_accepted ( )
privateslot

On OK: warn about a dubious SSH_AUTH_SOCK override, save the settings and the profiles, let the active profile follow a rename, and create and initialise the stores of profiles added in this session.

Definition at line 595 of file configdialog.cpp.

Here is the call graph for this function:
Here is the caller graph for this function:

◆ on_addButton_clicked

void ConfigDialog::on_addButton_clicked ( )
privateslot

Append a "New profile" row pointing at the global store path, select it and put the cursor in the name field.

Definition at line 892 of file configdialog.cpp.

Here is the call graph for this function:

◆ on_autodetectButton_clicked

void ConfigDialog::on_autodetectButton_clicked ( )
privateslot

Fill the pass, gpg (gpg2 first), git and pwgen paths from PATH, keeping a field as it is when nothing is found, and choose the pass backend when pass was found.

Definition at line 608 of file configdialog.cpp.

Here is the call graph for this function:

◆ on_checkBoxSelection_clicked

void ConfigDialog::on_checkBoxSelection_clicked ( )
privateslot

Re-apply the clipboard gating for the current clipboard mode.

Definition at line 754 of file configdialog.cpp.

Here is the call graph for this function:
Here is the caller graph for this function:

◆ on_checkBoxUseGit_clicked

void ConfigDialog::on_checkBoxUseGit_clicked ( )
privateslot

Enable the Git-dependent boxes (add .gpg-id, auto pull/push, and in native mode the parent-repository switch) with "use Git".

Definition at line 987 of file configdialog.cpp.

Here is the caller graph for this function:

◆ on_checkBoxUsePwgen_clicked

void ConfigDialog::on_checkBoxUsePwgen_clicked ( )
privateslot

Enable pwgen's flags or the character-set controls, whichever the "use pwgen" box selects; nothing in pass mode, where pass generates.

Definition at line 1017 of file configdialog.cpp.

Here is the call graph for this function:
Here is the caller graph for this function:

◆ on_checkBoxUseTrayIcon_clicked

void ConfigDialog::on_checkBoxUseTrayIcon_clicked ( )
privateslot

Hide-on-close and start-minimised are only offered with a tray icon.

Definition at line 964 of file configdialog.cpp.

◆ on_comboBoxClipboard_activated

void ConfigDialog::on_comboBoxClipboard_activated ( int index)
privateslot

Enable the controls that only mean something with a clipboard (selection, hiding, autoclear) unless "No clipboard" is chosen.

Parameters
indexThe combo box row; 0 is "No clipboard".

Definition at line 721 of file configdialog.cpp.

Here is the call graph for this function:
Here is the caller graph for this function:

◆ on_deleteButton_clicked

void ConfigDialog::on_deleteButton_clicked ( )
privateslot

Remove the selected profile row (a message when none is); the list's currentRowChanged re-points the form at a neighbour.

Definition at line 912 of file configdialog.cpp.

Here is the call graph for this function:

◆ on_passwordCharTemplateSelector_activated

void ConfigDialog::on_passwordCharTemplateSelector_activated ( int index)
privateslot

Show the chosen character set's characters in the line edit, editable only for the custom set.

Parameters
indexA PasswordConfiguration::CharacterSet value.

Definition at line 1067 of file configdialog.cpp.

Here is the call graph for this function:

◆ on_profilePathBrowse_clicked

void ConfigDialog::on_profilePathBrowse_clicked ( )
privateslot

Pick the selected profile's store folder and store it in its entry.

Definition at line 904 of file configdialog.cpp.

Here is the call graph for this function:

◆ on_pushButtonGenerateKey_clicked

void ConfigDialog::on_pushButtonGenerateKey_clicked ( )
privateslot

Open KeygenDialog for the gpg shown in the dialog.

Definition at line 701 of file configdialog.cpp.

Here is the call graph for this function:

◆ on_radioButtonNative_clicked

void ConfigDialog::on_radioButtonNative_clicked ( )
privateslot

Native (gpg/git) backend chosen: enable its group box, disable pass's.

Definition at line 631 of file configdialog.cpp.

Here is the call graph for this function:

◆ on_radioButtonPass_clicked

void ConfigDialog::on_radioButtonPass_clicked ( )
privateslot

pass backend chosen: enable its group box, disable the native one.

Definition at line 633 of file configdialog.cpp.

Here is the call graph for this function:

◆ on_toolButtonGit_clicked

void ConfigDialog::on_toolButtonGit_clicked ( )
privateslot

Pick the git executable in a file dialog; a cancelled dialog turns Git off and disables its checkbox, as a missing git does.

Definition at line 682 of file configdialog.cpp.

Here is the call graph for this function:

◆ on_toolButtonGpg_clicked

void ConfigDialog::on_toolButtonGpg_clicked ( )
privateslot

Pick the gpg executable in a file dialog; cancel keeps the field.

Definition at line 694 of file configdialog.cpp.

Here is the call graph for this function:

◆ on_toolButtonPass_clicked

void ConfigDialog::on_toolButtonPass_clicked ( )
privateslot

Pick the pass executable in a file dialog; cancel keeps the field.

Definition at line 706 of file configdialog.cpp.

Here is the call graph for this function:

◆ on_toolButtonPwgen_clicked

void ConfigDialog::on_toolButtonPwgen_clicked ( )
privateslot

Pick the pwgen executable; a choice enables "use pwgen", a cancelled dialog unticks and disables it.

Definition at line 997 of file configdialog.cpp.

Here is the call graph for this function:

◆ on_toolButtonStore_clicked

void ConfigDialog::on_toolButtonStore_clicked ( )
privateslot

Pick the password store folder for the pass backend's store path.

Definition at line 713 of file configdialog.cpp.

Here is the call graph for this function:

◆ onProfileGitToggled

void ConfigDialog::onProfileGitToggled ( )
privateslot

One of the profile's Git boxes was clicked: all three flags become the profile's own (no longer following the globals), and push and pull are enabled only with Git.

Definition at line 1112 of file configdialog.cpp.

Here is the call graph for this function:
Here is the caller graph for this function:

◆ onProfileNameEdited

void ConfigDialog::onProfileNameEdited ( const QString & name)
privateslot

The name field was typed in: store it in the entry and the list item, then validate (duplicates, empty).

Parameters
nameThe text as typed.

Definition at line 1079 of file configdialog.cpp.

Here is the call graph for this function:
Here is the caller graph for this function:

◆ onProfilePathEdited

void ConfigDialog::onProfilePathEdited ( const QString & path)
privateslot

The path field was typed in: store it in the entry, validate and refresh the status line.

Parameters
pathThe text as typed.

Definition at line 1092 of file configdialog.cpp.

Here is the call graph for this function:
Here is the caller graph for this function:

◆ onProfileSelected

void ConfigDialog::onProfileSelected ( int row)
privateslot

The profile list's current row changed: show that profile.

Parameters
rowThe new row, -1 for none.

Definition at line 1077 of file configdialog.cpp.

Here is the call graph for this function:
Here is the caller graph for this function:

◆ onProfileSigningKeyEdited

void ConfigDialog::onProfileSigningKeyEdited ( const QString & key)
privateslot

The signing-key field was typed in: store it in the entry and validate (fingerprints only, shared keys).

Parameters
keyThe text as typed.

Definition at line 1102 of file configdialog.cpp.

Here is the call graph for this function:
Here is the caller graph for this function:

◆ problemsOf()

auto ConfigDialog::problemsOf ( const ProfileEntry & entry,
const QHash< QString, int > & names ) const -> ProfileProblems
private

What is wrong with entry's name, store path and signing keys.

Parameters
entryThe profile to check.
namesHow many profiles carry each name, for duplicates.
Returns
The complaints, empty where a field is fine.

Definition at line 345 of file configdialog.cpp.

Here is the call graph for this function:
Here is the caller graph for this function:

◆ readSettings()

auto ConfigDialog::readSettings ( ) -> AppSettings
private

Build an AppSettings struct from the dialog's widgets.

Starts from the currently persisted settings and overwrites only the fields this dialog owns, so unrelated keys (window geometry, profiles, etc.) are preserved on save.

Returns
Settings reflecting the dialog state.

Definition at line 244 of file configdialog.cpp.

Here is the call graph for this function:
Here is the caller graph for this function:

◆ selectExecutable()

auto ConfigDialog::selectExecutable ( ) -> QString
private

Ask for an existing file in a read-only file dialog.

Returns
The chosen file, empty when cancelled.

Definition at line 659 of file configdialog.cpp.

Here is the caller graph for this function:

◆ selectFolder()

auto ConfigDialog::selectFolder ( ) -> QString
private

Ask for a directory in a directories-only file dialog.

Returns
The chosen folder, empty when cancelled.

Definition at line 670 of file configdialog.cpp.

Here is the caller graph for this function:

◆ setGitPath()

void ConfigDialog::setGitPath ( const QString & path)
private

Show path as the git executable; an empty path disables and turns off "use Git".

Parameters
pathThe git executable, or empty for none.

Definition at line 319 of file configdialog.cpp.

Here is the call graph for this function:
Here is the caller graph for this function:

◆ setGroupBoxState()

void ConfigDialog::setGroupBoxState ( )
private

Enable the group box of the chosen backend and, in pass mode, disable the password-generation controls pass takes care of; in native mode hand them back to on_checkBoxUsePwgen_clicked().

Definition at line 635 of file configdialog.cpp.

Here is the call graph for this function:
Here is the caller graph for this function:

◆ setPasswordConfiguration()

void ConfigDialog::setPasswordConfiguration ( const PasswordConfiguration & config)

Apply a password configuration to the dialog controls.

Parameters
configConfiguration to display.

Definition at line 1038 of file configdialog.cpp.

Here is the caller graph for this function:

◆ setProfiles()

void ConfigDialog::setProfiles ( Profiles profiles,
const QString & currentProfile )
private

Fill the profile list and m_entries from profiles, dropping the empty-named leftover older versions wrote, select currentProfile and validate.

Parameters
profilesThe saved profiles.
currentProfileThe active profile's name, to select its row.

Definition at line 758 of file configdialog.cpp.

Here is the call graph for this function:
Here is the caller graph for this function:

◆ setPwgenPath()

void ConfigDialog::setPwgenPath ( const QString & path)

Set the path to the pwgen executable.

Parameters
pathPath to pwgen.

Definition at line 1008 of file configdialog.cpp.

Here is the call graph for this function:
Here is the caller graph for this function:

◆ sharingTheKey()

auto ConfigDialog::sharingTheKey ( int row,
const SigningStores & resolved ) const -> QStringList
nodiscardprivate

The other profiles, for other stores, whose signing keys share a fingerprint with row row's.

Parameters
rowThe profile's row.
resolvedWhat signingStores() gave for this validation.
Returns
Their names, sorted; empty when none or no key is set.

Definition at line 475 of file configdialog.cpp.

Here is the caller graph for this function:

◆ showProblems()

void ConfigDialog::showProblems ( int row,
const ProfileProblems & problems )
private

Mark row row of the profile list, and the form fields when it is the row being edited, with problems.

Parameters
rowRow in the profile list.
problemsWhat problemsOf() found for it.

Definition at line 367 of file configdialog.cpp.

Here is the call graph for this function:
Here is the caller graph for this function:

◆ signerKeys()

auto ConfigDialog::signerKeys ( const QString & signingKey,
const QProcessEnvironment & env ) const -> QSet< QString >
nodiscardprivate

One profile's signing keys as signers: each key as written, plus the primary fingerprint gpg gives for a complete key ID or (sub)key fingerprint.

Parameters
signingKeyThe profile's signing-key setting.
envThe environment gpg looks keys up in (its GPG home).
Returns
Upper-case fingerprints and key IDs.

Definition at line 409 of file configdialog.cpp.

Here is the call graph for this function:
Here is the caller graph for this function:

◆ signingStores()

auto ConfigDialog::signingStores ( ) const -> SigningStores
nodiscardprivate

Resolve every profile's store and fingerprints once.

Returns
One entry per row of m_entries.

Definition at line 385 of file configdialog.cpp.

Here is the call graph for this function:
Here is the caller graph for this function:

◆ updatePassGitWarning()

void ConfigDialog::updatePassGitWarning ( )
private

Shows m_passGitWarning for the stores Util::repositoryPassClimbsTo() names, while the pass backend is chosen.

Definition at line 521 of file configdialog.cpp.

Here is the call graph for this function:
Here is the caller graph for this function:

◆ updateProfileStatus()

void ConfigDialog::updateProfileStatus ( )
private

Refresh the status line under the form: the profile's name and cleaned path, marked "New" while the folder does not exist, or a reminder to fill in the required fields.

Definition at line 1124 of file configdialog.cpp.

Here is the call graph for this function:
Here is the caller graph for this function:

◆ updateSecretFieldsEnabled()

void ConfigDialog::updateSecretFieldsEnabled ( )
private

The secret-fields and every-field checkboxes only while passwords are hidden; the secret words and "Default" only while secret fields are hidden and every field is not.

Definition at line 734 of file configdialog.cpp.

Here is the caller graph for this function:

◆ useGit()

void ConfigDialog::useGit ( bool useGit)

Enable or disable git integration.

Parameters
useGittrue to enable git.

Definition at line 970 of file configdialog.cpp.

Here is the call graph for this function:
Here is the caller graph for this function:

◆ useGrepSearch()

void ConfigDialog::useGrepSearch ( bool useGrepSearch)

Enable or disable grep content search.

Parameters
useGrepSearchtrue to enable grep search.

Definition at line 979 of file configdialog.cpp.

Here is the call graph for this function:
Here is the caller graph for this function:

◆ useOtp()

void ConfigDialog::useOtp ( bool useOtp)

Enable or disable OTP support.

Parameters
useOtptrue to enable OTP.

Definition at line 975 of file configdialog.cpp.

Here is the call graph for this function:
Here is the caller graph for this function:

◆ usePass()

void ConfigDialog::usePass ( bool usePass)
private

Tick the pass or the native radio button and enable the matching group box.

Parameters
usePasstrue for the pass backend.

Definition at line 327 of file configdialog.cpp.

Here is the call graph for this function:
Here is the caller graph for this function:

◆ usePwgen()

void ConfigDialog::usePwgen ( bool usePwgen)

Enable or disable pwgen-based password generation.

Parameters
usePwgentrue to use pwgen.

Definition at line 1030 of file configdialog.cpp.

Here is the call graph for this function:
Here is the caller graph for this function:

◆ useQrencode()

void ConfigDialog::useQrencode ( bool useQrencode)

Enable or disable QR code display.

Parameters
useQrencodetrue to enable qrencode.

Definition at line 983 of file configdialog.cpp.

Here is the call graph for this function:
Here is the caller graph for this function:

◆ useSelection()

void ConfigDialog::useSelection ( bool useSelection)

Enable or disable clipboard selection mode.

Parameters
useSelectiontrue to enable selection mode.

Definition at line 749 of file configdialog.cpp.

Here is the call graph for this function:
Here is the caller graph for this function:

◆ useTrayIcon()

void ConfigDialog::useTrayIcon ( bool useSystray)

Show or hide the system tray icon.

Parameters
useSystraytrue to enable the tray icon.

Definition at line 951 of file configdialog.cpp.

Here is the caller graph for this function:

◆ validate()

void ConfigDialog::validate ( )
private

Check every profile (problemsOf(), sharingTheKey()), mark the rows and the form, enable OK only when no profile has a problem, and refresh the pass Git warning.

Definition at line 496 of file configdialog.cpp.

Here is the call graph for this function:
Here is the caller graph for this function:

◆ warnAboutSshAuthSockOverride()

void ConfigDialog::warnAboutSshAuthSockOverride ( )
private

Warn, without refusing, when the SSH_AUTH_SOCK override does not look like a socket; the value is saved as entered either way.

Definition at line 549 of file configdialog.cpp.

Here is the call graph for this function:
Here is the caller graph for this function:

Member Data Documentation

◆ m_currentEntry

int ConfigDialog::m_currentEntry = -1
private

Row whose fields the form shows, -1 for none.

Definition at line 300 of file configdialog.h.

◆ m_customPasswordChars

QString ConfigDialog::m_customPasswordChars
private

User-defined custom charset, retained while a builtin set is selected so it is not lost when the line edit shows the builtin's characters instead.

Definition at line 493 of file configdialog.h.

◆ m_entries

QList<ProfileEntry> ConfigDialog::m_entries
private

The profiles as shown; index == row in profileList.

Definition at line 298 of file configdialog.h.

◆ m_gpgSettings

std::optional<AppSettings> ConfigDialog::m_gpgSettings
mutableprivate

The settings naming the GPG home those lookups run in, read on first use.

Definition at line 296 of file configdialog.h.

◆ m_keyTip

QString ConfigDialog::m_keyTip
private

Designer tooltip of the signing-key field, put back when validate() has no complaint about it.

Definition at line 283 of file configdialog.h.

◆ m_loadingForm

bool ConfigDialog::m_loadingForm = false
private

True while loadProfileForm() sets the fields, so their edited-signals do not write back.

Definition at line 303 of file configdialog.h.

◆ m_nameTip

QString ConfigDialog::m_nameTip
private

Designer tooltip of the profile-name field, put back when validate() has no complaint about it.

Definition at line 277 of file configdialog.h.

◆ m_passGitWarning

QLabel* ConfigDialog::m_passGitWarning = nullptr
private

In the pass box: the stores pass would commit outside of, if any.

Definition at line 287 of file configdialog.h.

◆ m_pathTip

QString ConfigDialog::m_pathTip
private

Designer tooltip of the store-path field, put back when validate() has no complaint about it.

Definition at line 280 of file configdialog.h.

◆ m_primaryOf

QHash<QString, QString> ConfigDialog::m_primaryOf
mutableprivate

Primary fingerprint per gpg and signing-key token (empty: gpg does not know it), so each key is looked up once, not on every keystroke.

Definition at line 290 of file configdialog.h.

◆ m_recheckSigners

bool ConfigDialog::m_recheckSigners = false
private

An unknown key was forgotten in the background: validate() again on return.

Definition at line 293 of file configdialog.h.

◆ m_sharedKeyWarning

QLabel* ConfigDialog::m_sharedKeyWarning = nullptr
private

Below the signing key: the profiles that share it, if any.

Definition at line 285 of file configdialog.h.

◆ ui

QScopedPointer<Ui::ConfigDialog> ConfigDialog::ui
private

The widgets from configdialog.ui.

Definition at line 325 of file configdialog.h.


The documentation for this class was generated from the following files: