forked from qt-creator/qt-creator
Open Project: Don't show a error dialog for duplicated projects
Instead, switch to edit mode, show sidebar, scroll to project, and show a tooltip next to the project. The tooltip is somewhat easy to miss, but this is a clear improvement in most cases. Change-Id: Icd27f76e7d434f33e731b6fd56473ff913986a89 Task-number: QTCREATORBUG-8422 Reviewed-by: Eike Ziller <eike.ziller@theqtcompany.com>
This commit is contained in:
@@ -870,11 +870,10 @@ void SessionManagerPrivate::restoreProjects(const QStringList &fileList)
|
||||
// Keep projects that failed to load in the session!
|
||||
m_failedProjects = fileList;
|
||||
if (!fileList.isEmpty()) {
|
||||
QString errors;
|
||||
QList<Project *> projects = ProjectExplorerPlugin::openProjects(fileList, &errors);
|
||||
if (!errors.isEmpty())
|
||||
QMessageBox::critical(ICore::mainWindow(), SessionManager::tr("Failed to open project"), errors);
|
||||
foreach (Project *p, projects)
|
||||
ProjectExplorerPlugin::OpenProjectResult result = ProjectExplorerPlugin::openProjects(fileList);
|
||||
if (!result)
|
||||
ProjectExplorerPlugin::showOpenProjectError(result);
|
||||
foreach (Project *p, result.projects())
|
||||
m_failedProjects.removeAll(p->projectFilePath().toString());
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user