mirror of
https://git.suyu.dev/suyu/suyu
synced 2024-12-24 18:32:49 -06:00
qt/game_list: Resolve truncation warning within GameListItemPath's constructor
Silences a warning about truncating from size_t to u32
This commit is contained in:
parent
aaf671a309
commit
8eb97706b8
1 changed files with 5 additions and 5 deletions
|
@ -40,7 +40,6 @@ public:
|
||||||
* If this class receives valid SMDH data, it will also display game icons and titles.
|
* If this class receives valid SMDH data, it will also display game icons and titles.
|
||||||
*/
|
*/
|
||||||
class GameListItemPath : public GameListItem {
|
class GameListItemPath : public GameListItem {
|
||||||
|
|
||||||
public:
|
public:
|
||||||
static const int FullPathRole = Qt::UserRole + 1;
|
static const int FullPathRole = Qt::UserRole + 1;
|
||||||
static const int TitleRole = Qt::UserRole + 2;
|
static const int TitleRole = Qt::UserRole + 2;
|
||||||
|
@ -55,11 +54,12 @@ public:
|
||||||
setData(qulonglong(program_id), ProgramIdRole);
|
setData(qulonglong(program_id), ProgramIdRole);
|
||||||
setData(game_type, FileTypeRole);
|
setData(game_type, FileTypeRole);
|
||||||
|
|
||||||
QPixmap picture;
|
const u32 size = UISettings::values.icon_size;
|
||||||
u32 size = UISettings::values.icon_size;
|
|
||||||
if (!picture.loadFromData(picture_data.data(), picture_data.size()))
|
|
||||||
picture = GetDefaultIcon(size);
|
|
||||||
|
|
||||||
|
QPixmap picture;
|
||||||
|
if (!picture.loadFromData(picture_data.data(), static_cast<u32>(picture_data.size()))) {
|
||||||
|
picture = GetDefaultIcon(size);
|
||||||
|
}
|
||||||
picture = picture.scaled(size, size);
|
picture = picture.scaled(size, size);
|
||||||
|
|
||||||
setData(picture, Qt::DecorationRole);
|
setData(picture, Qt::DecorationRole);
|
||||||
|
|
Loading…
Reference in a new issue