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

@@ -1179,17 +1179,18 @@ void SessionManagerPrivate::sessionLoadingProgress()
QCoreApplication::processEvents(QEventLoop::ExcludeUserInputEvents);
}
QStringList SessionManager::projectsForSessionName(const QString &session)
FilePaths SessionManager::projectsForSessionName(const QString &session)
{
const FilePath fileName = sessionNameToFileName(session);
PersistentSettingsReader reader;
if (fileName.exists()) {
if (!reader.load(fileName)) {
qWarning() << "Could not restore session" << fileName.toUserOutput();
return QStringList();
return {};
}
}
return reader.restoreValue(QLatin1String("ProjectList")).toStringList();
return transform(reader.restoreValue(QLatin1String("ProjectList")).toStringList(),
&FilePath::fromUserInput);
}
#ifdef WITH_TESTS