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:
		@@ -286,13 +286,13 @@ ProjectOpenerAndCloser::~ProjectOpenerAndCloser()
 | 
			
		||||
 | 
			
		||||
ProjectInfo ProjectOpenerAndCloser::open(const QString &projectFile, bool configureAsExampleProject)
 | 
			
		||||
{
 | 
			
		||||
    QString error;
 | 
			
		||||
    Project *project = ProjectExplorerPlugin::openProject(projectFile, &error);
 | 
			
		||||
    if (!error.isEmpty())
 | 
			
		||||
        qWarning() << error;
 | 
			
		||||
    if (!project)
 | 
			
		||||
    ProjectExplorerPlugin::OpenProjectResult result = ProjectExplorerPlugin::openProject(projectFile);
 | 
			
		||||
    if (!result) {
 | 
			
		||||
        qWarning() << result.errorMessage() << result.alreadyOpen();
 | 
			
		||||
        return ProjectInfo();
 | 
			
		||||
    }
 | 
			
		||||
 | 
			
		||||
    Project *project = result.project();
 | 
			
		||||
    if (configureAsExampleProject)
 | 
			
		||||
        project->configureAsExampleProject(QStringList());
 | 
			
		||||
 | 
			
		||||
 
 | 
			
		||||
		Reference in New Issue
	
	Block a user