GH-4299 Fix screenshot upload

This commit is contained in:
Janrupf
2021-12-29 17:08:15 +01:00
parent 6fe07561fe
commit be029ab360
2 changed files with 9 additions and 0 deletions

View File

@ -314,6 +314,8 @@ void ScreenshotsPage::on_actionUpload_triggered()
m_uploadActive = true;
ProgressDialog dialog(this);
job->setNetwork(APPLICATION->network());
if(dialog.execWithTask(job.get()) != QDialog::Accepted)
{
CustomMessageBox::selectable(this, tr("Failed to upload screenshots!"),
@ -348,7 +350,9 @@ void ScreenshotsPage::on_actionUpload_triggered()
auto albumTask = NetJob::Ptr(new NetJob("Imgur Album Creation"));
auto imgurAlbum = ImgurAlbumCreation::make(uploaded);
albumTask->addNetAction(imgurAlbum);
job->setNetwork(APPLICATION->network());
task.addTask(job);
albumTask->setNetwork(APPLICATION->network());
task.addTask(albumTask);
m_uploadActive = true;
ProgressDialog prog(this);