/*! \brief Determines if something has changed. We do that by comparing every value against what is stored in the storage. \return \arg \c true Yes, something has changed. \arg \c false No, nothing changed. */ bool Settings::changed() const { if( apiKey() != Storage::loadString( QL( "apiKey" ) ) ) return true; if( useSystemProxy() != Storage::loadBool( QL( "useSystemProxy" ) ) ) return true; if( useSystemProxy() ) return false; if( proxyHost() != Storage::loadString( QL( "proxyHost" ) ) ) return true; if( proxyPort() != Storage::loadUShort( QL( "proxyPort" ) ) ) return true; if( proxyLogin() != Storage::loadString( QL( "proxyLogin" ) ) ) return true; if( proxyPassword() != Storage::loadString( QL( "proxyPassword" ) ) ) return true; return false; }
HTTPClientSession* HTTPSSessionInstantiator::createClientSession(const Poco::URI& uri) { poco_assert (uri.getScheme() == "https"); HTTPSClientSession* pSession = _pContext.isNull() ? new HTTPSClientSession(uri.getHost(), uri.getPort()) : new HTTPSClientSession(uri.getHost(), uri.getPort(), _pContext); pSession->setProxy(proxyHost(), proxyPort()); pSession->setProxyCredentials(proxyUsername(), proxyPassword()); return pSession; }
QVariantMap CoreAccount::toVariantMap(bool forcePassword) const { QVariantMap v; v["AccountId"] = accountId().toInt(); // can't use AccountId because then comparison fails v["AccountName"] = accountName(); v["Uuid"] = uuid().toString(); v["Internal"] = isInternal(); v["User"] = user(); if (_storePassword || forcePassword) v["Password"] = password(); else v["Password"] = QString(); v["StorePassword"] = storePassword(); v["HostName"] = hostName(); v["Port"] = port(); v["UseSSL"] = useSsl(); v["ProxyType"] = proxyType(); v["ProxyUser"] = proxyUser(); v["ProxyPassword"] = proxyPassword(); v["ProxyHostName"] = proxyHostName(); v["ProxyPort"] = proxyPort(); return v; }