aboutsummaryrefslogtreecommitdiffstats
path: root/src/ui/dialog/import_export/ExportKeyPackageDialog.cpp
diff options
context:
space:
mode:
authorsaturneric <[email protected]>2024-01-12 15:08:38 +0000
committersaturneric <[email protected]>2024-01-12 15:08:38 +0000
commit6983b5c1dd82d159236ebd06cf17f071cc9c1ee9 (patch)
treefc53f790e33546320b2ecd306a1a9ade6fbdfe7a /src/ui/dialog/import_export/ExportKeyPackageDialog.cpp
parentfix: slove a heap-use-after-free issue (diff)
downloadGpgFrontend-6983b5c1dd82d159236ebd06cf17f071cc9c1ee9.tar.gz
GpgFrontend-6983b5c1dd82d159236ebd06cf17f071cc9c1ee9.zip
refactor: remove boost and use QString instead of std::filesystem::path
Diffstat (limited to 'src/ui/dialog/import_export/ExportKeyPackageDialog.cpp')
-rw-r--r--src/ui/dialog/import_export/ExportKeyPackageDialog.cpp8
1 files changed, 3 insertions, 5 deletions
diff --git a/src/ui/dialog/import_export/ExportKeyPackageDialog.cpp b/src/ui/dialog/import_export/ExportKeyPackageDialog.cpp
index 62631905..2883d486 100644
--- a/src/ui/dialog/import_export/ExportKeyPackageDialog.cpp
+++ b/src/ui/dialog/import_export/ExportKeyPackageDialog.cpp
@@ -67,8 +67,7 @@ GpgFrontend::UI::ExportKeyPackageDialog::ExportKeyPackageDialog(
// check path
if (file_name.isEmpty()) return;
- if (!KeyPackageOperator::GeneratePassphrase(file_name.toStdString(),
- passphrase_)) {
+ if (!KeyPackageOperator::GeneratePassphrase(file_name, passphrase_)) {
QMessageBox::critical(
this, _("Error"),
_("An error occurred while generating the passphrase file."));
@@ -111,9 +110,8 @@ GpgFrontend::UI::ExportKeyPackageDialog::ExportKeyPackageDialog(
CommonUtils::WaitForOpera(
this, _("Generating"), [this, keys](const OperaWaitingHd& op_hd) {
KeyPackageOperator::GenerateKeyPackage(
- ui_->outputPathLabel->text().toStdString(),
- ui_->nameValueLabel->text(), *keys, passphrase_,
- ui_->includeSecretKeyCheckBox->isChecked(),
+ ui_->outputPathLabel->text(), ui_->nameValueLabel->text(), *keys,
+ passphrase_, ui_->includeSecretKeyCheckBox->isChecked(),
[=](GFError err, const DataObjectPtr&) {
// stop waiting
op_hd();