summaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authorGravatar ReinUsesLisp2019-10-04 23:35:06 +0000
committerGravatar ReinUsesLisp2019-10-04 23:41:22 +0000
commitf297e9ff22b245ca5050d63a727b1d1e59840709 (patch)
tree69f93c7f2bd5f8ca268593b910f2fd7862b44deb /src
parentyuzu/configure_service: Silence -Wswitch (diff)
downloadyuzu-f297e9ff22b245ca5050d63a727b1d1e59840709.tar.gz
yuzu-f297e9ff22b245ca5050d63a727b1d1e59840709.tar.xz
yuzu-f297e9ff22b245ca5050d63a727b1d1e59840709.zip
yuzu/game_list: Silence -Wswitch and -Wunused-variable
Diffstat (limited to 'src')
-rw-r--r--src/yuzu/game_list.cpp8
-rw-r--r--src/yuzu/game_list_p.h9
2 files changed, 12 insertions, 5 deletions
diff --git a/src/yuzu/game_list.cpp b/src/yuzu/game_list.cpp
index d5fab2f1f..a2b88c787 100644
--- a/src/yuzu/game_list.cpp
+++ b/src/yuzu/game_list.cpp
@@ -172,9 +172,7 @@ void GameList::onTextChanged(const QString& new_text) {
172 const int folder_count = tree_view->model()->rowCount(); 172 const int folder_count = tree_view->model()->rowCount();
173 QString edit_filter_text = new_text.toLower(); 173 QString edit_filter_text = new_text.toLower();
174 QStandardItem* folder; 174 QStandardItem* folder;
175 QStandardItem* child;
176 int children_total = 0; 175 int children_total = 0;
177 QModelIndex root_index = item_model->invisibleRootItem()->index();
178 176
179 // If the searchfield is empty every item is visible 177 // If the searchfield is empty every item is visible
180 // Otherwise the filter gets applied 178 // Otherwise the filter gets applied
@@ -272,6 +270,8 @@ void GameList::onUpdateThemedIcons() {
272 .scaled(icon_size, icon_size, Qt::IgnoreAspectRatio, Qt::SmoothTransformation), 270 .scaled(icon_size, icon_size, Qt::IgnoreAspectRatio, Qt::SmoothTransformation),
273 Qt::DecorationRole); 271 Qt::DecorationRole);
274 break; 272 break;
273 default:
274 break;
275 } 275 }
276 } 276 }
277} 277}
@@ -392,6 +392,8 @@ void GameList::ValidateEntry(const QModelIndex& item) {
392 case GameListItemType::AddDir: 392 case GameListItemType::AddDir:
393 emit AddDirectory(); 393 emit AddDirectory();
394 break; 394 break;
395 default:
396 break;
395 } 397 }
396} 398}
397 399
@@ -462,6 +464,8 @@ void GameList::PopupContextMenu(const QPoint& menu_location) {
462 case GameListItemType::SysNandDir: 464 case GameListItemType::SysNandDir:
463 AddPermDirPopup(context_menu, selected); 465 AddPermDirPopup(context_menu, selected);
464 break; 466 break;
467 default:
468 break;
465 } 469 }
466 context_menu.exec(tree_view->viewport()->mapToGlobal(menu_location)); 470 context_menu.exec(tree_view->viewport()->mapToGlobal(menu_location));
467} 471}
diff --git a/src/yuzu/game_list_p.h b/src/yuzu/game_list_p.h
index a8d888fee..1c2b37afd 100644
--- a/src/yuzu/game_list_p.h
+++ b/src/yuzu/game_list_p.h
@@ -247,7 +247,7 @@ public:
247 Qt::DecorationRole); 247 Qt::DecorationRole);
248 setData(QObject::tr("System Titles"), Qt::DisplayRole); 248 setData(QObject::tr("System Titles"), Qt::DisplayRole);
249 break; 249 break;
250 case GameListItemType::CustomDir: 250 case GameListItemType::CustomDir: {
251 const QString icon_name = QFileInfo::exists(game_dir->path) 251 const QString icon_name = QFileInfo::exists(game_dir->path)
252 ? QStringLiteral("folder") 252 ? QStringLiteral("folder")
253 : QStringLiteral("bad_folder"); 253 : QStringLiteral("bad_folder");
@@ -256,8 +256,11 @@ public:
256 Qt::DecorationRole); 256 Qt::DecorationRole);
257 setData(game_dir->path, Qt::DisplayRole); 257 setData(game_dir->path, Qt::DisplayRole);
258 break; 258 break;
259 }; 259 }
260 }; 260 default:
261 break;
262 }
263 }
261 264
262 int type() const override { 265 int type() const override {
263 return static_cast<int>(dir_type); 266 return static_cast<int>(dir_type);