-#include <QDebug>
-QDataStream &operator<<(QDataStream &out, SyncableObject object) {
- out << object.toVariantMap();
- return out;
+void SyncableObject::renameObject(const QString &newName) {
+ const QString oldName = objectName();
+ if(oldName != newName) {
+ setObjectName(newName);
+ emit objectRenamed(newName, oldName);
+ }
+}
+
+void SyncableObject::update(const QVariantMap &properties) {
+ fromVariantMap(properties);
+ emit updated(properties);