[xwl] Avoid deletion of Transfer in signals from Transfer.
Transfer emits "finished" mid way through it's own methods. If we delete here transfer is left in the middle of methods like Transfer::timeout with a dangling "this".
This commit is contained in:
parent
335d9c4192
commit
f3d46cee15
1 changed files with 2 additions and 2 deletions
|
@ -281,7 +281,7 @@ void Selection::startTransferToWayland(xcb_atom_t target, qint32 fd)
|
|||
|
||||
connect(transfer, &TransferXtoWl::finished, this, [this, transfer]() {
|
||||
Q_EMIT transferFinished(transfer->timestamp());
|
||||
delete transfer;
|
||||
transfer->deleteLater();
|
||||
m_xToWlTransfers.removeOne(transfer);
|
||||
endTimeoutTransfersTimer();
|
||||
});
|
||||
|
@ -299,7 +299,7 @@ void Selection::startTransferToX(xcb_selection_request_event_t *event, qint32 fd
|
|||
|
||||
// TODO: serialize? see comment below.
|
||||
// const bool wasActive = (transfer == m_wlToXTransfers[0]);
|
||||
delete transfer;
|
||||
transfer->deleteLater();
|
||||
m_wlToXTransfers.removeOne(transfer);
|
||||
endTimeoutTransfersTimer();
|
||||
// if (wasActive && !m_wlToXTransfers.isEmpty()) {
|
||||
|
|
Loading…
Reference in a new issue