|
QtPass 2.0.0
Developer documentation
|
Owns the Pass backend lifecycle (RealPass vs ImitatePass). More...
#include <passbackendfactory.h>
Static Public Member Functions | |
| static auto | getPass () -> Pass * |
| Get the active backend, constructing and initialising it on first use after construction or invalidation. | |
| static auto | getRealPass () -> RealPass * |
| Get the lazily-constructed RealPass backend. | |
| static auto | getImitatePass () -> ImitatePass * |
| Get the lazily-constructed ImitatePass backend. | |
| static void | invalidate () |
| Forget the currently active backend. | |
| static auto | isIdle () -> bool |
| Whether neither backend runs or waits for anything: after a switch of backend the previous one is kept, with its own queue. Backends not constructed yet count as idle (none is constructed here). | |
Private Member Functions | |
| PassBackendFactory ()=default | |
| Not constructible; the class has only static members. | |
Static Private Attributes | |
| static Pass * | pass = nullptr |
| The backend getPass() last selected; null until the first call and again after invalidate(). Points at one of the two below. | |
| static QScopedPointer< RealPass > | realPass |
| The pass backend, constructed on first use. | |
| static QScopedPointer< ImitatePass > | imitatePass |
| The gpg and git backend, constructed on first use. | |
Owns the Pass backend lifecycle (RealPass vs ImitatePass).
Extracted from QtPassSettings, which conflated settings storage with deciding and caching which password-store backend is active. The factory lazily constructs the two concrete backends, hands out the active one based on the configured mode, and exposes invalidate() so a settings change can force the active backend to be re-selected on next use.
Definition at line 29 of file passbackendfactory.h.
|
static |
Get the lazily-constructed ImitatePass backend.
Definition at line 48 of file passbackendfactory.cpp.
|
static |
Get the active backend, constructing and initialising it on first use after construction or invalidation.
Definition at line 22 of file passbackendfactory.cpp.
|
static |
Get the lazily-constructed RealPass backend.
Definition at line 41 of file passbackendfactory.cpp.
|
static |
Forget the currently active backend.
The next getPass() call re-selects and re-initialises a backend. Call after changing the "use pass" setting so the switch takes effect.
Definition at line 62 of file passbackendfactory.cpp.
|
static |
Whether neither backend runs or waits for anything: after a switch of backend the previous one is kept, with its own queue. Backends not constructed yet count as idle (none is constructed here).
Definition at line 57 of file passbackendfactory.cpp.
|
staticprivate |
The gpg and git backend, constructed on first use.
Definition at line 76 of file passbackendfactory.h.
|
staticprivate |
The backend getPass() last selected; null until the first call and again after invalidate(). Points at one of the two below.
Definition at line 68 of file passbackendfactory.h.
|
staticprivate |
The pass backend, constructed on first use.
Definition at line 74 of file passbackendfactory.h.