ProjectExplorer: Return FilePaths for SessionManager::projectsForSessionName()

Change-Id: Ie168973e872ea105c7eb46ff7f58fb34883364b1
Reviewed-by: <github-actions-qt-creator@cristianadam.eu>
Reviewed-by: Alessandro Portale <alessandro.portale@qt.io>
This commit is contained in:
hjk
2023-01-03 17:31:38 +01:00
parent ac9023e851
commit 4b237c0e98
5 changed files with 17 additions and 20 deletions

View File

@@ -74,18 +74,14 @@ int SessionModel::rowCount(const QModelIndex &) const
return m_sortedSessions.count();
}
QStringList pathsToBaseNames(const QStringList &paths)
QStringList pathsToBaseNames(const FilePaths &paths)
{
return Utils::transform(paths, [](const QString &path) {
return QFileInfo(path).completeBaseName();
});
return Utils::transform(paths, &FilePath::completeBaseName);
}
QStringList pathsWithTildeHomePath(const QStringList &paths)
QStringList pathsWithTildeHomePath(const FilePaths &paths)
{
return Utils::transform(paths, [](const QString &path) {
return FilePath::fromString(path).withTildeHomePath();
});
return Utils::transform(paths, &FilePath::withTildeHomePath);
}
QVariant SessionModel::data(const QModelIndex &index, int role) const