mirror of
https://github.com/clementine-player/Clementine
synced 2025-02-06 06:03:23 +01:00
Delete closures if the receiver is deleted.
This commit is contained in:
parent
160d9edfb6
commit
dd59aaada0
@ -100,6 +100,7 @@ class Closure : public ClosureBase {
|
|||||||
const int index = meta_receiver->indexOfSlot(normalised_slot.constData());
|
const int index = meta_receiver->indexOfSlot(normalised_slot.constData());
|
||||||
Q_ASSERT(index != -1);
|
Q_ASSERT(index != -1);
|
||||||
slot_ = meta_receiver->method(index);
|
slot_ = meta_receiver->method(index);
|
||||||
|
QObject::connect(receiver_, SIGNAL(destroyed()), helper_, SLOT(deleteLater()));
|
||||||
}
|
}
|
||||||
|
|
||||||
virtual void Invoke() {
|
virtual void Invoke() {
|
||||||
|
Loading…
x
Reference in New Issue
Block a user