X-Git-Url: https://git.quassel-irc.org/?p=quassel.git;a=blobdiff_plain;f=src%2Fcommon%2Fsignalproxy.h;h=da9657fe08809debc9fd9519ab261c5835f4d7cc;hp=d9871a2301d43cda1faa3b54eef5f2ee911bced3;hb=980f7e97e879e2f0493bfcdbe38a292eebbb9068;hpb=d28b9ec38b6ea0bc473200fc2f1e65abd1b56bd6;ds=sidebyside diff --git a/src/common/signalproxy.h b/src/common/signalproxy.h index d9871a23..da9657fe 100644 --- a/src/common/signalproxy.h +++ b/src/common/signalproxy.h @@ -29,8 +29,6 @@ #include #include -#include - class SignalRelay; class SyncableObject; class QMetaObject; @@ -93,12 +91,14 @@ public: const QList &argTypes(QObject *obj, int methodId); const QByteArray &methodName(QObject *obj, int methodId); const QHash &syncMap(SyncableObject *obj); + int updatedRemotelyId(SyncableObject *obj); typedef QHash > ArgHash; typedef QHash MethodNameHash; struct ClassInfo { ArgHash argTypes; MethodNameHash methodNames; + int updatedRemotelyId; // id of the updatedRemotely() signal - makes things faster QHash syncMap; }; @@ -125,6 +125,7 @@ private: void setArgTypes(QObject *obj, int methodId); void setMethodName(QObject *obj, int methodId); void setSyncMap(SyncableObject *obj); + void setUpdatedRemotelyId(QObject *obj); bool methodsMatch(const QMetaMethod &signal, const QMetaMethod &slot) const; @@ -137,19 +138,15 @@ private: void handleInitData(QIODevice *sender, const QVariantList ¶ms); void handleSignal(const QByteArray &funcName, const QVariantList ¶ms); - bool invokeSlot(QObject *receiver, int methodId, const QVariantList ¶ms); + bool invokeSlot(QObject *receiver, int methodId, const QVariantList ¶ms = QVariantList()); QVariantMap initData(SyncableObject *obj) const; void setInitData(SyncableObject *obj, const QVariantMap &properties); - void _detachSignals(QObject *sender); - void _detachSlots(QObject *receiver); - void _stopSync(SyncableObject *obj); - - public: +public: void dumpSyncMap(SyncableObject *object); - private: - + +private: // Hash of used QIODevices QHash _peerByteCount; @@ -171,11 +168,6 @@ private: ProxyMode _proxyMode; - // the slaveMutex protects both containers: - // - _syncSlaves for sync and init calls - // - _attachedSlots - QMutex slaveMutex; - friend class SignalRelay; };