From 61842daf93a89ade712986265017c296ec0a097c Mon Sep 17 00:00:00 2001 From: LostDragonist Date: Tue, 12 Feb 2019 03:24:44 -0600 Subject: Fix up messages for already pending/started downloads --- src/downloadmanager.cpp | 12 +++++------- 1 file changed, 5 insertions(+), 7 deletions(-) (limited to 'src/downloadmanager.cpp') 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; } } -- cgit v1.3.1