summaryrefslogtreecommitdiffstats
path: root/src/gui.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'src/gui.cpp')
-rw-r--r--src/gui.cpp8
1 files changed, 8 insertions, 0 deletions
diff --git a/src/gui.cpp b/src/gui.cpp
index 67f961c..361d802 100644
--- a/src/gui.cpp
+++ b/src/gui.cpp
@@ -13,6 +13,8 @@
#include <QJsonArray>
#include <QCloseEvent>
+#include <iostream>
+
#include <signal.h>
static QString STATE_COPYING("COPYING"); // Still busy copying original file, new chunks are only accepted in already copied range
@@ -94,6 +96,7 @@ Gui::Gui(const QString &urlbase, const QString &uuid, int dnbd3pid, QWidget *par
item = new Progress(title, this);
_itemBox->addWidget(item);
_items.insert(title, item);
+ item->show();
}
item->setProgress(percent);
item->setCaption(title + QLatin1String(" ") + err);
@@ -159,6 +162,7 @@ void Gui::updateButtons()
void Gui::pushedCancel(bool)
{
if (_remoteState == STATE_ERROR) {
+ std::cerr << "[cowgui] User pressed cancel in error state" << std::endl;
_allowClose = true;
this->close();
return;
@@ -176,8 +180,10 @@ void Gui::pushedCancel(bool)
}
if (_dnbd3pid != 0 && _dnbd3pid != -1) {
// SIGQUIT tells dnbd3-fuse to stop uploading
+ std::cerr << "[cowgui] Sending QUIT to dnbd3-fuse to stop upload" << std::endl;
::kill(_dnbd3pid, SIGQUIT);
}
+ std::cerr << "[cowgui] Sending abort command to server" << std::endl;
_denyInteraction = true;
QNetworkReply *reply = _nam->post(QNetworkRequest(_urlAbort), QByteArray());
connect(reply, &QNetworkReply::finished, [reply, this]() {
@@ -201,6 +207,7 @@ void Gui::pushedCancel(bool)
void Gui::pushedOk(bool)
{
if (_remoteState == STATE_COMPLETELY_DONE || _remoteState == STATE_PROCESSING) {
+ std::cerr << "[cowgui] User pressed OK in done or processing state" << std::endl;
_allowClose = true;
this->close();
return;
@@ -212,6 +219,7 @@ void Gui::pushedOk(bool)
if (ret == QMessageBox::No)
return;
}
+ std::cerr << "[cowgui] Sending finalization request to server" << std::endl;
_denyInteraction = true;
QNetworkReply *reply = _nam->get(QNetworkRequest(_urlFinish));
connect(reply, &QNetworkReply::finished, [reply, this]() {