|
|
|
@ -348,10 +348,13 @@ void ProfileForm::onExportClicked()
@@ -348,10 +348,13 @@ void ProfileForm::onExportClicked()
|
|
|
|
|
{ |
|
|
|
|
const QString current = profileInfo->getProfileName() + Core::TOX_EXT; |
|
|
|
|
//:save dialog title
|
|
|
|
|
const QString path = QFileDialog::getSaveFileName(Q_NULLPTR, tr("Export profile"), |
|
|
|
|
QDir::home().filePath(current), |
|
|
|
|
const QString path = QFileDialog::getSaveFileName(Q_NULLPTR, tr("Export profile"), current, |
|
|
|
|
//: save dialog filter
|
|
|
|
|
tr("Tox save file (*.tox)"), nullptr); |
|
|
|
|
tr("Tox save file (*.tox)")); |
|
|
|
|
if (path.isEmpty()) { |
|
|
|
|
return; |
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
const IProfileInfo::SaveResult result = profileInfo->exportProfile(path); |
|
|
|
|
if (result == IProfileInfo::SaveResult::OK) { |
|
|
|
|
return; |
|
|
|
@ -413,8 +416,11 @@ void ProfileForm::onSaveQrClicked()
@@ -413,8 +416,11 @@ void ProfileForm::onSaveQrClicked()
|
|
|
|
|
{ |
|
|
|
|
const QString current = profileInfo->getProfileName() + ".png"; |
|
|
|
|
const QString path = QFileDialog::getSaveFileName( |
|
|
|
|
Q_NULLPTR, tr("Save", "save qr image"), QDir::home().filePath(current), |
|
|
|
|
tr("Save QrCode (*.png)", "save dialog filter"), nullptr); |
|
|
|
|
Q_NULLPTR, tr("Save", "save qr image"), current, |
|
|
|
|
tr("Save QrCode (*.png)", "save dialog filter")); |
|
|
|
|
if (path.isEmpty()) { |
|
|
|
|
return; |
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
const IProfileInfo::SaveResult result = profileInfo->saveQr(*qr->getImage(), path); |
|
|
|
|
if (result == IProfileInfo::SaveResult::OK) { |
|
|
|
|