added a wait for the file dialog to close when sharing ios files

This commit is contained in:
vladimir.kuznetsov 2023-09-09 15:00:34 +05:00
parent 1c7868312d
commit 0a5657738e
3 changed files with 47 additions and 26 deletions

View file

@ -46,7 +46,9 @@ void SystemController::saveFile(QString fileName, const QString &data)
#ifdef Q_OS_IOS
QStringList filesToSend;
filesToSend.append(fileUrl.toString());
MobileUtils::shareText(filesToSend);
MobileUtils mobileUtils;
// todo check if save successful
mobileUtils.shareText(filesToSend);
return;
#else
QFileInfo fi(fileName);
@ -62,6 +64,9 @@ QString SystemController::getFileName(const QString &acceptLabel, const QString
MobileUtils mobileUtils;
fileName = mobileUtils.openFile();
if (fileName.isEmpty()) {
return fileName;
}
CFURLRef url = CFURLCreateWithFileSystemPath(
kCFAllocatorDefault,