From 4b0a2d050aedb4fe2bbcacce1ee19aa4d639d895 Mon Sep 17 00:00:00 2001 From: Chocobo1 Date: Thu, 8 Jul 2021 14:21:25 +0800 Subject: [PATCH] Display tooltip for all columns in torrent content widget It is primary useful for showing long file names. --- src/gui/torrentcontentmodel.cpp | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/src/gui/torrentcontentmodel.cpp b/src/gui/torrentcontentmodel.cpp index c26f2c9bd..a37643de8 100644 --- a/src/gui/torrentcontentmodel.cpp +++ b/src/gui/torrentcontentmodel.cpp @@ -339,7 +339,7 @@ int TorrentContentModel::getFileIndex(const QModelIndex &index) return -1; } -QVariant TorrentContentModel::data(const QModelIndex &index, int role) const +QVariant TorrentContentModel::data(const QModelIndex &index, const int role) const { if (!index.isValid()) return {}; @@ -375,6 +375,7 @@ QVariant TorrentContentModel::data(const QModelIndex &index, int role) const return {}; case Qt::DisplayRole: + case Qt::ToolTipRole: return item->displayData(index.column()); case Roles::UnderlyingDataRole: