From: APTX Date: Thu, 12 Jan 2012 21:50:17 +0000 (+0100) Subject: Possible fix for weird crash. Cleanup. X-Git-Url: https://gitweb.tyo.aptx.org/?a=commitdiff_plain;h=b7c5f6e94f28aeae46d02cc17117d61348fbd040;p=anidbudpclient.git Possible fix for weird crash. Cleanup. --- diff --git a/file.cpp b/file.cpp index aaec747..d5aba83 100644 --- a/file.cpp +++ b/file.cpp @@ -473,7 +473,7 @@ qDebug() << "startRenaming"; } if (fileReply) - delete fileReply; + fileReply->deleteLater(); FileCommand fileCommand(m_ed2k, size(), @@ -505,7 +505,6 @@ void File::startAdding() #ifdef ANIDBUDPCLIENT_FILE_DEBUG qDebug() << "startAdding"; #endif -qDebug() << addingState(); if (!canContinue(m_addingState)) { work(); @@ -553,7 +552,8 @@ qDebug() << "startMarking"; markCommand = MyListAddCommand(m_ed2k, size(), true); markCommand.setViewed(true); - if (markReply) markReply->deleteLater(); + if (markReply) + markReply->deleteLater(); markReply = clientInstance()->send(markCommand); connect(markReply, SIGNAL(replyReady(bool)), this, SLOT(finishMarking(bool))); updateStatus(MarkingWatched, InProgress); @@ -588,7 +588,7 @@ qDebug() << "startsetState"; setStateCommand.setMyListState(m_state); if (setStateReply) - delete setStateReply; + setStateReply->deleteLater(); setStateReply = clientInstance()->send(setStateCommand); connect(setStateReply, SIGNAL(replyReady(bool)), this, SLOT(finishSetState(bool))); updateStatus(SettingState, InProgress);