Skip to content

Commit 99697f3

Browse files
committed
Revert torrent thread back to local var to fix crashing issue; re-release 1.1.0
1 parent ee764f8 commit 99697f3

File tree

3 files changed

+6
-16
lines changed

3 files changed

+6
-16
lines changed

Diff for: creationpage.cpp

+5-9
Original file line numberDiff line numberDiff line change
@@ -61,15 +61,11 @@ void CreationPage::triggerFinished() {
6161
emit completeChanged();
6262
}
6363

64-
void CreationPage::killThread() {
65-
this->ctThread->exit();
66-
}
67-
6864
void CreationPage::initializePage() {
69-
this->ctThread = new CreateTorrent(this);
70-
connect(this->ctThread, SIGNAL(updateProgress(int)), this, SLOT(updateProgress(int)));
71-
connect(this->ctThread, SIGNAL(logStatusMessage(QString)), this, SLOT(logAddedFile(QString)));
72-
connect(this->ctThread, SIGNAL(finished()), this, SLOT(triggerFinished()));
65+
CreateTorrent *ctThread = new CreateTorrent(this);
66+
connect(ctThread, SIGNAL(updateProgress(int)), this, SLOT(updateProgress(int)));
67+
connect(ctThread, SIGNAL(logStatusMessage(QString)), this, SLOT(logAddedFile(QString)));
68+
connect(ctThread, SIGNAL(finished()), this, SLOT(triggerFinished()));
7369

7470
using namespace libtorrent;
7571

@@ -84,5 +80,5 @@ void CreationPage::initializePage() {
8480
else
8581
pieceSize = 1024 * (2 << (pieceSizeIndex + 2));
8682

87-
this->ctThread->makeTorrentFiles(field("inputPath").toString(), field("outputPath").toString(), field("batchMode").toBool(), field("announceUrls").toString(), field("webSeeds").toString(), field("comment").toString(), QString("%1 %2").arg(PROGRAM_NAME, PROGRAM_VERSION), pieceSize, flags, field("privateTorrent").toBool());
83+
ctThread->makeTorrentFiles(field("inputPath").toString(), field("outputPath").toString(), field("batchMode").toBool(), field("announceUrls").toString(), field("webSeeds").toString(), field("comment").toString(), QString("%1 %2").arg(PROGRAM_NAME, PROGRAM_VERSION), pieceSize, flags, field("privateTorrent").toBool());
8884
}

Diff for: creationpage.h

-4
Original file line numberDiff line numberDiff line change
@@ -42,13 +42,9 @@ class CreationPage : public QWizardPage
4242
void initializePage();
4343
bool isComplete() const;
4444

45-
public slots:
46-
void killThread();
47-
4845
private:
4946
Ui::CreationPage *ui;
5047
bool torrentDone;
51-
CreateTorrent *ctThread;
5248

5349
private slots:
5450
void updateProgress(int i);

Diff for: wizard.cpp

+1-3
Original file line numberDiff line numberDiff line change
@@ -48,9 +48,7 @@ Wizard::Wizard(QWidget *parent) :
4848
this->addPage(new TrackersPage);
4949
this->addPage(new PropertiesPage);
5050
this->addPage(new SummaryPage);
51-
CreationPage *creationPage = new CreationPage;
52-
connect(this, SIGNAL(rejected()), creationPage, SLOT(killThread()));
53-
this->addPage(creationPage);
51+
this->addPage(new CreationPage);
5452
this->setOption(this->DisabledBackButtonOnLastPage, true);
5553
}
5654

0 commit comments

Comments
 (0)