mirror of
https://github.com/RetroShare/RetroShare.git
synced 2025-06-19 03:49:29 -04:00
Fix Import and Export Cert file *.asc.
This commit is contained in:
parent
edce1e953c
commit
d000d75a38
2 changed files with 4 additions and 6 deletions
|
@ -402,8 +402,8 @@ void GenCertDialog::exportIdentity()
|
||||||
{
|
{
|
||||||
QString fname = QFileDialog::getSaveFileName(this,tr("Export profile"), "",tr("RetroShare profile files (*.asc)")) ;
|
QString fname = QFileDialog::getSaveFileName(this,tr("Export profile"), "",tr("RetroShare profile files (*.asc)")) ;
|
||||||
|
|
||||||
if(fname.isNull())
|
if(fname.isNull()) return ;
|
||||||
return ;
|
if(fname.right(4).toUpper() != ".ASC") fname += ".asc";
|
||||||
|
|
||||||
QVariant data = ui.genPGPuser->itemData(ui.genPGPuser->currentIndex());
|
QVariant data = ui.genPGPuser->itemData(ui.genPGPuser->currentIndex());
|
||||||
RsPgpId gpg_id (data.toString().toStdString()) ;
|
RsPgpId gpg_id (data.toString().toStdString()) ;
|
||||||
|
@ -416,7 +416,7 @@ void GenCertDialog::exportIdentity()
|
||||||
|
|
||||||
void GenCertDialog::importIdentity()
|
void GenCertDialog::importIdentity()
|
||||||
{
|
{
|
||||||
QString fname = QFileDialog::getOpenFileName(this,tr("Import profile"), "",tr("RetroShare profile files (*.asc)")) ;
|
QString fname = QFileDialog::getOpenFileName(this,tr("Import profile"), "",tr("RetroShare profile files (*.asc);;All Files (*)")) ;
|
||||||
|
|
||||||
if(fname.isNull())
|
if(fname.isNull())
|
||||||
return ;
|
return ;
|
||||||
|
|
|
@ -135,9 +135,7 @@ void ProfileManager::exportIdentity()
|
||||||
if (fname.isNull())
|
if (fname.isNull())
|
||||||
return;
|
return;
|
||||||
|
|
||||||
if (QFileInfo(fname).suffix().isEmpty()) {
|
if (fname.right(4).toUpper() != ".ASC") fname += ".asc";
|
||||||
fname += ".asc";
|
|
||||||
}
|
|
||||||
|
|
||||||
if (RsAccounts::ExportIdentity(fname.toUtf8().constData(), gpgId))
|
if (RsAccounts::ExportIdentity(fname.toUtf8().constData(), gpgId))
|
||||||
QMessageBox::information(this, tr("Identity saved"), tr("Your identity was successfully saved\nIt is encrypted\n\nYou can now copy it to another computer\nand use the import button to load it"));
|
QMessageBox::information(this, tr("Identity saved"), tr("Your identity was successfully saved\nIt is encrypted\n\nYou can now copy it to another computer\nand use the import button to load it"));
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue