forked from qt-creator/qt-creator
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:
@@ -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
|
||||
|
||||
Reference in New Issue
Block a user