summaryrefslogtreecommitdiff
path: root/src/downloadmanager.cpp
diff options
context:
space:
mode:
authorLostDragonist <lost.dragonist@gmail.com>2019-02-12 03:24:44 -0600
committerSilarn <jrim@rimpo.org>2019-02-18 21:31:21 -0600
commit61842daf93a89ade712986265017c296ec0a097c (patch)
tree4367f8c7e25b684333e4e3b7880fe2fdbfe0dcf8 /src/downloadmanager.cpp
parentb43ab454935e7df48a32897ca193205df8a7ea52 (diff)
Fix up messages for already pending/started downloads
Diffstat (limited to 'src/downloadmanager.cpp')
-rw-r--r--src/downloadmanager.cpp12
1 files changed, 5 insertions, 7 deletions
diff --git a/src/downloadmanager.cpp b/src/downloadmanager.cpp
index fa10df0c..348acbe2 100644
--- a/src/downloadmanager.cpp
+++ b/src/downloadmanager.cpp
@@ -550,8 +550,8 @@ void DownloadManager::addNXMDownload(const QString &url)
for (auto tuple : m_PendingDownloads) {
if (std::get<0>(tuple).compare(nxmInfo.game(), Qt::CaseInsensitive) == 0, std::get<1>(tuple) == nxmInfo.modId() && std::get<2>(tuple) == nxmInfo.fileId()) {
- qDebug("download requested is already started (mod id: %s, file id: %s)", qUtf8Printable(QString(nxmInfo.modId())), qUtf8Printable(QString(nxmInfo.fileId())));
- QMessageBox::information(nullptr, tr("Already Started"), tr("A download for this mod file has already been queued."), QMessageBox::Ok);
+ qDebug("download requested is already queued (mod id: %d, file id: %d)", nxmInfo.modId(), nxmInfo.fileId());
+ QMessageBox::information(nullptr, tr("Already Queued"), tr("A download for this mod file has already been queued."), QMessageBox::Ok);
return;
}
}
@@ -559,11 +559,9 @@ void DownloadManager::addNXMDownload(const QString &url)
for (DownloadInfo *download : m_ActiveDownloads) {
if (download->m_FileInfo->modID == nxmInfo.modId() && download->m_FileInfo->fileID == nxmInfo.fileId()) {
if (download->m_State == STATE_DOWNLOADING || download->m_State == STATE_PAUSED || download->m_State == STATE_STARTED) {
- qDebug("download requested is already started (mod: %s, file: %s)", qUtf8Printable(QString(download->m_FileInfo->modID)),
- qUtf8Printable(download->m_FileInfo->fileName));
-
- QMessageBox::information(nullptr, tr("Already Started"), tr("There is already a download started for this file (mod: %1, file: %2).")
- .arg(download->m_FileInfo->modName).arg(download->m_FileInfo->fileName), QMessageBox::Ok);
+ qDebug("download requested is already started (mod id: %d, file name: %s, file: %s)", download->m_FileInfo->modID,
+ qUtf8Printable(download->m_FileInfo->name), qUtf8Printable(download->m_FileName));
+ QMessageBox::information(nullptr, tr("Already Started"), tr("A download for this mod file already been started."), QMessageBox::Ok);
return;
}
}