forked from qt-creator/qt-creator
		
	Remove customexecutable RCs again if they are unused
This commit is contained in:
		@@ -999,6 +999,18 @@ void Qt4Project::checkForNewApplicationProjects()
 | 
			
		||||
            if (!found) {
 | 
			
		||||
                qt4Target->addRunConfigurationForPath(qt4proFile->path());
 | 
			
		||||
            }
 | 
			
		||||
 | 
			
		||||
            // Remove unused CustomExecutableRCs:
 | 
			
		||||
            if (target->runConfigurations().count() > 1) {
 | 
			
		||||
                QList<RunConfiguration*> toRemove;
 | 
			
		||||
                foreach (RunConfiguration * rc, target->runConfigurations()) {
 | 
			
		||||
                    CustomExecutableRunConfiguration *cerc = qobject_cast<CustomExecutableRunConfiguration *>(rc);
 | 
			
		||||
                    if (cerc && !cerc->isConfigured())
 | 
			
		||||
                        toRemove.append(rc);
 | 
			
		||||
                }
 | 
			
		||||
                foreach (RunConfiguration *rc, toRemove)
 | 
			
		||||
                    target->removeRunConfiguration(rc);
 | 
			
		||||
            }
 | 
			
		||||
        }
 | 
			
		||||
    }
 | 
			
		||||
}
 | 
			
		||||
 
 | 
			
		||||
		Reference in New Issue
	
	Block a user