From 3f25dc61554f3b8764d9d87bf0096bf1695d4cf5 Mon Sep 17 00:00:00 2001 From: Alexander Blum Date: Tue, 20 Jun 2023 18:28:53 +0200 Subject: fixes clang-format errors --- src/configdialog.cpp | 12 ++++++------ src/mainwindow.cpp | 3 ++- src/pass.cpp | 2 +- src/qtpasssettings.cpp | 6 ++++-- src/qtpasssettings.h | 3 ++- 5 files changed, 15 insertions(+), 11 deletions(-) diff --git a/src/configdialog.cpp b/src/configdialog.cpp index 72b5f809..3794c6f1 100644 --- a/src/configdialog.cpp +++ b/src/configdialog.cpp @@ -97,7 +97,8 @@ ConfigDialog::ConfigDialog(MainWindow *parent) useTemplate(QtPassSettings::isUseTemplate()); ui->profileTable->verticalHeader()->hide(); - ui->profileTable->horizontalHeader()->setSectionResizeMode(1, QHeaderView::Stretch); + ui->profileTable->horizontalHeader()->setSectionResizeMode( + 1, QHeaderView::Stretch); ui->label->setText(ui->label->text() + VERSION); ui->comboBoxClipboard->clear(); @@ -474,12 +475,11 @@ void ConfigDialog::setProfiles(QHash> profiles, while (i.hasNext()) { i.next(); if (!i.value().isEmpty() && !i.key().isEmpty()) { + ui->profileTable->setItem(n, 0, new QTableWidgetItem(i.key())); + ui->profileTable->setItem(n, 1, + new QTableWidgetItem(i.value().value("path"))); ui->profileTable->setItem( - n, 0, new QTableWidgetItem(i.key())); - ui->profileTable->setItem( - n, 1, new QTableWidgetItem(i.value().value("path"))); - ui->profileTable->setItem( - n, 2, new QTableWidgetItem(i.value().value("signingKey"))); + n, 2, new QTableWidgetItem(i.value().value("signingKey"))); // dbg()<< "naam:" + i.key(); if (i.key() == currentProfile) ui->profileTable->selectRow(n); diff --git a/src/mainwindow.cpp b/src/mainwindow.cpp index e273dbb1..960fc62d 100644 --- a/src/mainwindow.cpp +++ b/src/mainwindow.cpp @@ -766,7 +766,8 @@ void MainWindow::generateKeyPair(QString batch, QDialog *keygenWindow) { * select a more appropriate one to view too */ void MainWindow::updateProfileBox() { - QHash> profiles = QtPassSettings::getProfiles(); + QHash> profiles = + QtPassSettings::getProfiles(); if (profiles.isEmpty()) { ui->profileWidget->hide(); diff --git a/src/pass.cpp b/src/pass.cpp index 8509161f..3848661f 100644 --- a/src/pass.cpp +++ b/src/pass.cpp @@ -260,7 +260,7 @@ void Pass::updateEnv() { // dbg()<< "Update // PASSWORD_STORE_SIGNING_KEY with " + currentSigningKey; env.replaceInStrings(envSigningKey.first(), - "PASSWORD_STORE_SIGNING_KEY=" + currentSigningKey); + "PASSWORD_STORE_SIGNING_KEY=" + currentSigningKey); } } // put PASSWORD_STORE_DIR in env diff --git a/src/qtpasssettings.cpp b/src/qtpasssettings.cpp index 9a95c96b..e76ae886 100644 --- a/src/qtpasssettings.cpp +++ b/src/qtpasssettings.cpp @@ -89,14 +89,16 @@ QHash> QtPassSettings::getProfiles() { return profiles; } -void QtPassSettings::setProfiles(const QHash> &profiles) { +void QtPassSettings::setProfiles( + const QHash> &profiles) { getInstance()->remove(SettingsConstants::profile); getInstance()->beginGroup(SettingsConstants::profile); QHash>::const_iterator i = profiles.begin(); for (; i != profiles.end(); ++i) { getInstance()->setValue(i.key() + "/path", i.value().value("path")); - getInstance()->setValue(i.key() + "/signingKey", i.value().value("signingKey")); + getInstance()->setValue(i.key() + "/signingKey", + i.value().value("signingKey")); } getInstance()->endGroup(); diff --git a/src/qtpasssettings.h b/src/qtpasssettings.h index d96c70c9..d63f37fd 100644 --- a/src/qtpasssettings.h +++ b/src/qtpasssettings.h @@ -215,7 +215,8 @@ public: static void setTemplateAllFields(const bool &templateAllFields); static QHash> getProfiles(); - static void setProfiles(const QHash> &profiles); + static void + setProfiles(const QHash> &profiles); static Pass *getPass(); static RealPass *getRealPass(); -- cgit v1.2.3