summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorTechjar <tecknojar@gmail.com>2020-06-06 05:22:55 -0400
committerTechjar <tecknojar@gmail.com>2020-06-06 05:24:23 -0400
commitfa208c4acd54ecd078121e05b6572f7cb49ede94 (patch)
tree093ae343f9548e7253ed2bdf6f608a8260f40d78
parent4fc8674a7ad7ccafe426db3532b4482907ffff6a (diff)
Qt/GameListModel: Use absolutePath for file path column
canonicalPath is orders of magnitude slower as it has to perform actual disk I/O to resolve symlinks, which makes sorting by this column ridiculously slow for large game lists, especially if the games are on a NAS. We probably don't need that, simply resolving relative paths should be sufficient.
-rw-r--r--Source/Core/DolphinQt/GameList/GameListModel.cpp2
1 files changed, 1 insertions, 1 deletions
diff --git a/Source/Core/DolphinQt/GameList/GameListModel.cpp b/Source/Core/DolphinQt/GameList/GameListModel.cpp
index 2a42da3303..922beba660 100644
--- a/Source/Core/DolphinQt/GameList/GameListModel.cpp
+++ b/Source/Core/DolphinQt/GameList/GameListModel.cpp
@@ -146,7 +146,7 @@ QVariant GameListModel::data(const QModelIndex& index, int role) const
if (role == Qt::DisplayRole || role == Qt::InitialSortOrderRole)
{
QString file_path = QDir::toNativeSeparators(
- QFileInfo(QString::fromStdString(game.GetFilePath())).canonicalPath());
+ QFileInfo(QString::fromStdString(game.GetFilePath())).absolutePath());
if (!file_path.endsWith(QDir::separator()))
file_path.append(QDir::separator());
return file_path;