7#include <QFileSystemModel>
8#include <QProcessEnvironment>
9#include <QRegularExpression>
64 static auto getDir(
const QModelIndex &index,
bool forPass,
65 const QFileSystemModel &model,
71 static auto endsWithGpg() ->
const QRegularExpression &;
95 static void initialiseEnvironment();
96 static QProcessEnvironment _env;
97 static bool _envInitialised;
QSortFilterProxyModel for filtering and displaying password store.
Static utility functions implementation.
static auto protocolRegex() -> const QRegularExpression &
Returns a regex to match URL protocols.
static auto endsWithGpg() -> const QRegularExpression &
Returns a regex to match .gpg file extensions.
static auto findPasswordStore() -> QString
Locate the password store directory.
static auto getDir(const QModelIndex &index, bool forPass, const QFileSystemModel &model, const StoreModel &storeModel) -> QString
Get the selected folder path, either relative to the configured pass store or absolute.
static auto isValidKeyId(const QString &keyId) -> bool
Check if a string looks like a valid GPG key ID. Validates a GPG key ID after normalization:
static auto newLinesRegex() -> const QRegularExpression &
Returns a regex to match newline characters.
static auto normalizeFolderPath(const QString &path) -> QString
Ensure a folder path always ends with the native directory separator.
static auto findBinaryInPath(QString binary) -> QString
Locate an executable by searching the process PATH and (on Windows) falling back to WSL.
static auto configIsValid() -> bool
Verify that the required configuration is complete.
constexpr int MS_PER_SECOND