diff options
author | jan Iversen <jani@apache.org> | 2018-08-03 20:25:02 +0200 |
---|---|---|
committer | Dirk Hohndel <dirk@hohndel.org> | 2018-08-09 08:45:02 -0700 |
commit | e33545afd04dc059c0df4bc47b5aacec3487c60d (patch) | |
tree | cce643642383ef23fa51abad21f9b4b9a72dbda0 /tests | |
parent | e673a3558eaff6ebc617e6e97e5c81cd819e7985 (diff) | |
download | subsurface-e33545afd04dc059c0df4bc47b5aacec3487c60d.tar.gz |
core: activate qPrefUpdateManager
remove UpdateManager from SettingsObjectWrapper and reference qPrefUpdateManager
update files using SettingsObjectWrapper/UpdateManager to use qPrefUpdateManager
this activated qPrefUpdateManager and removed the similar class from
SettingsObjectWrapper.
Signed-off-by: Jan Iversen <jani@apache.org>
Diffstat (limited to 'tests')
-rw-r--r-- | tests/testpreferences.cpp | 26 |
1 files changed, 13 insertions, 13 deletions
diff --git a/tests/testpreferences.cpp b/tests/testpreferences.cpp index aae6ffe7d..59f7d064c 100644 --- a/tests/testpreferences.cpp +++ b/tests/testpreferences.cpp @@ -263,25 +263,25 @@ void TestPreferences::testPreferences() TEST(location->timeThreshold(), 30); TEST(location->distanceThreshold(), 40); - auto update = pref->update_manager_settings; + auto update = qPrefUpdateManager::instance(); QDate date = QDate::currentDate(); - update->setDontCheckForUpdates(true); - update->setLastVersionUsed("tomaz-1"); - update->setNextCheck(date); + update->set_dont_check_for_updates(true); + update->set_last_version_used("tomaz-1"); + update->set_next_check(date); - TEST(update->dontCheckForUpdates(), true); - TEST(update->lastVersionUsed(), QStringLiteral("tomaz-1")); - TEST(update->nextCheck(), date); + TEST(update->dont_check_for_updates(), true); + TEST(update->last_version_used(), QStringLiteral("tomaz-1")); + TEST(update->next_check(), date); date = date.addDays(3); - update->setDontCheckForUpdates(false); - update->setLastVersionUsed("tomaz-2"); - update->setNextCheck(date); + update->set_dont_check_for_updates(false); + update->set_last_version_used("tomaz-2"); + update->set_next_check(date); - TEST(update->dontCheckForUpdates(), false); - TEST(update->lastVersionUsed(), QStringLiteral("tomaz-2")); - TEST(update->nextCheck(), date); + TEST(update->dont_check_for_updates(), false); + TEST(update->last_version_used(), QStringLiteral("tomaz-2")); + TEST(update->next_check(), date); } QTEST_MAIN(TestPreferences) |