forked from qt-creator/qt-creator
		
	The qtversions's toolchain now depends on the actual compiler not mkspec
That is we actually parse the mkspec and evaluate QMAKE_CXX (and a few other variables) to figure out the correct mkspec. This makes using custom mkspecs easier and is also cleaner. I also changed mkspec() and mkspecPath() to behave a little diffrent, essentialy mkspec() will return only the name (the actual dir name) of the mkspec. That is in general not sufficient for passing on to qmake. mkspecPath() only returns the correct path to mkspecs/default. Hopefully I haven't broken WinCE/Maemo/MinGW.
This commit is contained in:
		@@ -65,24 +65,7 @@ ProjectLoadWizard::ProjectLoadWizard(Qt4Project *project, QWidget *parent, Qt::W
 | 
			
		||||
        QPair<QtVersion::QmakeBuildConfig, QStringList> result =
 | 
			
		||||
                QtVersionManager::scanMakeFile(directory, m_importVersion->defaultBuildConfig());
 | 
			
		||||
        m_importBuildConfig = result.first;
 | 
			
		||||
        m_additionalArguments = result.second;
 | 
			
		||||
 | 
			
		||||
        QString versionSpec = m_importVersion->sourcePath() + "/mkspecs/" + m_importVersion->mkspec();
 | 
			
		||||
        QString parsedSpec = Qt4Project::extractSpecFromArgumentList(m_additionalArguments);
 | 
			
		||||
 | 
			
		||||
        // Compare mkspecs and add to additional arguments
 | 
			
		||||
        if (parsedSpec.isEmpty()) {
 | 
			
		||||
            // using the default spec, don't modify additional arguments
 | 
			
		||||
        } else {
 | 
			
		||||
            QString parsedSpecOrginal = parsedSpec;
 | 
			
		||||
            if (QFileInfo(parsedSpec).isRelative())
 | 
			
		||||
                parsedSpec = QDir::cleanPath(directory + "/" + parsedSpec);
 | 
			
		||||
            m_additionalArguments = Qt4Project::removeSpecFromArgumentList(m_additionalArguments);
 | 
			
		||||
            if (parsedSpec != versionSpec) {
 | 
			
		||||
                m_additionalArguments.prepend(parsedSpecOrginal);
 | 
			
		||||
                m_additionalArguments.prepend("-spec");
 | 
			
		||||
            }
 | 
			
		||||
        }
 | 
			
		||||
        m_additionalArguments = Qt4Project::removeSpecFromArgumentList(result.second);
 | 
			
		||||
    }
 | 
			
		||||
 | 
			
		||||
    // So now we have the version and the configuration for that version
 | 
			
		||||
 
 | 
			
		||||
		Reference in New Issue
	
	Block a user