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/downloadlist.cpp | 9 ++++++++- 1 file changed, 8 insertions(+), 1 deletion(-) (limited to 'src/downloadlist.cpp') diff --git a/src/downloadlist.cpp b/src/downloadlist.cpp index 6957f270..99347a79 100644 --- a/src/downloadlist.cpp +++ b/src/downloadlist.cpp @@ -77,6 +77,7 @@ QVariant DownloadList::headerData(int section, Qt::Orientation orientation, int case COL_SIZE: return tr("Size"); case COL_STATUS: return tr("Status"); case COL_FILETIME: return tr("Filetime"); + case COL_SOURCEGAME: return tr("Source Game"); default: return QVariant(); } } else { @@ -118,10 +119,16 @@ QVariant DownloadList::data(const QModelIndex &index, int role) const if (m_Manager->isInfoIncomplete(index.row())) { return {}; } else { - const MOBase::ModRepositoryFileInfo *info = m_Manager->getFileInfo(index.row()); return QString("%1").arg(m_Manager->getModID(index.row())); } } + case COL_SOURCEGAME: { + if (m_Manager->isInfoIncomplete(index.row())) { + return {}; + } else { + return QString("%1").arg(m_Manager->getDisplayGameName(index.row())); + } + } case COL_SIZE: return MOBase::localizedByteSize(m_Manager->getFileSize(index.row())); case COL_FILETIME: return m_Manager->getFileTime(index.row()); case COL_STATUS: -- cgit v1.3.1