From 47293827bbd92ce227e5188c10b66deb9f85d5bf Mon Sep 17 00:00:00 2001 From: Tannin Date: Sat, 28 Sep 2013 21:13:57 +0200 Subject: - download progress is now visible in task bar - esp-tooltip now lists all masters, highlighting the missing ones - python plugin will now report a problem if the path contains a semicolon - leak detection now (somewaht) works around the fact that we don't always get a stack trace - bugfix: mod meta-file is now reliably created if it was missing - bugfix: parser for nxm-links didn't handle numbers in the mod name - bugfix: small memory leak --- src/downloadmanager.cpp | 4 ++++ 1 file changed, 4 insertions(+) (limited to 'src/downloadmanager.cpp') diff --git a/src/downloadmanager.cpp b/src/downloadmanager.cpp index c8f118f6..bbb34ccc 100644 --- a/src/downloadmanager.cpp +++ b/src/downloadmanager.cpp @@ -22,6 +22,7 @@ along with Mod Organizer. If not, see . #include "nxmurl.h" #include #include +#include #include "utility.h" #include "json.h" #include "selectiondialog.h" @@ -63,6 +64,7 @@ DownloadManager::DownloadInfo *DownloadManager::DownloadInfo::createNew(const Ne info->m_CurrentUrl = 0; info->m_Tries = AUTOMATIC_RETRIES; info->m_State = STATE_STARTED; + info->m_TaskProgressId = TaskProgressManager::instance().getId(); return info; } @@ -105,6 +107,7 @@ DownloadManager::DownloadInfo *DownloadManager::DownloadInfo::createFromMeta(con info->m_CurrentUrl = 0; info->m_Urls = metaFile.value("url", "").toString().split(";"); info->m_Tries = 0; + info->m_TaskProgressId = TaskProgressManager::instance().getId(); info->m_NexusInfo.m_Name = metaFile.value("name", 0).toString(); info->m_NexusInfo.m_ModName = metaFile.value("modName", "").toString(); info->m_NexusInfo.m_Version = metaFile.value("version", 0).toString(); @@ -805,6 +808,7 @@ void DownloadManager::downloadProgress(qint64 bytesReceived, qint64 bytesTotal) } int oldProgress = info->m_Progress; info->m_Progress = ((info->m_ResumePos + bytesReceived) * 100) / (info->m_ResumePos + bytesTotal); + TaskProgressManager::instance().updateProgress(info->m_TaskProgressId, bytesReceived, bytesTotal); if (oldProgress != info->m_Progress) { emit update(index); } -- cgit v1.3.1