forked from qt-creator/qt-creator
WelcomePage: Add tooltip for sessions
The tooltip allows renaming, cloning and deleting and shows included projects. The following method was added to Session: QStringList projectsForSessionName(const QString &session) const; I moved the SessionNameInputDialog into the header to reuse it. I added new roles to SessionModel (ProjectsPathRole, ProjectsDisplayRole). The following slots were added to SessionModel to expose the backend functionality: void cloneSession(const QString &session); void deleteSession(const QString &session); void renameSession(const QString &session); Change-Id: I0182a26dc63b4f051ea948756decd5413c832c60 Reviewed-by: hjk <qthjk@ovi.com>
This commit is contained in:
@@ -914,3 +914,16 @@ void SessionManager::sessionLoadingProgress()
|
||||
m_future.setProgressValue(m_future.progressValue() + 1);
|
||||
QCoreApplication::processEvents(QEventLoop::ExcludeUserInputEvents);
|
||||
}
|
||||
|
||||
QStringList ProjectExplorer::SessionManager::projectsForSessionName(const QString &session) const
|
||||
{
|
||||
const QString fileName = sessionNameToFileName(session);
|
||||
PersistentSettingsReader reader;
|
||||
if (QFileInfo(fileName).exists()) {
|
||||
if (!reader.load(fileName)) {
|
||||
qWarning() << "Could not restore session" << fileName;
|
||||
return QStringList();
|
||||
}
|
||||
}
|
||||
return reader.restoreValue(QLatin1String("ProjectList")).toStringList();
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user