diff options
author | Saturneric <[email protected]> | 2021-06-19 10:28:30 +0000 |
---|---|---|
committer | Saturneric <[email protected]> | 2021-06-19 10:28:30 +0000 |
commit | 7377178bc7214cf2e4e93ffa05e3ad29dda79b89 (patch) | |
tree | 8517330e926667004bc8d4854da78ff3caec7a37 /src/gpg/GpgContext.cpp | |
parent | Add dependent files under Windows. (diff) | |
download | GpgFrontend-7377178bc7214cf2e4e93ffa05e3ad29dda79b89.tar.gz GpgFrontend-7377178bc7214cf2e4e93ffa05e3ad29dda79b89.zip |
Improve project documents
Continue to write ReadME
Eliminate compile-time warnings
Fix some problems
Diffstat (limited to '')
-rw-r--r-- | src/gpg/GpgContext.cpp | 11 |
1 files changed, 5 insertions, 6 deletions
diff --git a/src/gpg/GpgContext.cpp b/src/gpg/GpgContext.cpp index d0cf30d5..962ebaf4 100644 --- a/src/gpg/GpgContext.cpp +++ b/src/gpg/GpgContext.cpp @@ -23,17 +23,16 @@ */ #include "gpg/GpgContext.h" -#include "ui/keygen/KeygenThread.h" #include <unistd.h> /* contains read/write */ #include <Mime.h> #ifdef _WIN32 - #include <windows.h> - #endif +#define INT2VOIDP(i) (void*)(uintptr_t)(i) + namespace GpgME { /** Constructor @@ -163,7 +162,7 @@ namespace GpgME { GpgImportedKey key; key.importStatus = static_cast<int>(status->status); key.fpr = status->fpr; - importInformation->importedKeys.append(key); + importInformation->importedKeys.emplace_back(key); status = status->next; } checkErr(err); @@ -294,7 +293,7 @@ namespace GpgME { qDebug() << "Append Key" << key->subkeys->keyid; - keys.append(GpgKey(key)); + keys.emplace_back(key); keys_map.insert(keys.back().id, &keys.back()); gpgme_key_unref(key); } @@ -553,7 +552,7 @@ namespace GpgME { #ifdef _WIN32 DWORD written; - HANDLE hd = (HANDLE) fd; + auto hd = INT2VOIDP(fd); #endif if (last_was_bad) { |