Details
Description
QDir::tempPath returns the /files directory on Android which should be used for persistent, not for cache (i.e. temp) files.
Note that QStandardPaths::writableLocation returns the correct path.
Also QTemporaryFile is affected by this bug as it uses QDir::tempPath() by default. In case an app is killed by the user when a QTemporaryFile is open, this file will never be cleaned up. If the file is correctly created in the /cache directory, a user might easily remove all those leftovers by clearing all cache (f.ex. when running out of space).
This issue is also discussed on this StackOverflow thread: https://stackoverflow.com/questions/49563420/qdirtemppath-vs-qstandardpathswritablelocation