Fix unsafe lambda usage
Closed, ResolvedPublic

Description

Using QObject::connect(const QObject*, PointerToMemberFunction, Functor) - http://doc.qt.io/qt-5/qobject.html#connect-4
is unsafe if this might be destroyed before the sender
like in https://phabricator.kde.org/source/krusader/browse/master/krusader/FileSystem/defaultfilesystem.cpp;f6035945303426bc1fee6c58dc2916688fe0cbe6$98.

Fix it by using QObject::connect(const QObject, PointerToMemberFunction, const QObject*, Functor , Qt::ConnectionType) - http://doc.qt.io/qt-5/qobject.html#connect-5,
passing this as the context argument.

abika added a subscriber: abika.Mar 16 2017, 11:53 AM

Thanks for pointing this out! It's my code so I will fix it right away.

abika closed this task as Resolved.Mar 16 2017, 12:06 PM
abika claimed this task.

Done with 5a26343a.

That was fast - thanks!