diff options
| author | 2018-10-24 08:38:41 -0400 | |
|---|---|---|
| committer | 2018-10-24 08:40:22 -0400 | |
| commit | a1c85b8c551bb1b6fe6ddf3f902c6916047714a0 (patch) | |
| tree | 3fcf1df61944fca47046161089b5957f8db40188 /src | |
| parent | Merge pull request #1552 from FearlessTobi/port-4336 (diff) | |
| download | yuzu-a1c85b8c551bb1b6fe6ddf3f902c6916047714a0.tar.gz yuzu-a1c85b8c551bb1b6fe6ddf3f902c6916047714a0.tar.xz yuzu-a1c85b8c551bb1b6fe6ddf3f902c6916047714a0.zip | |
game_list: Use QFileInfo instead of common's file functions
We can just use the facilities that Qt provides instead of pulling in
stuff from common. While we're at it, we can also simplify the nearby
logging statement's argument by just calling .toStdString()
Diffstat (limited to 'src')
| -rw-r--r-- | src/yuzu/game_list.cpp | 7 |
1 files changed, 3 insertions, 4 deletions
diff --git a/src/yuzu/game_list.cpp b/src/yuzu/game_list.cpp index 67890455a..3a2685e24 100644 --- a/src/yuzu/game_list.cpp +++ b/src/yuzu/game_list.cpp | |||
| @@ -16,7 +16,6 @@ | |||
| 16 | #include <fmt/format.h> | 16 | #include <fmt/format.h> |
| 17 | #include "common/common_paths.h" | 17 | #include "common/common_paths.h" |
| 18 | #include "common/common_types.h" | 18 | #include "common/common_types.h" |
| 19 | #include "common/file_util.h" | ||
| 20 | #include "common/logging/log.h" | 19 | #include "common/logging/log.h" |
| 21 | #include "core/file_sys/patch_manager.h" | 20 | #include "core/file_sys/patch_manager.h" |
| 22 | #include "yuzu/compatibility_list.h" | 21 | #include "yuzu/compatibility_list.h" |
| @@ -387,9 +386,9 @@ void GameList::LoadCompatibilityList() { | |||
| 387 | } | 386 | } |
| 388 | 387 | ||
| 389 | void GameList::PopulateAsync(const QString& dir_path, bool deep_scan) { | 388 | void GameList::PopulateAsync(const QString& dir_path, bool deep_scan) { |
| 390 | if (!FileUtil::Exists(dir_path.toStdString()) || | 389 | const QFileInfo dir_info{dir_path}; |
| 391 | !FileUtil::IsDirectory(dir_path.toStdString())) { | 390 | if (!dir_info.exists() || !dir_info.isDir()) { |
| 392 | LOG_ERROR(Frontend, "Could not find game list folder at {}", dir_path.toLocal8Bit().data()); | 391 | LOG_ERROR(Frontend, "Could not find game list folder at {}", dir_path.toStdString()); |
| 393 | search_field->setFilterResult(0, 0); | 392 | search_field->setFilterResult(0, 0); |
| 394 | return; | 393 | return; |
| 395 | } | 394 | } |