summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorLioncash <mathew1800@gmail.com>2018-07-18 06:15:46 +0200
committerLioncash <mathew1800@gmail.com>2018-07-18 06:15:48 +0200
commitf4b98a857b7e4e1b54670d8a86c2937b6030d9cf (patch)
tree6e59f0c3bf65549881a3ab300578c496e1d3928b
parentgame_list: Make containsAllWords a const member function (diff)
downloadyuzu-f4b98a857b7e4e1b54670d8a86c2937b6030d9cf.tar
yuzu-f4b98a857b7e4e1b54670d8a86c2937b6030d9cf.tar.gz
yuzu-f4b98a857b7e4e1b54670d8a86c2937b6030d9cf.tar.bz2
yuzu-f4b98a857b7e4e1b54670d8a86c2937b6030d9cf.tar.lz
yuzu-f4b98a857b7e4e1b54670d8a86c2937b6030d9cf.tar.xz
yuzu-f4b98a857b7e4e1b54670d8a86c2937b6030d9cf.tar.zst
yuzu-f4b98a857b7e4e1b54670d8a86c2937b6030d9cf.zip
-rw-r--r--src/yuzu/game_list.cpp4
-rw-r--r--src/yuzu/game_list.h2
2 files changed, 3 insertions, 3 deletions
diff --git a/src/yuzu/game_list.cpp b/src/yuzu/game_list.cpp
index fffa57ce1..fae5be372 100644
--- a/src/yuzu/game_list.cpp
+++ b/src/yuzu/game_list.cpp
@@ -141,7 +141,7 @@ GameList::SearchField::SearchField(GameList* parent) : QWidget{parent} {
* @param userinput String containing all words getting checked
* @return true if the haystack contains all words of userinput
*/
-bool GameList::containsAllWords(const QString& haystack, const QString& userinput) const {
+bool GameList::ContainsAllWords(const QString& haystack, const QString& userinput) const {
const QStringList userinput_split =
userinput.split(' ', QString::SplitBehavior::SkipEmptyParts);
@@ -180,7 +180,7 @@ void GameList::onTextChanged(const QString& newText) {
// The search is case insensitive because of toLower()
// I decided not to use Qt::CaseInsensitive in containsAllWords to prevent
// multiple conversions of edit_filter_text for each game in the gamelist
- if (containsAllWords(file_name.append(" ").append(file_title), edit_filter_text) ||
+ if (ContainsAllWords(file_name.append(' ').append(file_title), edit_filter_text) ||
(file_programmid.count() == 16 && edit_filter_text.contains(file_programmid))) {
tree_view->setRowHidden(i, root_index, false);
++result_count;
diff --git a/src/yuzu/game_list.h b/src/yuzu/game_list.h
index bf8486b54..14db3956d 100644
--- a/src/yuzu/game_list.h
+++ b/src/yuzu/game_list.h
@@ -89,7 +89,7 @@ private:
void PopupContextMenu(const QPoint& menu_location);
void RefreshGameDirectory();
- bool containsAllWords(const QString& haystack, const QString& userinput) const;
+ bool ContainsAllWords(const QString& haystack, const QString& userinput) const;
SearchField* search_field;
GMainWindow* main_window = nullptr;