aboutsummaryrefslogtreecommitdiffstats
path: root/src/ui/dialog
diff options
context:
space:
mode:
Diffstat (limited to 'src/ui/dialog')
-rw-r--r--src/ui/dialog/details/VerifyDetailsDialog.h1
-rw-r--r--src/ui/dialog/help/AboutDialog.h1
-rw-r--r--src/ui/dialog/import_export/KeyImportDetailDialog.cpp40
-rw-r--r--src/ui/dialog/key_generate/KeygenDialog.cpp4
-rw-r--r--src/ui/dialog/key_generate/SubkeyGenerateDialog.cpp2
-rw-r--r--src/ui/dialog/keypair_details/KeySetExpireDateDialog.cpp2
6 files changed, 24 insertions, 26 deletions
diff --git a/src/ui/dialog/details/VerifyDetailsDialog.h b/src/ui/dialog/details/VerifyDetailsDialog.h
index 97e2cc2d..5bc09884 100644
--- a/src/ui/dialog/details/VerifyDetailsDialog.h
+++ b/src/ui/dialog/details/VerifyDetailsDialog.h
@@ -60,7 +60,6 @@ class VerifyDetailsDialog : public QDialog {
void slot_refresh();
private:
- KeyList* key_list_; ///<
QHBoxLayout* main_layout_; ///<
QWidget* m_vbox_{}; ///<
QByteArray* input_data_{}; ///<
diff --git a/src/ui/dialog/help/AboutDialog.h b/src/ui/dialog/help/AboutDialog.h
index 09a63734..6d7ce265 100644
--- a/src/ui/dialog/help/AboutDialog.h
+++ b/src/ui/dialog/help/AboutDialog.h
@@ -80,7 +80,6 @@ class UpdateTab : public QWidget {
QLabel* upgrade_label_; ///<
QProgressBar* pb_; ///<
QString current_version_; ///<
- QPushButton* download_button_; ///<
public:
/**
diff --git a/src/ui/dialog/import_export/KeyImportDetailDialog.cpp b/src/ui/dialog/import_export/KeyImportDetailDialog.cpp
index e9b1af93..4e10146b 100644
--- a/src/ui/dialog/import_export/KeyImportDetailDialog.cpp
+++ b/src/ui/dialog/import_export/KeyImportDetailDialog.cpp
@@ -124,7 +124,6 @@ void KeyImportDetailDialog::create_general_info_box() {
new QLabel(QString(_("Private Unchanged")) + ": "), row, 0);
generalInfoBoxLayout->addWidget(
new QLabel(QString::number(m_result_.secret_unchanged)), row, 1);
- row++;
}
}
@@ -162,36 +161,35 @@ void KeyImportDetailDialog::create_keys_table() {
keys_table_->resizeColumnsToContents();
}
-QString KeyImportDetailDialog::get_status_string(int keyStatus) {
- QString statusString;
+QString KeyImportDetailDialog::get_status_string(int key_status) {
+ QString status_string;
// keystatus is greater than 15, if key is private
- if (keyStatus > 15) {
- statusString.append(_("Private"));
- keyStatus = keyStatus - 16;
+ if (key_status > 15) {
+ status_string.append(_("Private"));
+ key_status = key_status - 16;
} else {
- statusString.append(_("Public"));
+ status_string.append(_("Public"));
}
- if (keyStatus == 0) {
- statusString.append(", " + QString(_("Unchanged")));
+ if (key_status == 0) {
+ status_string.append(", " + QString(_("Unchanged")));
} else {
- if (keyStatus == 1) {
- statusString.append(", " + QString(_("New Key")));
+ if (key_status == 1) {
+ status_string.append(", " + QString(_("New Key")));
} else {
- if (keyStatus > 7) {
- statusString.append(", " + QString(_("New Subkey")));
- keyStatus = keyStatus - 8;
+ if (key_status > 7) {
+ status_string.append(", " + QString(_("New Subkey")));
+ return status_string;
}
- if (keyStatus > 3) {
- statusString.append(", " + QString(_("New Signature")));
- keyStatus = keyStatus - 4;
+ if (key_status > 3) {
+ status_string.append(", " + QString(_("New Signature")));
+ return status_string;
}
- if (keyStatus > 1) {
- statusString.append(", " + QString(_("New UID")));
- keyStatus = keyStatus - 2;
+ if (key_status > 1) {
+ status_string.append(", " + QString(_("New UID")));
+ return status_string;
}
}
}
- return statusString;
}
void KeyImportDetailDialog::create_button_box() {
diff --git a/src/ui/dialog/key_generate/KeygenDialog.cpp b/src/ui/dialog/key_generate/KeygenDialog.cpp
index f103f0b1..ea874ed2 100644
--- a/src/ui/dialog/key_generate/KeygenDialog.cpp
+++ b/src/ui/dialog/key_generate/KeygenDialog.cpp
@@ -28,6 +28,8 @@
#include "KeygenDialog.h"
+#include <qobject.h>
+
#include "core/common/CoreCommonUtil.h"
#include "core/function/GlobalSettingStation.h"
#include "core/function/gpg/GpgKeyOpera.h"
@@ -178,7 +180,7 @@ void KeyGenDialog::slot_key_gen_accept() {
SPDLOG_DEBUG("generate done");
if (gpgme_err_code(error) == GPG_ERR_NO_ERROR) {
- auto* msg_box = new QMessageBox((QWidget*)this->parent());
+ auto* msg_box = new QMessageBox(qobject_cast<QWidget*>(this->parent()));
msg_box->setAttribute(Qt::WA_DeleteOnClose);
msg_box->setStandardButtons(QMessageBox::Ok);
msg_box->setWindowTitle(_("Success"));
diff --git a/src/ui/dialog/key_generate/SubkeyGenerateDialog.cpp b/src/ui/dialog/key_generate/SubkeyGenerateDialog.cpp
index 1569fc5d..f4263962 100644
--- a/src/ui/dialog/key_generate/SubkeyGenerateDialog.cpp
+++ b/src/ui/dialog/key_generate/SubkeyGenerateDialog.cpp
@@ -327,7 +327,7 @@ void SubkeyGenerateDialog::slot_key_gen_accept() {
}
if (check_gpg_error_2_err_code(error) == GPG_ERR_NO_ERROR) {
- auto* msg_box = new QMessageBox((QWidget*)this->parent());
+ auto* msg_box = new QMessageBox(qobject_cast<QWidget*>(this->parent()));
msg_box->setAttribute(Qt::WA_DeleteOnClose);
msg_box->setStandardButtons(QMessageBox::Ok);
msg_box->setWindowTitle(_("Success"));
diff --git a/src/ui/dialog/keypair_details/KeySetExpireDateDialog.cpp b/src/ui/dialog/keypair_details/KeySetExpireDateDialog.cpp
index d09662e1..89d2ce74 100644
--- a/src/ui/dialog/keypair_details/KeySetExpireDateDialog.cpp
+++ b/src/ui/dialog/keypair_details/KeySetExpireDateDialog.cpp
@@ -79,7 +79,7 @@ void KeySetExpireDateDialog::slot_confirm() {
auto err = GpgKeyOpera::GetInstance().SetExpire(m_key_, m_subkey_, expires);
if (check_gpg_error_2_err_code(err) == GPG_ERR_NO_ERROR) {
- auto* msg_box = new QMessageBox((QWidget*)this->parent());
+ auto* msg_box = new QMessageBox(qobject_cast<QWidget*>(this->parent()));
msg_box->setAttribute(Qt::WA_DeleteOnClose);
msg_box->setStandardButtons(QMessageBox::Ok);
msg_box->setWindowTitle(_("Success"));