diff --git a/core/base/inc/TQConnection.h b/core/base/inc/TQConnection.h index ad44fcf1ab1d267caa39475e5569a480321b05b2..58e69f0e185904ca5c6923534c7e2bdbaddd8ee1 100644 --- a/core/base/inc/TQConnection.h +++ b/core/base/inc/TQConnection.h @@ -34,7 +34,6 @@ class TQSlot; class TQConnection : public TVirtualQConnection, public TQObject { - protected: TQSlot *fSlot = 0; // slot-method calling interface void *fReceiver = 0; // ptr to object to which slot is applied @@ -46,6 +45,7 @@ protected: void *GetSlotAddress() const; CallFunc_t *LockSlot() const; void UnLockSlot(TQSlot *) const; + CallFunc_t *GetSlotCallFunc() const; TQConnection &operator=(const TQConnection &) = delete; @@ -61,13 +61,8 @@ protected: template <typename T> void SetArgImpl(T arg) { - CallFunc_t *func = LockSlot(); - - TQSlot *s = fSlot; - + CallFunc_t *func = GetSlotCallFunc(); gInterpreter->CallFunc_SetArg(func, arg); - - UnLockSlot(s); } virtual void SendSignal() override diff --git a/core/base/src/TQConnection.cxx b/core/base/src/TQConnection.cxx index 1f621b3e627a9f3679efdfb67ff26fb6a1f33d59..7dc2e382b88ed68e92895b37930eb7413e911c7a 100644 --- a/core/base/src/TQConnection.cxx +++ b/core/base/src/TQConnection.cxx @@ -59,6 +59,7 @@ public: Bool_t CheckSlot(Int_t nargs) const; Long_t GetOffset() const { return fOffset; } CallFunc_t *StartExecuting(); + CallFunc_t *GetFunc() const { return fFunc; } void EndExecuting(); const char *GetName() const { @@ -680,3 +681,7 @@ void TQConnection::UnLockSlot(TQSlot *s) const { if (s->References() <= 0) delete s; if (gInterpreterMutex) gInterpreterMutex->UnLock(); } + +CallFunc_t* TQConnection::GetSlotCallFunc() const { + return fSlot->GetFunc(); +}