/***************************************************************************
- * Copyright (C) 2005-08 by the Quassel Project *
+ * Copyright (C) 2005-09 by the Quassel Project *
* devel@quassel-irc.org *
* *
* This program is free software; you can redistribute it and/or modify *
/*** ***/
-void Identity::update(const Identity &other) {
-for(int idx = metaObject()->propertyOffset(); idx < metaObject()->propertyCount(); idx++) {
- QMetaProperty metaProp = metaObject()->property(idx);
+void Identity::copyFrom(const Identity &other) {
+ for(int idx = staticMetaObject.propertyOffset(); idx < staticMetaObject.propertyCount(); idx++) {
+ QMetaProperty metaProp = staticMetaObject.property(idx);
Q_ASSERT(metaProp.isValid());
if(this->property(metaProp.name()) != other.property(metaProp.name())) {
setProperty(metaProp.name(), other.property(metaProp.name()));
}
}
-bool Identity::operator==(const Identity &other) {
- for(int idx = metaObject()->propertyOffset(); idx < metaObject()->propertyCount(); idx++) {
- QMetaProperty metaProp = metaObject()->property(idx);
+bool Identity::operator==(const Identity &other) const {
+ for(int idx = staticMetaObject.propertyOffset(); idx < staticMetaObject.propertyCount(); idx++) {
+ QMetaProperty metaProp = staticMetaObject.property(idx);
Q_ASSERT(metaProp.isValid());
QVariant v1 = this->property(metaProp.name());
QVariant v2 = other.property(metaProp.name()); // qDebug() << v1 << v2;
return true;
}
-bool Identity::operator!=(const Identity &other) {
+bool Identity::operator!=(const Identity &other) const {
return !(*this == other);
}