NetPlay: Add cancel button for chunked data transfers

This commit is contained in:
Techjar 2019-03-30 06:20:24 -04:00
commit c90df946ba
5 changed files with 45 additions and 2 deletions

View file

@ -1096,7 +1096,7 @@ void NetPlayDialog::ShowChunkedProgressDialog(const std::string& title, const u6
{
QueueOnObject(this, [this, title, data_size, players] {
if (m_chunked_progress_dialog->isVisible())
m_chunked_progress_dialog->close();
m_chunked_progress_dialog->done(QDialog::Accepted);
m_chunked_progress_dialog->show(QString::fromStdString(title), data_size, players);
});
@ -1104,7 +1104,7 @@ void NetPlayDialog::ShowChunkedProgressDialog(const std::string& title, const u6
void NetPlayDialog::HideChunkedProgressDialog()
{
QueueOnObject(this, [this] { m_chunked_progress_dialog->close(); });
QueueOnObject(this, [this] { m_chunked_progress_dialog->done(QDialog::Accepted); });
}
void NetPlayDialog::SetChunkedProgress(const int pid, const u64 progress)