X-Git-Url: https://git.quassel-irc.org/?a=blobdiff_plain;f=src%2Fcommon%2Fidentity.cpp;h=d7bcbdcf2ef85f3a375b61395c4c1433f9d9eb3d;hb=d1b6499b0b848d4287efae89107576548533502c;hp=a45eb7579af265024c3ee7a67f8d69e91327ef85;hpb=b797e5f581b10a517c30f78cb53f813af741e261;p=quassel.git diff --git a/src/common/identity.cpp b/src/common/identity.cpp index a45eb757..d7bcbdcf 100644 --- a/src/common/identity.cpp +++ b/src/common/identity.cpp @@ -55,12 +55,11 @@ Identity::Identity(const Identity &other, QObject *parent) : SyncableObject(pare } void Identity::init() { - _initialized = false; setObjectName(QString::number(id())); } void Identity::setToDefaults() { - setIdentityName(tr("Default Identity")); + setIdentityName(tr("")); setRealName(tr("Quassel IRC User")); QStringList n; n << QString("quassel%1").arg(qrand() & 0xff); // FIXME provide more sensible default nicks @@ -81,21 +80,12 @@ void Identity::setToDefaults() { setKickReason(tr("Kindergarten is elsewhere!")); setPartReason(tr("http://quassel-irc.org - Chat comfortably. Anywhere.")); setQuitReason(tr("http://quassel-irc.org - Chat comfortably. Anywhere.")); - } bool Identity::isValid() const { return (id() > 0); } -bool Identity::initialized() const { - return _initialized; -} - -void Identity::setInitialized() { - _initialized = true; -} - IdentityId Identity::id() const { return _identityId; } @@ -296,8 +286,8 @@ bool Identity::operator==(const Identity &other) { QMetaProperty metaProp = metaObject()->property(idx); Q_ASSERT(metaProp.isValid()); QVariant v1 = this->property(metaProp.name()); - QVariant v2 = other.property(metaProp.name()); //qDebug() << v1 << v2; - // QVariant cannot compare custom types, so we need to check for this case + QVariant v2 = other.property(metaProp.name()); // qDebug() << v1 << v2; + // QVariant cannot compare custom types, so we need to check for this special case if(QString(v1.typeName()) == "IdentityId") { if(v1.value() != v2.value()) return false; } else {