Merge pull request #8847 from Techjar/faster-file-path

Qt/GameListModel: Use absolutePath for file path column
This commit is contained in:
Tilka 2020-06-06 22:56:38 +01:00 committed by GitHub
commit 94f317010e
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
1 changed files with 1 additions and 1 deletions

View File

@ -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;