Qt/GameListModel: Use native separators in File Path column
This commit is contained in:
parent
53c34d962d
commit
4a438db2c9
|
@ -145,7 +145,8 @@ QVariant GameListModel::data(const QModelIndex& index, int role) const
|
|||
case COL_FILE_PATH:
|
||||
if (role == Qt::DisplayRole || role == Qt::InitialSortOrderRole)
|
||||
{
|
||||
QString file_path = QFileInfo(QString::fromStdString(game.GetFilePath())).canonicalPath();
|
||||
QString file_path = QDir::toNativeSeparators(
|
||||
QFileInfo(QString::fromStdString(game.GetFilePath())).canonicalPath());
|
||||
if (!file_path.endsWith(QDir::separator()))
|
||||
file_path.append(QDir::separator());
|
||||
return file_path;
|
||||
|
|
Loading…
Reference in New Issue