QtPass 2.0.0
Developer documentation
Loading...
Searching...
No Matches
keygendialog.cpp File Reference

Implements KeygenDialog: form validation, splicing the passphrase into the GPG batch the way gpg itself reads it, and the one-attempt connections to the Pass backend. More...

#include "keygendialog.h"
#include "configdialog.h"
#include "pass.h"
#include "qprogressindicator.h"
#include "qtpasssettings.h"
#include "ui_keygendialog.h"
#include "util.h"
#include "windowstatestore.h"
#include <QCheckBox>
#include <QMessageBox>
#include <QRegularExpression>
#include <algorithm>
#include "qtpasslogging.h"
Include dependency graph for keygendialog.cpp:

Go to the source code of this file.

Functions

static bool isControlStatement (const QString &line, const QString &control)
 Whether a batch line is the control statement control.

Detailed Description

Implements KeygenDialog: form validation, splicing the passphrase into the GPG batch the way gpg itself reads it, and the one-attempt connections to the Pass backend.

Definition in file keygendialog.cpp.

Function Documentation

◆ isControlStatement()

bool isControlStatement ( const QString & line,
const QString & control )
static

Whether a batch line is the control statement control.

Matches the way gpg's read_parameter_file does: leading whitespace skipped, keyword ends at the first whitespace, case-insensitive.

Parameters
lineOne line of the batch template.
controlThe statement to look for, e.g. no-protection.
Returns
true when the line is that statement, alone or followed by whitespace.

Definition at line 119 of file keygendialog.cpp.

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