Details
-
Bug
-
Resolution: Done
-
P1: Critical
-
5.11.0 RC 1
-
None
-
f86fbc45667528ac9a496d1476bd139f26b3b5bc
Description
We encountered a bug on Android 7 and 8 when using QSettings/QTemporaryFile. The QSettings cannot be written. When calling sync the settings file cannot be created.
Steps to reproduce:
- Create QSettings object
- Set value
- Call sync
Our current understanding of the problem:
In this commit https://github.com/qt/qtbase/commit/189e9c93d7ed42202ad51507c8944d64e9a7888d the function createUnnamedFile was introduced to QTemporaryFile. It uses a Linux feature to create a temporary file without a filepath. QSettings seems to use QTemporaryFile. When calling sync the call to the libc function "linkat" fails. We could temporarily fix the problem by returning "CreateUnnamedFileStatus::NotSupported" in src/corelib/io/qtemporaryfile.cpp::createUnnamedFile() .
Attachments
For Gerrit Dashboard: QTBUG-68344 | ||||||
---|---|---|---|---|---|---|
# | Subject | Branch | Project | Status | CR | V |
229895,4 | QTemporaryFile: Disable O_TMPFILE on Android | 5.11 | qt/qtbase | Status: MERGED | +2 | 0 |