diff options
author | Ahmad Samir <a.samirh78@gmail.com> | 2020-07-25 09:43:29 +0000 |
---|---|---|
committer | David Faure <faure@kde.org> | 2020-07-25 09:43:29 +0000 |
commit | 7c96cf22f148d47317a21b1c73de84708c6ffab1 (patch) | |
tree | 12eda35a326f673dfdcec555235b39222cb15609 /src/kconfig_compiler/KConfigSourceGenerator.h | |
parent | d1edad3cc4de378e0065933f3bbdce692678a381 (diff) | |
download | kconfig-7c96cf22f148d47317a21b1c73de84708c6ffab1.tar.gz kconfig-7c96cf22f148d47317a21b1c73de84708c6ffab1.tar.bz2 |
Update sGlobalFileName when QStandardPaths TestMode is toggled
When running unit tests, usually QStandardPaths TestMode is enabled so as
not to mess up the config files in the home dir of the dev running the unit
tests; sGlobalFileName, a global static, was defined only once, which meant
that if KSharedConfig::openConfig() is called before the unit test has had
a chance to call QStandardPaths::setTestModeEnabled(true), then sGlobalFileName
will go on referring to the wrong kdeglobals file (as can be seen in
dfaure's debugging of the issue at [1]). Change the code so as to
detect QStandardPaths TestMode status and change sGlobalFileName as needed.
All unit tests still pass.
[1] https://invent.kde.org/frameworks/kio/-/merge_requests/77#note_74124
Diffstat (limited to 'src/kconfig_compiler/KConfigSourceGenerator.h')
0 files changed, 0 insertions, 0 deletions