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() .