diff options
author | Petr Mrázek <peterix@gmail.com> | 2015-04-26 13:47:14 +0200 |
---|---|---|
committer | Petr Mrázek <peterix@gmail.com> | 2015-04-26 18:33:29 +0200 |
commit | 84549ed8078bdbd029aa5a89facc0412b8b5e753 (patch) | |
tree | 3a5bd2727195f18c42cdb428421cab5fc6562d9d /application | |
parent | d5c79db12c326bd0175cd2990764948a536abbbb (diff) | |
download | MultiMC-84549ed8078bdbd029aa5a89facc0412b8b5e753.tar MultiMC-84549ed8078bdbd029aa5a89facc0412b8b5e753.tar.gz MultiMC-84549ed8078bdbd029aa5a89facc0412b8b5e753.tar.lz MultiMC-84549ed8078bdbd029aa5a89facc0412b8b5e753.tar.xz MultiMC-84549ed8078bdbd029aa5a89facc0412b8b5e753.zip |
GH-849 Further NetJob related fixes
Diffstat (limited to 'application')
-rw-r--r-- | application/MainWindow.cpp | 4 | ||||
-rw-r--r-- | application/dialogs/UpdateDialog.cpp | 4 | ||||
-rw-r--r-- | application/dialogs/UpdateDialog.h | 8 |
3 files changed, 8 insertions, 8 deletions
diff --git a/application/MainWindow.cpp b/application/MainWindow.cpp index 8084f361..4c9a53a6 100644 --- a/application/MainWindow.cpp +++ b/application/MainWindow.cpp @@ -584,8 +584,8 @@ MainWindow::MainWindow(QWidget *parent) : QMainWindow(parent), ui(new Ui::MainWi if (!skin_dls.isEmpty()) { auto job = new NetJob("Startup player skins download"); - connect(job, SIGNAL(succeeded()), SLOT(skinJobFinished())); - connect(job, SIGNAL(failed()), SLOT(skinJobFinished())); + connect(job, &NetJob::succeeded, this, &MainWindow::skinJobFinished); + connect(job, &NetJob::failed, this, &MainWindow::skinJobFinished); for (auto action : skin_dls) { job->addNetAction(action); diff --git a/application/dialogs/UpdateDialog.cpp b/application/dialogs/UpdateDialog.cpp index f7e0bcd6..31f2de29 100644 --- a/application/dialogs/UpdateDialog.cpp +++ b/application/dialogs/UpdateDialog.cpp @@ -165,9 +165,9 @@ void UpdateDialog::changelogLoaded() ui->changelogBrowser->setHtml(html); } -void UpdateDialog::changelogFailed() +void UpdateDialog::changelogFailed(QString reason) { - ui->changelogBrowser->setHtml(tr("<p align=\"center\" <span style=\"font-size:22pt;\">Failed to fetch changelog...</span></p>")); + ui->changelogBrowser->setHtml(tr("<p align=\"center\" <span style=\"font-size:22pt;\">Failed to fetch changelog... Error: %1</span></p>").arg(reason)); } void UpdateDialog::on_btnUpdateLater_clicked() diff --git a/application/dialogs/UpdateDialog.h b/application/dialogs/UpdateDialog.h index 2ab2ff7c..b92c7473 100644 --- a/application/dialogs/UpdateDialog.h +++ b/application/dialogs/UpdateDialog.h @@ -48,13 +48,13 @@ public slots: /// Starts loading the changelog void loadChangelog(); - + /// Slot for when the chengelog loads successfully. void changelogLoaded(); - + /// Slot for when the chengelog fails to load... - void changelogFailed(); - + void changelogFailed(QString reason); + private: ByteArrayDownloadPtr changelogDownload; NetJobPtr dljob; |