Allow auto tests to stay away from the user's configuration.
authorDavid Faure <faure@kde.org>
Sun, 25 Mar 2012 11:10:48 +0000 (13:10 +0200)
committerQt by Nokia <qt-info@nokia.com>
Wed, 28 Mar 2012 09:22:11 +0000 (11:22 +0200)
commita5a80da2238030b5ecbc7c5fba7ecd8cb5f2da1c
tree4b27a2112ecc4415a222f96807f462bb077bdf0c
parent99e7ad660f23dce51ccd68438adae7528013d23c
Allow auto tests to stay away from the user's configuration.

QStandardPaths now knows a "test mode" which changes writable locations
to point to test directories, in order to prevent auto tests from reading from
or writing to the current user's configuration.

This affects the locations into which test programs might write files:
GenericDataLocation, DataLocation, ConfigLocation,
GenericCacheLocation, CacheLocation.
Other locations are not affected.

Change-Id: I29606c2e74714360edd871a8c387a5c1ef7d1f54
Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
Reviewed-by: Jason McDonald <jason.mcdonald@nokia.com>
src/corelib/io/qstandardpaths.cpp
src/corelib/io/qstandardpaths.h
src/corelib/io/qstandardpaths_json.cpp
src/corelib/io/qstandardpaths_mac.cpp
src/corelib/io/qstandardpaths_unix.cpp
src/corelib/io/qstandardpaths_win.cpp
tests/auto/corelib/io/qstandardpaths/tst_qstandardpaths.cpp