diff options
| author | LostDragonist <lost.dragonist@gmail.com> | 2019-12-06 15:49:27 -0700 |
|---|---|---|
| committer | GitHub <noreply@github.com> | 2019-12-06 15:49:27 -0700 |
| commit | d42bca5bc0043337f8de72ea72544ebabc505f8b (patch) | |
| tree | 8964f861addcc8b9a8693bafc88658980ca26d65 /src/downloadmanager.cpp | |
| parent | 5327974825ec3860e871b414ea0eb184134e51a1 (diff) | |
| parent | 2c5603092af9cdce1748870176c5f4cd49a87b8d (diff) | |
Merge pull request #925 from LostDragonist/Develop
Add source game column to the download list
Diffstat (limited to 'src/downloadmanager.cpp')
| -rw-r--r-- | src/downloadmanager.cpp | 13 |
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())) { |
