From fd6345cd4e49a135dd833e8567cb5bbe6887ebb9 Mon Sep 17 00:00:00 2001 From: Krzysztof Starecki Date: Mon, 31 Dec 2018 20:29:03 +0100 Subject: Add 'download meta information' support to download tab --- src/downloadlist.cpp | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) (limited to 'src/downloadlist.cpp') diff --git a/src/downloadlist.cpp b/src/downloadlist.cpp index fa2cc077..a0286aef 100644 --- a/src/downloadlist.cpp +++ b/src/downloadlist.cpp @@ -33,6 +33,11 @@ DownloadList::DownloadList(DownloadManager *manager, QObject *parent) connect(m_Manager, SIGNAL(aboutToUpdate()), this, SLOT(aboutToUpdate())); } +void DownloadList::setMetaDisplay(bool metaDisplay) +{ + m_MetaDisplay = metaDisplay; +} + int DownloadList::rowCount(const QModelIndex&) const { @@ -86,7 +91,7 @@ QVariant DownloadList::data(const QModelIndex &index, int role) const } } else { switch (index.column()) { - case COL_NAME: return m_Manager->getFileName(index.row()); + case COL_NAME: return m_MetaDisplay ? m_Manager->getDisplayName(index.row()) : m_Manager->getFileName(index.row()); case COL_SIZE: return sizeFormat(m_Manager->getFileSize(index.row())); case COL_STATUS: switch (m_Manager->getState(index.row())) { -- cgit v1.3.1