aboutsummaryrefslogtreecommitdiffstats
path: root/src/core/function/KeyPackageOperator.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'src/core/function/KeyPackageOperator.cpp')
-rw-r--r--src/core/function/KeyPackageOperator.cpp10
1 files changed, 5 insertions, 5 deletions
diff --git a/src/core/function/KeyPackageOperator.cpp b/src/core/function/KeyPackageOperator.cpp
index ccba642c..c5c573ce 100644
--- a/src/core/function/KeyPackageOperator.cpp
+++ b/src/core/function/KeyPackageOperator.cpp
@@ -45,7 +45,7 @@ namespace GpgFrontend {
auto KeyPackageOperator::GeneratePassphrase(const QString& phrase_path,
QString& phrase) -> bool {
phrase = PassphraseGenerator::GetInstance().Generate(256);
- qCDebug(core, "generated passphrase: %lld bytes", phrase.size());
+ FLOG_D("generated passphrase: %lld bytes", phrase.size());
return WriteFile(phrase_path, phrase.toUtf8());
}
@@ -57,8 +57,8 @@ void KeyPackageOperator::GenerateKeyPackage(const QString& key_package_path,
GpgKeyImportExporter::GetInstance().ExportAllKeys(
keys, secret, true, [=](GpgError err, const DataObjectPtr& data_obj) {
if (CheckGpgError(err) != GPG_ERR_NO_ERROR) {
- qCWarning(core) << "export keys error, reason: "
- << DescribeGpgErrCode(err).second;
+ LOG_W() << "export keys error, reason: "
+ << DescribeGpgErrCode(err).second;
cb(-1, data_obj);
return;
}
@@ -93,14 +93,14 @@ void KeyPackageOperator::ImportKeyPackage(const QString& key_package_path,
ReadFile(key_package_path, encrypted_data);
if (encrypted_data.isEmpty()) {
- qCWarning(core) << "failed to read key package: " << key_package_path;
+ LOG_W() << "failed to read key package: " << key_package_path;
return -1;
};
QByteArray passphrase;
ReadFile(phrase_path, passphrase);
if (passphrase.size() != 256) {
- qCWarning(core) << "passphrase size mismatch: " << phrase_path;
+ LOG_W() << "passphrase size mismatch: " << phrase_path;
return -1;
}