GCI2012: Fix Cancelling Video Uploads
authorO. Michael Hartman
Tue, 04 Dec 2012 03:54:42 +0100
changeset 8219 a0ef5d1cba1d
parent 8217 e3f47a1d6f2b
child 8221 5e2dc5813408
GCI2012: Fix Cancelling Video Uploads
QTfrontend/ui/page/pagevideos.cpp
--- a/QTfrontend/ui/page/pagevideos.cpp	Tue Dec 04 03:27:12 2012 +0100
+++ b/QTfrontend/ui/page/pagevideos.cpp	Tue Dec 04 03:54:42 2012 +0100
@@ -862,7 +862,7 @@
     int row = filesTable->currentRow();
     VideoItem * item = nameItem(row);
 
-    if (item->pUploading)
+    if (item->pUploading) //Act as 'cancel uploading' button
     {
         // ask user if (s)he is serious
         QMessageBox reallyStopMsg(this);
@@ -874,9 +874,10 @@
 
         if (reallyStopMsg.exec() != QMessageBox::Ok)
             return;
-        item->pUploading->deleteLater();
+        item->pUploading->abort();
+        btnToYouTube->setText(QPushButton::tr("Upload to YouTube"));
         filesTable->setCellWidget(row, vcProgress, NULL); // remove progress bar
-        numUploads--;
+        //numUploads--;
         return;
     }