diff options
| author | Tannin <devnull@localhost> | 2014-03-18 18:29:32 +0100 |
|---|---|---|
| committer | Tannin <devnull@localhost> | 2014-03-18 18:29:32 +0100 |
| commit | 8ab1b479438dd929bc953e554629d1bddca61c9e (patch) | |
| tree | c68b07415602041d3f247ec71ad5e966877e8d83 /src | |
| parent | 129b76d7d2d90c3a791e101435987993ed8b312a (diff) | |
- bugfix: if resuming a download failed with the server sending a textual error message,
MO tried to display the whole file inside the error message
- bugfix: resuming a download didn't trigger a nexus-login when necessary
- bugfix: integrated fomod installer only used the first block of data inside a description
Diffstat (limited to 'src')
| -rw-r--r-- | src/downloadmanager.cpp | 2 | ||||
| -rw-r--r-- | src/mainwindow.cpp | 18 | ||||
| -rw-r--r-- | src/mainwindow.h | 1 |
3 files changed, 19 insertions, 2 deletions
diff --git a/src/downloadmanager.cpp b/src/downloadmanager.cpp index 31d8bcec..e747b299 100644 --- a/src/downloadmanager.cpp +++ b/src/downloadmanager.cpp @@ -1246,7 +1246,7 @@ void DownloadManager::downloadFinished() textData) { if (info->m_Tries == 0) { if (textData && (reply->error() == QNetworkReply::NoError)) { - emit showMessage(tr("Download failed. Server reported: %1").arg(readFileText(info->m_Output.fileName()))); + emit showMessage(tr("Download failed. Server reported: %1").arg(QString(data))); } else { emit showMessage(tr("Download failed: %1 (%2)").arg(reply->errorString()).arg(reply->error())); } diff --git a/src/mainwindow.cpp b/src/mainwindow.cpp index a0af63bd..d4826b30 100644 --- a/src/mainwindow.cpp +++ b/src/mainwindow.cpp @@ -3099,6 +3099,22 @@ void MainWindow::reinstallMod_clicked() } +void MainWindow::resumeDownload(int downloadIndex) +{ + if (NexusInterface::instance()->getAccessManager()->loggedIn()) { + m_DownloadManager.resumeDownload(downloadIndex); + } else { + QString username, password; + if (m_Settings.getNexusLogin(username, password)) { + m_PostLoginTasks.push_back(boost::bind(&MainWindow::resumeDownload, _1, downloadIndex)); + NexusInterface::instance()->getAccessManager()->login(username, password); + } else { + MessageDialog::showMessage(tr("You need to be logged in with Nexus to resume a download"), this); + } + } +} + + void MainWindow::endorseMod(ModInfo::Ptr mod) { if (NexusInterface::instance()->getAccessManager()->loggedIn()) { @@ -4685,7 +4701,7 @@ void MainWindow::updateDownloadListDelegate() connect(ui->downloadView->itemDelegate(), SIGNAL(restoreDownload(int)), &m_DownloadManager, SLOT(restoreDownload(int))); connect(ui->downloadView->itemDelegate(), SIGNAL(cancelDownload(int)), &m_DownloadManager, SLOT(cancelDownload(int))); connect(ui->downloadView->itemDelegate(), SIGNAL(pauseDownload(int)), &m_DownloadManager, SLOT(pauseDownload(int))); - connect(ui->downloadView->itemDelegate(), SIGNAL(resumeDownload(int)), &m_DownloadManager, SLOT(resumeDownload(int))); + connect(ui->downloadView->itemDelegate(), SIGNAL(resumeDownload(int)), this, SLOT(resumeDownload(int))); } diff --git a/src/mainwindow.h b/src/mainwindow.h index 250f2a48..46165f0f 100644 --- a/src/mainwindow.h +++ b/src/mainwindow.h @@ -483,6 +483,7 @@ private slots: void hookUpWindowTutorials(); + void resumeDownload(int downloadIndex); void endorseMod(ModInfo::Ptr mod); void cancelModListEditor(); |
