QssParser: Interpret "oblique" as italic
[quassel.git] / src / client / coreaccount.cpp
index 50524c4..ad0dedc 100644 (file)
@@ -1,5 +1,5 @@
 /***************************************************************************
- *   Copyright (C) 2009 by the Quassel Project                             *
+ *   Copyright (C) 2005-2018 by the Quassel Project                        *
  *   devel@quassel-irc.org                                                 *
  *                                                                         *
  *   This program is free software; you can redistribute it and/or modify  *
@@ -15,7 +15,7 @@
  *   You should have received a copy of the GNU General Public License     *
  *   along with this program; if not, write to the                         *
  *   Free Software Foundation, Inc.,                                       *
- *   59 Temple Place - Suite 330, Boston, MA  02111-1307, USA.             *
+ *   51 Franklin Street, Fifth Floor, Boston, MA  02110-1301, USA.         *
  ***************************************************************************/
 
 #include "coreaccount.h"
@@ -27,8 +27,7 @@ CoreAccount::CoreAccount(AccountId accountId)
     _port = 4242;
     _storePassword = false;
     _useSsl = true;
-    _useProxy = false;
-    _proxyType = QNetworkProxy::Socks5Proxy;
+    _proxyType = QNetworkProxy::DefaultProxy;
     _proxyPort = 8080;
 }
 
@@ -93,12 +92,6 @@ void CoreAccount::setUseSsl(bool useSsl)
 }
 
 
-void CoreAccount::setUseProxy(bool useProxy)
-{
-    _useProxy = useProxy;
-}
-
-
 void CoreAccount::setProxyType(QNetworkProxy::ProxyType type)
 {
     _proxyType = type;
@@ -145,7 +138,6 @@ QVariantMap CoreAccount::toVariantMap(bool forcePassword) const
     v["HostName"] = hostName();
     v["Port"] = port();
     v["UseSSL"] = useSsl();
-    v["UseProxy"] = useProxy();
     v["ProxyType"] = proxyType();
     v["ProxyUser"] = proxyUser();
     v["ProxyPassword"] = proxyPassword();
@@ -167,7 +159,6 @@ void CoreAccount::fromVariantMap(const QVariantMap &v)
     setHostName(v.value("HostName").toString());
     setPort(v.value("Port").toUInt());
     setUseSsl(v.value("UseSSL").toBool());
-    setUseProxy(v.value("UseProxy").toBool());
     setProxyType((QNetworkProxy::ProxyType)v.value("ProxyType").toInt());
     setProxyUser(v.value("ProxyUser").toString());
     setProxyPassword(v.value("ProxyPassword").toString());
@@ -178,7 +169,34 @@ void CoreAccount::fromVariantMap(const QVariantMap &v)
 }
 
 
-bool CoreAccount::operator==(const CoreAccount &o) const
+bool CoreAccount::operator==(const CoreAccount &other) const
+{
+    return toVariantMap(true) == other.toVariantMap(true);
+}
+
+
+bool CoreAccount::operator!=(const CoreAccount &other) const
+{
+    return !(*this == other);
+}
+
+
+QDebug operator<<(QDebug dbg, const CoreAccount &acc)
 {
-    return toVariantMap(true) == o.toVariantMap(true);
+    dbg.nospace() << qPrintable(QString("CoreAccount(AccountId:")) << acc.accountId()
+    << qPrintable(QString(", AccountName:")) << acc.accountName()
+    << qPrintable(QString(", Uuid:")) << acc.uuid()
+    << qPrintable(QString(", Internal:")) << acc.isInternal()
+    << qPrintable(QString(", User:")) << acc.user()
+    << qPrintable(QString(", Password:")) << acc.password()
+    << qPrintable(QString(", StorePassword:")) << acc.storePassword()
+    << qPrintable(QString(", HostName:")) << acc.hostName()
+    << qPrintable(QString(", Port:")) << acc.port()
+    << qPrintable(QString(", UseSSL:")) << acc.useSsl()
+    << qPrintable(QString(", ProxyType:")) << acc.proxyType()
+    << qPrintable(QString(", ProxyUser:")) << acc.proxyUser()
+    << qPrintable(QString(", ProxyPassword:")) << acc.proxyPassword()
+    << qPrintable(QString(", ProxyHostName:")) << acc.proxyHostName()
+    << qPrintable(QString(", ProxyPort:")) << acc.proxyPort();
+    return dbg.space();
 }