Commit 33a3a778 authored by Valentin Rusu's avatar Valentin Rusu
Browse files

Fix new wallet wizard logic bug

BUG: 325140
parent 675c12d7
......@@ -544,7 +544,9 @@ int GpgPersistHandler::write(Backend* wb, KSaveFile& sf, QByteArray& version, WI
keys.push_back(wb->_gpgKey);
GpgME::EncryptionResult res = ctx->encrypt(keys, decryptedData, encryptedData, GpgME::Context::None);
if (res.error()){
KMessageBox::errorWId( w, i18n("<qt>Encryption error while attempting to save the wallet <b>%1</b>. Error code is <b>%2</b>. Please fix your system configuration, then try again!</qt>", Qt::escape(wb->_name), err.code()));
int gpgerr = res.error().code();
KMessageBox::errorWId( w, i18n("<qt>Encryption error while attempting to save the wallet <b>%1</b>. Error code is <b>%2 (%3)</b>. Please fix your system configuration, then try again!</qt>",
Qt::escape(wb->_name), gpgerr, gpgme_strerror(gpgerr)));
kDebug() << "GpgME encryption error: " << res.error().code();
sf.abort();
return -1;
......
......@@ -108,7 +108,7 @@ struct AddKeyToList {
_list->setItem(_row, 2, new QTableWidgetItem(k.shortKeyID()));
QVariant varKey;
varKey.setValue(k);
_list->item(0, 0)->setData(Qt::UserRole, varKey);
_list->item(_row, 0)->setData(Qt::UserRole, varKey);
++_row;
}
};
......@@ -134,7 +134,7 @@ void KNewWalletDialogGpg::initializePage()
emit completeChanged();
return;
}
_ctx->setKeyListMode(GPGME_KEYLIST_MODE_LOCAL);
_ctx->setKeyListMode(GpgME::Local);
std::vector< GpgME::Key > keys;
int row =0;
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment