change gameListDir to hold an index instead of a raw pointer

This commit is contained in:
Vitor Kiguchi 2020-05-09 23:36:40 -03:00
parent 36809b2e2e
commit 950c032837
2 changed files with 21 additions and 26 deletions

View file

@ -351,7 +351,7 @@ public:
setData(type(), TypeRole);
UISettings::GameDir* game_dir = &directory;
setData(QVariant::fromValue(game_dir), GameDirRole);
setData(QVariant(UISettings::values.game_dirs.indexOf(directory)), GameDirRole);
const int icon_size = IconSizes.at(UISettings::values.game_list_icon_size);
switch (dir_type) {