]> cloud.milkyroute.net Git - dolphin.git/commit
Fix crash in PlacesItem::setUrl()
authorElvis Angelaccio <elvis.angelaccio@kde.org>
Sun, 3 Jun 2018 11:08:51 +0000 (13:08 +0200)
committerElvis Angelaccio <elvis.angelaccio@kde.org>
Sun, 3 Jun 2018 11:08:51 +0000 (13:08 +0200)
commit588abbf1b6994245d987c0d07c2b074cb76fc034
treea38c305e908f04e3dd95f961544af667b597d902
parent45e9fc22d9364cd76caa7bc9f835957295d8ea79
Fix crash in PlacesItem::setUrl()

Connections to lambda slots without context/receiver argument can lead
to crashes, because if the receiver is deleted Qt won't delete the connection
as it normally would when the receiver is specified.

This patch moves the slot from the lambda in PlacesItem (which is not a QObject)
to PlacesItemSignalHandler. This fixes the `dolphinmainwindowtest` crash
we currently have on master, and should also fix bug #394507 which has
the very same stacktrace.

BUG: 394507
FIXED-IN: 18.04.2
src/panels/places/placesitem.cpp
src/panels/places/placesitemsignalhandler.cpp
src/panels/places/placesitemsignalhandler.h