Details
-
Bug
-
Resolution: Unresolved
-
P2: Important
-
None
-
5.15.2, 6.6.0 Beta1
-
None
Description
I wrote this small snippet to reproduce the issue. Basically when a content:// uri is provided to QSettings it will not save anything to the location, however if a file is provided everything works fine. This example also works correctly on Desktop.
QFile works correctly in both cases - so it's not a permission issue.
QString download_location=QStandardPaths::writableLocation(QStandardPaths::DownloadLocation); // this returns storage/emulated/... This also requires write external storage permission but the issue can be reproduced in other locations #ifdef CONTENT_URI filename=QFileDialog::getSaveFileName(this, "save", download_location); // will return "content://com.android.providers.downloads.documents/document/206" #else filename=download_location+"/settings.ini" // will return "/storage/emulated/0/Download/settings.ini" #endif qDebug()<<filename; QSettings set(filename,QSettings::IniFormat, this); set.setValue("test",123); set.setValue("test2",456); set.sync();
Attachments
Issue Links
- mentioned in
-
Page Loading...