mirror of
https://github.com/keepassxreboot/keepassxc.git
synced 2025-08-05 13:04:33 -04:00
Fix code formatting with new clang-format version
This commit is contained in:
parent
afe634d4f2
commit
e48ef80e9c
25 changed files with 91 additions and 178 deletions
|
@ -50,14 +50,11 @@ AutoTypePlatformX11::AutoTypePlatformX11()
|
|||
m_atomTransientFor = XInternAtom(m_dpy, "WM_TRANSIENT_FOR", True);
|
||||
m_atomWindow = XInternAtom(m_dpy, "WINDOW", True);
|
||||
|
||||
m_classBlacklist << "desktop_window"
|
||||
<< "gnome-panel"; // Gnome
|
||||
m_classBlacklist << "kdesktop"
|
||||
<< "kicker"; // KDE 3
|
||||
m_classBlacklist << "desktop_window" << "gnome-panel"; // Gnome
|
||||
m_classBlacklist << "kdesktop" << "kicker"; // KDE 3
|
||||
m_classBlacklist << "Plasma"; // KDE 4
|
||||
m_classBlacklist << "plasmashell"; // KDE 5
|
||||
m_classBlacklist << "xfdesktop"
|
||||
<< "xfce4-panel"; // Xfce 4
|
||||
m_classBlacklist << "xfdesktop" << "xfce4-panel"; // Xfce 4
|
||||
|
||||
m_xkb = nullptr;
|
||||
|
||||
|
|
|
@ -25,8 +25,7 @@
|
|||
|
||||
#include <QCommandLineParser>
|
||||
|
||||
const QCommandLineOption Add::UsernameOption = QCommandLineOption(QStringList() << "u"
|
||||
<< "username",
|
||||
const QCommandLineOption Add::UsernameOption = QCommandLineOption(QStringList() << "u" << "username",
|
||||
QObject::tr("Username for the entry."),
|
||||
QObject::tr("username"));
|
||||
|
||||
|
@ -37,13 +36,10 @@ const QCommandLineOption Add::NotesOption =
|
|||
QCommandLineOption(QStringList() << "notes", QObject::tr("Notes for the entry."), QObject::tr("Notes"));
|
||||
|
||||
const QCommandLineOption Add::PasswordPromptOption =
|
||||
QCommandLineOption(QStringList() << "p"
|
||||
<< "password-prompt",
|
||||
QObject::tr("Prompt for the entry's password."));
|
||||
QCommandLineOption(QStringList() << "p" << "password-prompt", QObject::tr("Prompt for the entry's password."));
|
||||
|
||||
const QCommandLineOption Add::GenerateOption = QCommandLineOption(QStringList() << "g"
|
||||
<< "generate",
|
||||
QObject::tr("Generate a password for the entry."));
|
||||
const QCommandLineOption Add::GenerateOption =
|
||||
QCommandLineOption(QStringList() << "g" << "generate", QObject::tr("Generate a password for the entry."));
|
||||
|
||||
Add::Add()
|
||||
{
|
||||
|
|
|
@ -25,9 +25,7 @@
|
|||
#include <QFile>
|
||||
|
||||
const QCommandLineOption AttachmentImport::ForceOption =
|
||||
QCommandLineOption(QStringList() << "f"
|
||||
<< "force",
|
||||
QObject::tr("Overwrite existing attachments."));
|
||||
QCommandLineOption(QStringList() << "f" << "force", QObject::tr("Overwrite existing attachments."));
|
||||
|
||||
AttachmentImport::AttachmentImport()
|
||||
{
|
||||
|
|
|
@ -27,21 +27,18 @@
|
|||
#define CLI_DEFAULT_CLIP_TIMEOUT 10
|
||||
|
||||
const QCommandLineOption Clip::AttributeOption = QCommandLineOption(
|
||||
QStringList() << "a"
|
||||
<< "attribute",
|
||||
QStringList() << "a" << "attribute",
|
||||
QObject::tr("Copy the given attribute to the clipboard. Defaults to \"password\" if not specified.",
|
||||
"Don't translate \"password\", it refers to the attribute."),
|
||||
"attr",
|
||||
"password");
|
||||
|
||||
const QCommandLineOption Clip::TotpOption =
|
||||
QCommandLineOption(QStringList() << "t"
|
||||
<< "totp",
|
||||
QCommandLineOption(QStringList() << "t" << "totp",
|
||||
QObject::tr("Copy the current TOTP to the clipboard (equivalent to \"-a totp\")."));
|
||||
|
||||
const QCommandLineOption Clip::BestMatchOption =
|
||||
QCommandLineOption(QStringList() << "b"
|
||||
<< "best-match",
|
||||
QCommandLineOption(QStringList() << "b" << "best-match",
|
||||
QObject::tr("Must match only one entry, otherwise a list of possible matches is shown."));
|
||||
|
||||
Clip::Clip()
|
||||
|
|
|
@ -56,12 +56,10 @@ const QCommandLineOption Command::HelpOption = QCommandLineOption(QStringList()
|
|||
QObject::tr("Display this help."));
|
||||
|
||||
const QCommandLineOption Command::QuietOption =
|
||||
QCommandLineOption(QStringList() << "q"
|
||||
<< "quiet",
|
||||
QCommandLineOption(QStringList() << "q" << "quiet",
|
||||
QObject::tr("Silence password prompt and other secondary outputs."));
|
||||
|
||||
const QCommandLineOption Command::KeyFileOption = QCommandLineOption(QStringList() << "k"
|
||||
<< "key-file",
|
||||
const QCommandLineOption Command::KeyFileOption = QCommandLineOption(QStringList() << "k" << "key-file",
|
||||
QObject::tr("Key file of the database."),
|
||||
QObject::tr("path"));
|
||||
|
||||
|
@ -69,8 +67,7 @@ const QCommandLineOption Command::NoPasswordOption =
|
|||
QCommandLineOption(QStringList() << "no-password", QObject::tr("Deactivate password key for the database."));
|
||||
|
||||
const QCommandLineOption Command::YubiKeyOption =
|
||||
QCommandLineOption(QStringList() << "y"
|
||||
<< "yubikey",
|
||||
QCommandLineOption(QStringList() << "y" << "yubikey",
|
||||
QObject::tr("Yubikey slot and optional serial used to access the database (e.g., 1:7370001)."),
|
||||
QObject::tr("slot[:serial]"));
|
||||
|
||||
|
|
|
@ -25,8 +25,7 @@
|
|||
#include <QFileInfo>
|
||||
|
||||
const QCommandLineOption DatabaseCreate::DecryptionTimeOption =
|
||||
QCommandLineOption(QStringList() << "t"
|
||||
<< "decryption-time",
|
||||
QCommandLineOption(QStringList() << "t" << "decryption-time",
|
||||
QObject::tr("Target decryption time in MS for the database."),
|
||||
QObject::tr("time"));
|
||||
|
||||
|
@ -41,9 +40,7 @@ const QCommandLineOption DatabaseCreate::SetKeyFileOption =
|
|||
QObject::tr("path"));
|
||||
|
||||
const QCommandLineOption DatabaseCreate::SetPasswordOption =
|
||||
QCommandLineOption(QStringList() << "p"
|
||||
<< "set-password",
|
||||
QObject::tr("Set a password for the database."));
|
||||
QCommandLineOption(QStringList() << "p" << "set-password", QObject::tr("Set a password for the database."));
|
||||
|
||||
DatabaseCreate::DatabaseCreate()
|
||||
{
|
||||
|
|
|
@ -24,14 +24,12 @@
|
|||
#include <QCommandLineParser>
|
||||
|
||||
const QCommandLineOption Diceware::WordCountOption =
|
||||
QCommandLineOption(QStringList() << "W"
|
||||
<< "words",
|
||||
QCommandLineOption(QStringList() << "W" << "words",
|
||||
QObject::tr("Word count for the diceware passphrase."),
|
||||
QObject::tr("count", "CLI parameter"));
|
||||
|
||||
const QCommandLineOption Diceware::WordListOption =
|
||||
QCommandLineOption(QStringList() << "w"
|
||||
<< "word-list",
|
||||
QCommandLineOption(QStringList() << "w" << "word-list",
|
||||
QObject::tr("Wordlist for the diceware generator.\n[Default: EFF English]"),
|
||||
QObject::tr("path"));
|
||||
|
||||
|
|
|
@ -26,10 +26,8 @@
|
|||
|
||||
#include <QCommandLineParser>
|
||||
|
||||
const QCommandLineOption Edit::TitleOption = QCommandLineOption(QStringList() << "t"
|
||||
<< "title",
|
||||
QObject::tr("Title for the entry."),
|
||||
QObject::tr("title"));
|
||||
const QCommandLineOption Edit::TitleOption =
|
||||
QCommandLineOption(QStringList() << "t" << "title", QObject::tr("Title for the entry."), QObject::tr("title"));
|
||||
|
||||
Edit::Edit()
|
||||
{
|
||||
|
|
|
@ -25,9 +25,7 @@
|
|||
#include <zxcvbn.h>
|
||||
|
||||
const QCommandLineOption Estimate::AdvancedOption =
|
||||
QCommandLineOption(QStringList() << "a"
|
||||
<< "advanced",
|
||||
QObject::tr("Perform advanced analysis on the password."));
|
||||
QCommandLineOption(QStringList() << "a" << "advanced", QObject::tr("Perform advanced analysis on the password."));
|
||||
|
||||
Estimate::Estimate()
|
||||
{
|
||||
|
|
|
@ -25,8 +25,7 @@
|
|||
#include <QCommandLineParser>
|
||||
|
||||
const QCommandLineOption Export::FormatOption = QCommandLineOption(
|
||||
QStringList() << "f"
|
||||
<< "format",
|
||||
QStringList() << "f" << "format",
|
||||
QObject::tr("Format to use when exporting. Available choices are 'xml' or 'csv'. Defaults to 'xml'."),
|
||||
QStringLiteral("xml|csv"));
|
||||
|
||||
|
|
|
@ -24,41 +24,30 @@
|
|||
#include <QCommandLineParser>
|
||||
|
||||
const QCommandLineOption Generate::PasswordLengthOption =
|
||||
QCommandLineOption(QStringList() << "L"
|
||||
<< "length",
|
||||
QCommandLineOption(QStringList() << "L" << "length",
|
||||
QObject::tr("Length of the generated password"),
|
||||
QObject::tr("length"));
|
||||
|
||||
const QCommandLineOption Generate::LowerCaseOption = QCommandLineOption(QStringList() << "l"
|
||||
<< "lower",
|
||||
QObject::tr("Use lowercase characters"));
|
||||
const QCommandLineOption Generate::LowerCaseOption =
|
||||
QCommandLineOption(QStringList() << "l" << "lower", QObject::tr("Use lowercase characters"));
|
||||
|
||||
const QCommandLineOption Generate::UpperCaseOption = QCommandLineOption(QStringList() << "U"
|
||||
<< "upper",
|
||||
QObject::tr("Use uppercase characters"));
|
||||
const QCommandLineOption Generate::UpperCaseOption =
|
||||
QCommandLineOption(QStringList() << "U" << "upper", QObject::tr("Use uppercase characters"));
|
||||
|
||||
const QCommandLineOption Generate::NumbersOption = QCommandLineOption(QStringList() << "n"
|
||||
<< "numeric",
|
||||
QObject::tr("Use numbers"));
|
||||
const QCommandLineOption Generate::NumbersOption =
|
||||
QCommandLineOption(QStringList() << "n" << "numeric", QObject::tr("Use numbers"));
|
||||
|
||||
const QCommandLineOption Generate::SpecialCharsOption = QCommandLineOption(QStringList() << "s"
|
||||
<< "special",
|
||||
QObject::tr("Use special characters"));
|
||||
const QCommandLineOption Generate::SpecialCharsOption =
|
||||
QCommandLineOption(QStringList() << "s" << "special", QObject::tr("Use special characters"));
|
||||
|
||||
const QCommandLineOption Generate::ExtendedAsciiOption = QCommandLineOption(QStringList() << "e"
|
||||
<< "extended",
|
||||
QObject::tr("Use extended ASCII"));
|
||||
const QCommandLineOption Generate::ExtendedAsciiOption =
|
||||
QCommandLineOption(QStringList() << "e" << "extended", QObject::tr("Use extended ASCII"));
|
||||
|
||||
const QCommandLineOption Generate::ExcludeCharsOption = QCommandLineOption(QStringList() << "x"
|
||||
<< "exclude",
|
||||
QObject::tr("Exclude character set"),
|
||||
QObject::tr("chars"));
|
||||
const QCommandLineOption Generate::ExcludeCharsOption =
|
||||
QCommandLineOption(QStringList() << "x" << "exclude", QObject::tr("Exclude character set"), QObject::tr("chars"));
|
||||
|
||||
const QCommandLineOption Generate::CustomCharacterSetOption =
|
||||
QCommandLineOption(QStringList() << "c"
|
||||
<< "custom",
|
||||
QObject::tr("Use custom character set"),
|
||||
QObject::tr("chars"));
|
||||
QCommandLineOption(QStringList() << "c" << "custom", QObject::tr("Use custom character set"), QObject::tr("chars"));
|
||||
|
||||
const QCommandLineOption Generate::ExcludeSimilarCharsOption =
|
||||
QCommandLineOption(QStringList() << "exclude-similar", QObject::tr("Exclude similar looking characters"));
|
||||
|
|
|
@ -24,13 +24,10 @@
|
|||
#include <QCommandLineParser>
|
||||
|
||||
const QCommandLineOption List::RecursiveOption =
|
||||
QCommandLineOption(QStringList() << "R"
|
||||
<< "recursive",
|
||||
QObject::tr("Recursively list the elements of the group."));
|
||||
QCommandLineOption(QStringList() << "R" << "recursive", QObject::tr("Recursively list the elements of the group."));
|
||||
|
||||
const QCommandLineOption List::FlattenOption = QCommandLineOption(QStringList() << "f"
|
||||
<< "flatten",
|
||||
QObject::tr("Flattens the output to single lines."));
|
||||
const QCommandLineOption List::FlattenOption =
|
||||
QCommandLineOption(QStringList() << "f" << "flatten", QObject::tr("Flattens the output to single lines."));
|
||||
|
||||
List::List()
|
||||
{
|
||||
|
|
|
@ -24,8 +24,7 @@
|
|||
#include <QCommandLineParser>
|
||||
|
||||
const QCommandLineOption Merge::SameCredentialsOption =
|
||||
QCommandLineOption(QStringList() << "s"
|
||||
<< "same-credentials",
|
||||
QCommandLineOption(QStringList() << "s" << "same-credentials",
|
||||
QObject::tr("Use the same credentials for both database files."));
|
||||
|
||||
const QCommandLineOption Merge::KeyFileFromOption =
|
||||
|
|
|
@ -23,13 +23,11 @@
|
|||
|
||||
#include <QCommandLineParser>
|
||||
|
||||
const QCommandLineOption Show::TotpOption = QCommandLineOption(QStringList() << "t"
|
||||
<< "totp",
|
||||
QObject::tr("Show the entry's current TOTP."));
|
||||
const QCommandLineOption Show::TotpOption =
|
||||
QCommandLineOption(QStringList() << "t" << "totp", QObject::tr("Show the entry's current TOTP."));
|
||||
|
||||
const QCommandLineOption Show::ProtectedAttributesOption =
|
||||
QCommandLineOption(QStringList() << "s"
|
||||
<< "show-protected",
|
||||
QCommandLineOption(QStringList() << "s" << "show-protected",
|
||||
QObject::tr("Show the protected attributes in clear text."));
|
||||
|
||||
const QCommandLineOption Show::AllAttributesOption =
|
||||
|
@ -39,8 +37,7 @@ const QCommandLineOption Show::AttachmentsOption =
|
|||
QCommandLineOption(QStringList() << "show-attachments", QObject::tr("Show the attachments of the entry."));
|
||||
|
||||
const QCommandLineOption Show::AttributesOption = QCommandLineOption(
|
||||
QStringList() << "a"
|
||||
<< "attributes",
|
||||
QStringList() << "a" << "attributes",
|
||||
QObject::tr(
|
||||
"Names of the attributes to show. "
|
||||
"This option can be specified more than once, with each attribute shown one-per-line in the given order. "
|
||||
|
|
|
@ -124,10 +124,7 @@ namespace Tools
|
|||
constexpr auto kibibyte = 1024;
|
||||
double size = bytes;
|
||||
|
||||
QStringList units = QStringList() << "B"
|
||||
<< "KiB"
|
||||
<< "MiB"
|
||||
<< "GiB";
|
||||
QStringList units = QStringList() << "B" << "KiB" << "MiB" << "GiB";
|
||||
int i = 0;
|
||||
int maxI = units.size() - 1;
|
||||
|
||||
|
|
|
@ -77,12 +77,7 @@ CsvImportWidget::CsvImportWidget(QWidget* parent)
|
|||
<< QObject::tr("URL") << QObject::tr("Notes") << QObject::tr("TOTP") << QObject::tr("Icon")
|
||||
<< QObject::tr("Last Modified") << QObject::tr("Created");
|
||||
|
||||
m_fieldSeparatorList << ","
|
||||
<< ";"
|
||||
<< "-"
|
||||
<< ":"
|
||||
<< "."
|
||||
<< "\t";
|
||||
m_fieldSeparatorList << "," << ";" << "-" << ":" << "." << "\t";
|
||||
|
||||
m_combos << m_ui->groupCombo << m_ui->titleCombo << m_ui->usernameCombo << m_ui->passwordCombo << m_ui->urlCombo
|
||||
<< m_ui->notesCombo << m_ui->totpCombo << m_ui->iconCombo << m_ui->lastModifiedCombo << m_ui->createdCombo;
|
||||
|
|
|
@ -39,7 +39,7 @@ public:
|
|||
|
||||
public slots:
|
||||
void initialize() override;
|
||||
void uninitialize() override{};
|
||||
void uninitialize() override {};
|
||||
inline bool saveSettings() override
|
||||
{
|
||||
return true;
|
||||
|
|
|
@ -68,13 +68,9 @@ void PasskeyImporter::importSelectedFile(QFile& file, QSharedPointer<Database>&
|
|||
}
|
||||
|
||||
const auto privateKey = passkeyObject["privateKey"].toString();
|
||||
const auto missingKeys = Tools::getMissingValuesFromList<QString>(passkeyObject.keys(),
|
||||
QStringList() << "relyingParty"
|
||||
<< "url"
|
||||
<< "username"
|
||||
<< "credentialId"
|
||||
<< "userHandle"
|
||||
<< "privateKey");
|
||||
const auto missingKeys = Tools::getMissingValuesFromList<QString>(
|
||||
passkeyObject.keys(),
|
||||
QStringList() << "relyingParty" << "url" << "username" << "credentialId" << "userHandle" << "privateKey");
|
||||
if (!missingKeys.isEmpty()) {
|
||||
MessageBox::information(m_parent,
|
||||
tr("Cannot import passkey"),
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue