summaryrefslogtreecommitdiff
path: root/src/downloadmanager.cpp
diff options
context:
space:
mode:
authorLostDragonist <lost.dragonist@gmail.com>2019-12-06 11:06:50 -0700
committerLostDragonist <lost.dragonist@gmail.com>2019-12-06 12:40:41 -0700
commit2c5603092af9cdce1748870176c5f4cd49a87b8d (patch)
tree8964f861addcc8b9a8693bafc88658980ca26d65 /src/downloadmanager.cpp
parent5327974825ec3860e871b414ea0eb184134e51a1 (diff)
Add source game column to the download list
Diffstat (limited to 'src/downloadmanager.cpp')
-rw-r--r--src/downloadmanager.cpp13
1 files changed, 13 insertions, 0 deletions
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())) {