소스 검색

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()
Lioncash 7 년 전
부모
커밋
a1c85b8c55
1개의 변경된 파일3개의 추가작업 그리고 4개의 파일을 삭제
  1. 3 4
      src/yuzu/game_list.cpp

+ 3 - 4
src/yuzu/game_list.cpp

@@ -16,7 +16,6 @@
 #include <fmt/format.h>
 #include "common/common_paths.h"
 #include "common/common_types.h"
-#include "common/file_util.h"
 #include "common/logging/log.h"
 #include "core/file_sys/patch_manager.h"
 #include "yuzu/compatibility_list.h"
@@ -387,9 +386,9 @@ void GameList::LoadCompatibilityList() {
 }
 
 void GameList::PopulateAsync(const QString& dir_path, bool deep_scan) {
-    if (!FileUtil::Exists(dir_path.toStdString()) ||
-        !FileUtil::IsDirectory(dir_path.toStdString())) {
-        LOG_ERROR(Frontend, "Could not find game list folder at {}", dir_path.toLocal8Bit().data());
+    const QFileInfo dir_info{dir_path};
+    if (!dir_info.exists() || !dir_info.isDir()) {
+        LOG_ERROR(Frontend, "Could not find game list folder at {}", dir_path.toStdString());
         search_field->setFilterResult(0, 0);
         return;
     }