aboutsummaryrefslogtreecommitdiffstats
path: root/src/keymgmt.cpp
diff options
context:
space:
mode:
authorSaturneric <[email protected]>2021-05-12 00:50:08 +0000
committerSaturneric <[email protected]>2021-05-12 00:50:08 +0000
commitb3ad42f01dcfaffeca4b906400df4094a978d095 (patch)
tree0a88a0168d5f9045d4144dd347fe25bd451000d2 /src/keymgmt.cpp
parentChange CXX Standard to C++14 (diff)
downloadGpgFrontend-b3ad42f01dcfaffeca4b906400df4094a978d095.tar.gz
GpgFrontend-b3ad42f01dcfaffeca4b906400df4094a978d095.zip
Srouce Files Tidy and Reform
Diffstat (limited to '')
-rwxr-xr-xsrc/keymgmt.cpp12
1 files changed, 7 insertions, 5 deletions
diff --git a/src/keymgmt.cpp b/src/keymgmt.cpp
index 70e8d30e..9d75a3fd 100755
--- a/src/keymgmt.cpp
+++ b/src/keymgmt.cpp
@@ -22,6 +22,8 @@
#include "keymgmt.h"
+#include <utility>
+
KeyMgmt::KeyMgmt(GpgME::GpgContext *ctx, QWidget *parent ) : QMainWindow(parent)
{
mCtx = ctx;
@@ -138,7 +140,7 @@ void KeyMgmt::createToolBars()
keyToolBar->setObjectName("keytoolbar");
// add button with popup menu for import
- QToolButton* toolButton = new QToolButton(this);
+ auto* toolButton = new QToolButton(this);
toolButton->setMenu(importKeyMenu);
toolButton->setPopupMode(QToolButton::InstantPopup);
toolButton->setIcon(QIcon(":key_import.png"));
@@ -157,7 +159,7 @@ void KeyMgmt::createToolBars()
void KeyMgmt::slotImportKeys(QByteArray inBuffer)
{
- GpgImportInformation result = mCtx->importKey(inBuffer);
+ GpgImportInformation result = mCtx->importKey(std::move(inBuffer));
new KeyImportDetailDialog(mCtx, result, this);
}
@@ -242,7 +244,7 @@ void KeyMgmt::slotShowKeyDetails()
void KeyMgmt::slotExportKeyToFile()
{
- QByteArray *keyArray = new QByteArray();
+ auto *keyArray = new QByteArray();
if (!mCtx->exportKeys(mKeyList->getChecked(), keyArray)) {
return;
}
@@ -262,7 +264,7 @@ void KeyMgmt::slotExportKeyToFile()
void KeyMgmt::slotExportKeyToClipboard()
{
- QByteArray *keyArray = new QByteArray();
+ auto *keyArray = new QByteArray();
QClipboard *cb = QApplication::clipboard();
if (!mCtx->exportKeys(mKeyList->getChecked(), keyArray)) {
return;
@@ -273,7 +275,7 @@ void KeyMgmt::slotExportKeyToClipboard()
void KeyMgmt::slotGenerateKeyDialog()
{
- KeyGenDialog *keyGenDialog = new KeyGenDialog(mCtx,this);
+ auto *keyGenDialog = new KeyGenDialog(mCtx,this);
keyGenDialog->show();
}