1
0
mirror of https://github.com/clementine-player/Clementine synced 2025-01-29 02:29:56 +01:00

Delete closures if the receiver is deleted.

This commit is contained in:
John Maguire 2013-02-26 16:27:44 +01:00
parent 160d9edfb6
commit dd59aaada0

View File

@ -100,6 +100,7 @@ class Closure : public ClosureBase {
const int index = meta_receiver->indexOfSlot(normalised_slot.constData());
Q_ASSERT(index != -1);
slot_ = meta_receiver->method(index);
QObject::connect(receiver_, SIGNAL(destroyed()), helper_, SLOT(deleteLater()));
}
virtual void Invoke() {