Import configs for iOS [WIP]
This commit is contained in:
parent
19c42490e3
commit
230f44f4e6
5 changed files with 92 additions and 8 deletions
|
|
@ -249,7 +249,7 @@ void AndroidController::cleanupBackendLogs() {
|
|||
}
|
||||
|
||||
void AndroidController::importConfig(const QString& data){
|
||||
m_startPageLogic->selectConfigFormat(data);
|
||||
m_startPageLogic->importAnyFile(data);
|
||||
}
|
||||
|
||||
const QJsonObject &AndroidController::vpnConfig() const
|
||||
|
|
|
|||
|
|
@ -73,15 +73,13 @@
|
|||
NSLog(@"Application openURL: %@", url);
|
||||
if (url.fileURL) {
|
||||
QString filePath(url.path.UTF8String);
|
||||
qDebug() << "filePath:" << filePath;
|
||||
if (filePath.isEmpty()) return NO;
|
||||
|
||||
QFile file(filePath);
|
||||
bool isOpenFile = file.open(QIODevice::ReadOnly);
|
||||
qDebug() << "isOpenFile:" << isOpenFile;
|
||||
QByteArray data = file.readAll();
|
||||
|
||||
[QtAppDelegate sharedQtAppDelegate].startPageLogic->importConnectionFromCode(QString(data));
|
||||
[QtAppDelegate sharedQtAppDelegate].startPageLogic->importAnyFile(QString(data));
|
||||
return YES;
|
||||
}
|
||||
return NO;
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue