From 2c5603092af9cdce1748870176c5f4cd49a87b8d Mon Sep 17 00:00:00 2001 From: LostDragonist Date: Fri, 6 Dec 2019 11:06:50 -0700 Subject: Add source game column to the download list --- src/downloadmanager.cpp | 13 +++++++++++++ 1 file changed, 13 insertions(+) (limited to 'src/downloadmanager.cpp') diff --git a/src/downloadmanager.cpp b/src/downloadmanager.cpp index 361e7164..adfbc84d 100644 --- a/src/downloadmanager.cpp +++ b/src/downloadmanager.cpp @@ -1239,6 +1239,19 @@ int DownloadManager::getModID(int index) const return m_ActiveDownloads.at(index)->m_FileInfo->modID; } +QString DownloadManager::getDisplayGameName(int index) const +{ + if ((index < 0) || (index >= m_ActiveDownloads.size())) { + throw MyException(tr("mod id: invalid download index %1").arg(index)); + } + QString gameName = m_ActiveDownloads.at(index)->m_FileInfo->gameName; + IPluginGame* gamePlugin = m_OrganizerCore->getGame(gameName); + if (gamePlugin) { + gameName = gamePlugin->gameName(); + } + return gameName; +} + QString DownloadManager::getGameName(int index) const { if ((index < 0) || (index >= m_ActiveDownloads.size())) { -- cgit v1.3.1