X-Git-Url: https://git.quassel-irc.org/?a=blobdiff_plain;ds=sidebyside;f=src%2Fcommon%2Fsyncableobject.h;h=d0d7a8b4723d044cfd5c8176a26844458dbd8647;hb=27de4d2719454c4deb5f6e24b82bdd8991e45260;hp=92746f870237165cff29683e94d6c6677e26ca50;hpb=2a00e8f57d66d9913a10c30408b89676a74010a1;p=quassel.git diff --git a/src/common/syncableobject.h b/src/common/syncableobject.h index 92746f87..d0d7a8b4 100644 --- a/src/common/syncableobject.h +++ b/src/common/syncableobject.h @@ -35,6 +35,7 @@ public: SyncableObject(QObject *parent = 0); SyncableObject(const QString &objectName, QObject *parent = 0); SyncableObject(const SyncableObject &other, QObject *parent = 0); + ~SyncableObject(); //! Stores the object's state into a QVariantMap. /** The default implementation takes dynamic properties as well as getters that have @@ -67,7 +68,7 @@ public slots: virtual void update(const QVariantMap &properties); protected: - void sync_call__(SignalProxy::ProxyMode modeType, const char *funcname, ...); + void sync_call__(SignalProxy::ProxyMode modeType, const char *funcname, ...) const; void renameObject(const QString &newName); SyncableObject &operator=(const SyncableObject &other); @@ -77,10 +78,10 @@ signals: void updatedRemotely(); void updated(const QVariantMap &properties); void updateRequested(const QVariantMap &properties); - void objectRenamed(QString newName, QString oldName); private: void synchronize(SignalProxy *proxy); + void stopSynchronize(SignalProxy *proxy); bool setInitValue(const QString &property, const QVariant &value); @@ -100,7 +101,9 @@ private: # define REQUEST(...) sync_call__(SignalProxy::Client, (__FUNCTION__ + _classNameOffset__) , __VA_ARGS__); #else # define SYNC(...) sync_call__(SignalProxy::Server, __func__, __VA_ARGS__); +# define SYNC_OTHER(x, ...) sync_call__(SignalProxy::Server, #x, __VA_ARGS__); # define REQUEST(...) sync_call__(SignalProxy::Client, __func__, __VA_ARGS__); +# define REQUEST_OTHER(x, ...) sync_call__(SignalProxy::Client, #x, __VA_ARGS__); #endif //Q_WS_WIN