diff options
author | Ivan Komissarov <abbapoh@gmail.com> | 2021-02-28 21:28:48 +0300 |
---|---|---|
committer | Ivan Komissarov <ABBAPOH@gmail.com> | 2021-03-04 14:27:20 +0000 |
commit | 0effff68a887784a9af129da6f798d4560bf5677 (patch) | |
tree | 53584eed7ec18b2a1488aeb255919dc8b89bd06d /tests | |
parent | 68c9f81a3d1c9b48b9ca82946588a171dc3515d9 (diff) | |
download | qbs-0effff68a887784a9af129da6f798d4560bf5677.tar.gz |
Use TemporaryProfile in TestBlackbox::qtBug51237
Otherwise the profile is not removed from settings after the test is
finished
Change-Id: Ib82f35f7f468733ad4d2c28ce15da59af9024697
Reviewed-by: Denis Shienkov <denis.shienkov@gmail.com>
Diffstat (limited to 'tests')
-rw-r--r-- | tests/auto/blackbox/tst_blackbox.cpp | 14 |
1 files changed, 6 insertions, 8 deletions
diff --git a/tests/auto/blackbox/tst_blackbox.cpp b/tests/auto/blackbox/tst_blackbox.cpp index 2a3c40124..1b9fa0b15 100644 --- a/tests/auto/blackbox/tst_blackbox.cpp +++ b/tests/auto/blackbox/tst_blackbox.cpp @@ -3598,16 +3598,14 @@ void TestBlackbox::propertyEvaluationContext() void TestBlackbox::qtBug51237() { - const QString profileName = "profile-qtBug51237"; - const QString propertyName = "mymodule.theProperty"; - { - const SettingsPtr s = settings(); - Profile profile(profileName, s.get()); - profile.setValue(propertyName, QStringList()); - } + const SettingsPtr s = settings(); + qbs::Internal::TemporaryProfile profile("qbs_autotests_qtBug51237", s.get()); + profile.p.setValue("mymodule.theProperty", QStringList()); + s->sync(); + QDir::setCurrent(testDataDir + "/QTBUG-51237"); QbsRunParameters params; - params.profile = profileName; + params.profile = profile.p.name(); QCOMPARE(runQbs(params), 0); } |