]> Some of my projects - anidbudpclient.git/commitdiff
Possible fix for weird crash. Cleanup.
authorAPTX <marek321@gmail.com>
Thu, 12 Jan 2012 21:50:17 +0000 (22:50 +0100)
committerAPTX <marek321@gmail.com>
Thu, 12 Jan 2012 21:50:49 +0000 (22:50 +0100)
file.cpp

index aaec747d9c9166dc68d6bff3d6d7400dbe314b7d..d5aba837e5822752a7c66b1aa07e428a6e05d1a5 100644 (file)
--- 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);