yuzu/game_list: Silence -Wswitch and -Wunused-variable
This commit is contained in:
parent
2b9b695fa7
commit
f297e9ff22
@ -172,9 +172,7 @@ void GameList::onTextChanged(const QString& new_text) {
|
|||||||
const int folder_count = tree_view->model()->rowCount();
|
const int folder_count = tree_view->model()->rowCount();
|
||||||
QString edit_filter_text = new_text.toLower();
|
QString edit_filter_text = new_text.toLower();
|
||||||
QStandardItem* folder;
|
QStandardItem* folder;
|
||||||
QStandardItem* child;
|
|
||||||
int children_total = 0;
|
int children_total = 0;
|
||||||
QModelIndex root_index = item_model->invisibleRootItem()->index();
|
|
||||||
|
|
||||||
// If the searchfield is empty every item is visible
|
// If the searchfield is empty every item is visible
|
||||||
// Otherwise the filter gets applied
|
// Otherwise the filter gets applied
|
||||||
@ -272,6 +270,8 @@ void GameList::onUpdateThemedIcons() {
|
|||||||
.scaled(icon_size, icon_size, Qt::IgnoreAspectRatio, Qt::SmoothTransformation),
|
.scaled(icon_size, icon_size, Qt::IgnoreAspectRatio, Qt::SmoothTransformation),
|
||||||
Qt::DecorationRole);
|
Qt::DecorationRole);
|
||||||
break;
|
break;
|
||||||
|
default:
|
||||||
|
break;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@ -392,6 +392,8 @@ void GameList::ValidateEntry(const QModelIndex& item) {
|
|||||||
case GameListItemType::AddDir:
|
case GameListItemType::AddDir:
|
||||||
emit AddDirectory();
|
emit AddDirectory();
|
||||||
break;
|
break;
|
||||||
|
default:
|
||||||
|
break;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -462,6 +464,8 @@ void GameList::PopupContextMenu(const QPoint& menu_location) {
|
|||||||
case GameListItemType::SysNandDir:
|
case GameListItemType::SysNandDir:
|
||||||
AddPermDirPopup(context_menu, selected);
|
AddPermDirPopup(context_menu, selected);
|
||||||
break;
|
break;
|
||||||
|
default:
|
||||||
|
break;
|
||||||
}
|
}
|
||||||
context_menu.exec(tree_view->viewport()->mapToGlobal(menu_location));
|
context_menu.exec(tree_view->viewport()->mapToGlobal(menu_location));
|
||||||
}
|
}
|
||||||
|
@ -247,7 +247,7 @@ public:
|
|||||||
Qt::DecorationRole);
|
Qt::DecorationRole);
|
||||||
setData(QObject::tr("System Titles"), Qt::DisplayRole);
|
setData(QObject::tr("System Titles"), Qt::DisplayRole);
|
||||||
break;
|
break;
|
||||||
case GameListItemType::CustomDir:
|
case GameListItemType::CustomDir: {
|
||||||
const QString icon_name = QFileInfo::exists(game_dir->path)
|
const QString icon_name = QFileInfo::exists(game_dir->path)
|
||||||
? QStringLiteral("folder")
|
? QStringLiteral("folder")
|
||||||
: QStringLiteral("bad_folder");
|
: QStringLiteral("bad_folder");
|
||||||
@ -256,8 +256,11 @@ public:
|
|||||||
Qt::DecorationRole);
|
Qt::DecorationRole);
|
||||||
setData(game_dir->path, Qt::DisplayRole);
|
setData(game_dir->path, Qt::DisplayRole);
|
||||||
break;
|
break;
|
||||||
};
|
}
|
||||||
};
|
default:
|
||||||
|
break;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
int type() const override {
|
int type() const override {
|
||||||
return static_cast<int>(dir_type);
|
return static_cast<int>(dir_type);
|
||||||
|
Loading…
Reference in New Issue
Block a user