void MainApplication::saveState()
{
  QSettings settings(MainApplication::ORGANISATION_NAME, MainApplication::APPLICATION_NAME);
  settings.setValue("Application/homePage", homePage());
  settings.setValue("Application/openInTab", openInTab());
  settings.setValue("Application/pluginDefault", pluginDefault());
  settings.setValue("Application/proxyType", proxyType());
  settings.setValue("Application/proxyHostname", proxyHostName());
  settings.setValue("Application/proxyPort", m_networkProxy->port());
}
Exemple #2
0
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;
}