added qr-code decoder for android
- added color change for status and navigation bar for android
This commit is contained in:
parent
b9a13d3a32
commit
0411792ca5
13 changed files with 255 additions and 58 deletions
|
|
@ -202,31 +202,6 @@ QList<QString> ExportController::getQrCodes()
|
|||
}
|
||||
|
||||
void ExportController::saveFile()
|
||||
{
|
||||
QString fileExtension = ".vpn";
|
||||
QString docDir = QStandardPaths::writableLocation(QStandardPaths::DocumentsLocation);
|
||||
QUrl fileName;
|
||||
fileName = QFileDialog::getSaveFileUrl(nullptr, tr("Save AmneziaVPN config"),
|
||||
QUrl::fromLocalFile(docDir + "/" + "amnezia_config"), "*" + fileExtension);
|
||||
if (fileName.isEmpty())
|
||||
return;
|
||||
if (!fileName.toString().endsWith(fileExtension)) {
|
||||
fileName = QUrl(fileName.toString() + fileExtension);
|
||||
}
|
||||
if (fileName.isEmpty())
|
||||
return;
|
||||
|
||||
QFile save(fileName.toLocalFile());
|
||||
|
||||
save.open(QIODevice::WriteOnly);
|
||||
save.write(m_config.toUtf8());
|
||||
save.close();
|
||||
|
||||
QFileInfo fi(fileName.toLocalFile());
|
||||
QDesktopServices::openUrl(fi.absoluteDir().absolutePath());
|
||||
}
|
||||
|
||||
void ExportController::shareFile()
|
||||
{
|
||||
#if defined Q_OS_IOS
|
||||
ext.replace("*", "");
|
||||
|
|
@ -253,6 +228,28 @@ void ExportController::shareFile()
|
|||
AndroidController::instance()->shareConfig(m_config, "amnezia_config");
|
||||
return;
|
||||
#endif
|
||||
|
||||
QString fileExtension = ".vpn";
|
||||
QString docDir = QStandardPaths::writableLocation(QStandardPaths::DocumentsLocation);
|
||||
QUrl fileName;
|
||||
fileName = QFileDialog::getSaveFileUrl(nullptr, tr("Save AmneziaVPN config"),
|
||||
QUrl::fromLocalFile(docDir + "/" + "amnezia_config"), "*" + fileExtension);
|
||||
if (fileName.isEmpty())
|
||||
return;
|
||||
if (!fileName.toString().endsWith(fileExtension)) {
|
||||
fileName = QUrl(fileName.toString() + fileExtension);
|
||||
}
|
||||
if (fileName.isEmpty())
|
||||
return;
|
||||
|
||||
QFile save(fileName.toLocalFile());
|
||||
|
||||
save.open(QIODevice::WriteOnly);
|
||||
save.write(m_config.toUtf8());
|
||||
save.close();
|
||||
|
||||
QFileInfo fi(fileName.toLocalFile());
|
||||
QDesktopServices::openUrl(fi.absoluteDir().absolutePath());
|
||||
}
|
||||
|
||||
QList<QString> ExportController::generateQrCodeImageSeries(const QByteArray &data)
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue