@@ -61,15 +61,11 @@ void CreationPage::triggerFinished() {
6161 emit completeChanged ();
6262}
6363
64- void CreationPage::killThread () {
65- this ->ctThread ->exit ();
66- }
67-
6864void 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}
0 commit comments