extended the validation of the contents of the imported file (#670)
Extended the validation of the contents of the imported file
This commit is contained in:
parent
0a90fd110d
commit
c5a5bfde69
8 changed files with 109 additions and 58 deletions
|
@ -18,9 +18,8 @@ public:
|
|||
|
||||
public slots:
|
||||
void importConfig();
|
||||
void extractConfigFromFile(const QString &fileName);
|
||||
void extractConfigFromData(QString data);
|
||||
void extractConfigFromCode(QString code);
|
||||
bool extractConfigFromFile(const QString &fileName);
|
||||
bool extractConfigFromData(QString data);
|
||||
bool extractConfigFromQr(const QByteArray &data);
|
||||
QString getConfig();
|
||||
QString getConfigFileName();
|
||||
|
@ -39,12 +38,14 @@ public slots:
|
|||
|
||||
signals:
|
||||
void importFinished();
|
||||
void importErrorOccurred(const QString &errorMessage, bool goToPageHome = false);
|
||||
void importErrorOccurred(const QString &errorMessage, bool goToPageHome);
|
||||
void importErrorOccurred(const QString &errorMessage);
|
||||
|
||||
void qrDecodingFinished();
|
||||
|
||||
void restoreAppConfig(const QByteArray &data);
|
||||
|
||||
private:
|
||||
QJsonObject extractAmneziaConfig(QString &data);
|
||||
QJsonObject extractOpenVpnConfig(const QString &data);
|
||||
QJsonObject extractWireGuardConfig(const QString &data);
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue