comparison src/gui/pages/torrents.cc @ 117:2c1b6782e1d0

pages/torrents: work around conversion error on Linux
author Paper <mrpapersonic@gmail.com>
date Tue, 07 Nov 2023 16:06:17 -0500
parents 254b1d2b7096
children 39521c47c7a3
comparison
equal deleted inserted replaced
116:254b1d2b7096 117:2c1b6782e1d0
194 } 194 }
195 break; 195 break;
196 case Qt::UserRole: 196 case Qt::UserRole:
197 switch (index.column()) { 197 switch (index.column()) {
198 case TL_EPISODE: return Strings::ToInt(item.GetEpisode(), -1); 198 case TL_EPISODE: return Strings::ToInt(item.GetEpisode(), -1);
199 case TL_SIZE: return item.GetSize(); 199 /* We have to use this to work around some stupid
200 "conversion ambiguous" error on Linux */
201 case TL_SIZE: return QVariant::fromValue(item.GetSize());
200 default: return data(index, Qt::DisplayRole); 202 default: return data(index, Qt::DisplayRole);
201 } 203 }
202 break; 204 break;
203 case Qt::CheckStateRole: 205 case Qt::CheckStateRole:
204 switch (index.column()) { 206 switch (index.column()) {