Use QThread::requestInterruption() instead of m_abort flag

This commit is contained in:
Chocobo1
2017-05-15 15:53:58 +08:00
parent 60524348f0
commit 7e87eeb2d4
3 changed files with 11 additions and 23 deletions

View File

@@ -86,16 +86,8 @@ TorrentCreatorDlg::~TorrentCreatorDlg()
{
saveSettings();
// End torrent creation thread
if (m_creatorThread) {
if (m_creatorThread->isRunning()) {
m_creatorThread->abortCreation();
m_creatorThread->terminate();
// Wait for termination
m_creatorThread->wait();
}
if (m_creatorThread)
delete m_creatorThread;
}
delete m_ui;
}