mirror of
https://github.com/RetroShare/RetroShare.git
synced 2024-12-28 17:09:34 -05:00
Merge pull request #451 from PhenomRetroShare/Fix_ImportExportCertASC
Fix Import and Export Cert file *.asc.
This commit is contained in:
commit
c643d1e672
@ -402,8 +402,8 @@ void GenCertDialog::exportIdentity()
|
||||
{
|
||||
QString fname = QFileDialog::getSaveFileName(this,tr("Export profile"), "",tr("RetroShare profile files (*.asc)")) ;
|
||||
|
||||
if(fname.isNull())
|
||||
return ;
|
||||
if(fname.isNull()) return ;
|
||||
if(fname.right(4).toUpper() != ".ASC") fname += ".asc";
|
||||
|
||||
QVariant data = ui.genPGPuser->itemData(ui.genPGPuser->currentIndex());
|
||||
RsPgpId gpg_id (data.toString().toStdString()) ;
|
||||
@ -416,7 +416,7 @@ void GenCertDialog::exportIdentity()
|
||||
|
||||
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())
|
||||
return ;
|
||||
|
@ -135,9 +135,7 @@ void ProfileManager::exportIdentity()
|
||||
if (fname.isNull())
|
||||
return;
|
||||
|
||||
if (QFileInfo(fname).suffix().isEmpty()) {
|
||||
fname += ".asc";
|
||||
}
|
||||
if (fname.right(4).toUpper() != ".ASC") fname += ".asc";
|
||||
|
||||
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"));
|
||||
|
Loading…
Reference in New Issue
Block a user