/***************************************************************************
- * Copyright (C) 2005-08 by the Quassel IRC Team *
+ * Copyright (C) 2005-09 by the Quassel Project *
* devel@quassel-irc.org *
* *
* This program is free software; you can redistribute it and/or modify *
{
}
+SyncableObject::SyncableObject(const QString &objectName, QObject *parent)
+ : QObject(parent),
+ _initialized(false),
+ _allowClientUpdates(false)
+{
+ setObjectName(objectName);
+}
+
SyncableObject::SyncableObject(const SyncableObject &other, QObject *parent)
: QObject(parent),
_initialized(other._initialized),
- _allowClientUpdates(false)
+ _allowClientUpdates(other._allowClientUpdates)
{
}
+SyncableObject &SyncableObject::operator=(const SyncableObject &other) {
+ if(this == &other)
+ return *this;
+
+ _initialized = other._initialized;
+ _allowClientUpdates = other._allowClientUpdates;
+ return *this;
+}
+
bool SyncableObject::isInitialized() const {
return _initialized;
}
// ...as well as methods, which have names starting with "init"
for(int i = 0; i < meta->methodCount(); i++) {
QMetaMethod method = meta->method(i);
- QString methodname(::methodName(method));
+ QString methodname(SignalProxy::ExtendedMetaObject::methodName(method));
if(!methodname.startsWith("init") || methodname.startsWith("initSet") || methodname.startsWith("initDone"))
continue;
QGenericReturnArgument genericvalue = QGenericReturnArgument(method.typeName(), &value);
QMetaObject::invokeMethod(this, methodname.toAscii(), genericvalue);
- properties[SignalProxy::methodBaseName(method)] = value;
- // qDebug() << ">>> SYNC:" << methodBaseName(method) << value;
+ properties[SignalProxy::ExtendedMetaObject::methodBaseName(method)] = value;
}
// properties["Payload"] = QByteArray(10000000, 'a'); // for testing purposes
return properties;
iterator++;
continue;
}
-
+
int propertyIndex = meta->indexOfProperty(propName.toAscii());
if(propertyIndex == -1 || !meta->property(propertyIndex).isWritable())