summaryrefslogtreecommitdiffstats
path: root/tests/auto/corelib/io/qfile/tst_qfile.cpp
diff options
context:
space:
mode:
authorChristian Strømme <christian.stromme@qt.io>2018-01-30 16:40:26 +0100
committerChristian Stromme <christian.stromme@qt.io>2018-02-12 00:16:17 +0000
commit72918d196c3617fb1cb9aee2c5f1a88e3bc30041 (patch)
tree0ab981f438c97ccafbe0c8c3c98f96fd5d022be4 /tests/auto/corelib/io/qfile/tst_qfile.cpp
parenta0da6df87be550eb3cd69e7c8de77ae781d8488b (diff)
Android: Don't rely on QDir::homePath() to get the application directory
If the QLoggingRegistry gets called as part of the static initialization phase, it would call into Android's QStandarPaths implementation, which assumed that the HOME env. variable was already set. Since the variable isn't set before main is called, QDir::homePath() returns the root path, which would be cached and always returned. With this fix we now call Android's getFilesDir() directly, which will always return the right path. Since the font locations are also relying on an environment variable being set, we no longer cache that either. Task-number: QTBUG-65820 Change-Id: If45f3d5f0e87b808a62118ae95c31b492885646a Reviewed-by: Tor Arne Vestbø <tor.arne.vestbo@qt.io> Reviewed-by: Eskil Abrahamsen Blomfeldt <eskil.abrahamsen-blomfeldt@qt.io> (cherry picked from commit eadf9e542fcc42597bfe02df065fc4cefa94cd56)
Diffstat (limited to 'tests/auto/corelib/io/qfile/tst_qfile.cpp')
0 files changed, 0 insertions, 0 deletions