summaryrefslogtreecommitdiff
path: root/src/yuzu/game_list.cpp
diff options
context:
space:
mode:
authorKyle K <190571+Docteh@users.noreply.github.com>2022-05-12 07:03:37 -0700
committerKyle K <190571+Docteh@users.noreply.github.com>2022-05-29 09:21:52 -0700
commit75bf2c20eb7b093a4886890aacf939b04b03c120 (patch)
treea727ca14e4c7f9f33c4c50aa505be14317ecbe1f /src/yuzu/game_list.cpp
parent0b9ef3c0b844fbda14390c94bb6ddd37e3b36c90 (diff)
Update some files with Qt 5.15.2 best practices in mind
There was some discussion about updating to Qt6 and I figured I would work on some smaller parts. For Windows platform the WinMain function has moved from the Qt5::WinMain to a new one called Qt6::EntryPointPrivate Also Qt5 supports versionless CMake targets https://www.qt.io/blog/versionless-cmake-targets-qt-5.15 These other changes in this commit are to support Qt6, but in ways that don't mess with Qt5. src/yuzu/bootmanager.cpp: Qt6 complains about not being able to know to use QPoint or QPointF, picking QPoint src/yuzu/bootmanager.h: Qt6 prefers that QStringList.h be included rather than an empty class definition src/yuzu/configuration/configure_system.cpp: toULongLong intends to return unsigned 64 bit integer, but Settings::values.rng_seed is only 32 bits wide src/yuzu/game_list.cpp: Qt6 returns a different datatype for QStringList.length than Qt5, it used to be int, but in Qt6 its now qsizetype src/yuzu/loading_screen.cpp: Qt5's for QStyleOption.init say to switch to initFrom. The QStyleOption.init doesn't exist in Qt6 src/yuzu/main.cpp: Another QPointer and QStringList.size, lets standardize on size()
Diffstat (limited to 'src/yuzu/game_list.cpp')
-rw-r--r--src/yuzu/game_list.cpp2
1 files changed, 1 insertions, 1 deletions
diff --git a/src/yuzu/game_list.cpp b/src/yuzu/game_list.cpp
index 4a6d74a7e..d13530a5b 100644
--- a/src/yuzu/game_list.cpp
+++ b/src/yuzu/game_list.cpp
@@ -483,7 +483,7 @@ void GameList::DonePopulating(const QStringList& watch_list) {
// Also artificially caps the watcher to a certain number of directories
constexpr int LIMIT_WATCH_DIRECTORIES = 5000;
constexpr int SLICE_SIZE = 25;
- int len = std::min(watch_list.length(), LIMIT_WATCH_DIRECTORIES);
+ int len = std::min(static_cast<int>(watch_list.size()), LIMIT_WATCH_DIRECTORIES);
for (int i = 0; i < len; i += SLICE_SIZE) {
watcher->addPaths(watch_list.mid(i, i + SLICE_SIZE));
QCoreApplication::processEvents();