QtPass 2.0.0
Developer documentation
Loading...
Searching...
No Matches
Profile Struct Reference

One named password store: where it is, how its .gpg-id is signed and, optionally, its own Git switches. More...

#include <profile.h>

Public Member Functions

auto operator== (const Profile &other) const -> bool
 Field-wise equality, including the unset state of each flag.
auto operator!= (const Profile &other) const -> bool
 Negation of operator==.

Static Public Member Functions

static auto flagFromString (const QString &value) -> std::optional< bool >
 Parse the on-disk tri-state.
static auto flagToString (std::optional< bool > flag) -> QString
 Format a flag the way it is stored.

Public Attributes

QString path
 Password store directory.
QString signingKey
 Key(s) that sign this store's .gpg-id.
std::optional< bool > useGit
 Git on/off; unset follows the global.
std::optional< bool > autoPush
 Push after commits; unset = global.
std::optional< bool > autoPull
 Pull on start; unset = global.

Detailed Description

One named password store: where it is, how its .gpg-id is signed and, optionally, its own Git switches.

The Git flags are tri-state on disk ("" / "true" / "false"): unset means "follow the global setting", which is what every profile written before 1.8.0 has. Keys are stored under profile/<name>/ and are unchanged from the QHash-of-QHash days.

Definition at line 26 of file profile.h.

Member Function Documentation

◆ flagFromString()

auto Profile::flagFromString ( const QString & value) -> std::optional< bool >
inlinestatic

Parse the on-disk tri-state.

Parameters
value"true", "false" or anything else (unset).
Returns
The flag, or nullopt when unset.

Definition at line 38 of file profile.h.

Here is the caller graph for this function:

◆ flagToString()

auto Profile::flagToString ( std::optional< bool > flag) -> QString
inlinestatic

Format a flag the way it is stored.

Parameters
flagThe flag.
Returns
"true", "false" or "" for unset.

Definition at line 53 of file profile.h.

Here is the caller graph for this function:

◆ operator!=()

auto Profile::operator!= ( const Profile & other) const -> bool
inline

Negation of operator==.

Parameters
otherProfile to compare with.
Returns
true when any field differs.

Definition at line 75 of file profile.h.

◆ operator==()

auto Profile::operator== ( const Profile & other) const -> bool
inline

Field-wise equality, including the unset state of each flag.

Parameters
otherProfile to compare with.
Returns
true when every field matches.

Definition at line 65 of file profile.h.

Member Data Documentation

◆ autoPull

std::optional<bool> Profile::autoPull

Pull on start; unset = global.

Definition at line 31 of file profile.h.

◆ autoPush

std::optional<bool> Profile::autoPush

Push after commits; unset = global.

Definition at line 30 of file profile.h.

◆ path

QString Profile::path

Password store directory.

Definition at line 27 of file profile.h.

◆ signingKey

QString Profile::signingKey

Key(s) that sign this store's .gpg-id.

Definition at line 28 of file profile.h.

◆ useGit

std::optional<bool> Profile::useGit

Git on/off; unset follows the global.

Definition at line 29 of file profile.h.


The documentation for this struct was generated from the following file: