diff options
author | jan Iversen <jani@apache.org> | 2018-07-27 21:55:49 +0200 |
---|---|---|
committer | Dirk Hohndel <dirk@hohndel.org> | 2018-07-30 07:43:22 -0700 |
commit | 181d2cf364f22c5e673916d884ca5f0742e137ce (patch) | |
tree | 3fbf7f47b17e193d29d703daaba2af6d1a11a6ac /tests | |
parent | f4f798f8dd43a4da884845af102e0b97dd8409dd (diff) | |
download | subsurface-181d2cf364f22c5e673916d884ca5f0742e137ce.tar.gz |
core: activate qPrefProxy
remove Proxy from SettingsObjectWrapper and reference qPrefProxy
update files using SettingsObjectWrapper/Proxy to use qPrefProxy
this activated qPrefProxy 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 | 56 |
1 files changed, 28 insertions, 28 deletions
diff --git a/tests/testpreferences.cpp b/tests/testpreferences.cpp index c9cef1e37..c82159652 100644 --- a/tests/testpreferences.cpp +++ b/tests/testpreferences.cpp @@ -177,34 +177,34 @@ void TestPreferences::testPreferences() TEST(geo->secondTaxonomyCategory(), TC_COUNTRY); TEST(geo->thirdTaxonomyCategory(), TC_NONE); - auto proxy = pref->proxy; - proxy->setType(2); - proxy->setPort(80); - proxy->setAuth(true); - proxy->setHost("localhost"); - proxy->setUser("unknown"); - proxy->setPass("secret"); - - TEST(proxy->type(), 2); - TEST(proxy->port(), 80); - TEST(proxy->auth(), true); - TEST(proxy->host(), QStringLiteral("localhost")); - TEST(proxy->user(), QStringLiteral("unknown")); - TEST(proxy->pass(), QStringLiteral("secret")); - - proxy->setType(3); - proxy->setPort(8080); - proxy->setAuth(false); - proxy->setHost("127.0.0.1"); - proxy->setUser("unknown_1"); - proxy->setPass("secret_1"); - - TEST(proxy->type(), 3); - TEST(proxy->port(), 8080); - TEST(proxy->auth(), false); - TEST(proxy->host(), QStringLiteral("127.0.0.1")); - TEST(proxy->user(), QStringLiteral("unknown_1")); - TEST(proxy->pass(), QStringLiteral("secret_1")); + auto proxy = qPrefProxy::instance(); + proxy->set_proxy_type(2); + proxy->set_proxy_port(80); + proxy->set_proxy_auth(true); + proxy->set_proxy_host("localhost"); + proxy->set_proxy_user("unknown"); + proxy->set_proxy_pass("secret"); + + TEST(proxy->proxy_type(), 2); + TEST(proxy->proxy_port(), 80); + TEST(proxy->proxy_auth(), true); + TEST(proxy->proxy_host(), QStringLiteral("localhost")); + TEST(proxy->proxy_user(), QStringLiteral("unknown")); + TEST(proxy->proxy_pass(), QStringLiteral("secret")); + + proxy->set_proxy_type(3); + proxy->set_proxy_port(8080); + proxy->set_proxy_auth(false); + proxy->set_proxy_host("127.0.0.1"); + proxy->set_proxy_user("unknown_1"); + proxy->set_proxy_pass("secret_1"); + + TEST(proxy->proxy_type(), 3); + TEST(proxy->proxy_port(), 8080); + TEST(proxy->proxy_auth(), false); + TEST(proxy->proxy_host(), QStringLiteral("127.0.0.1")); + TEST(proxy->proxy_user(), QStringLiteral("unknown_1")); + TEST(proxy->proxy_pass(), QStringLiteral("secret_1")); auto planner = pref->planner_settings; planner->setLastStop(true); |