forked from qt-creator/qt-creator
Fix bug with importanting a build with an not yet existing qt.
This commit is contained in:
@@ -358,6 +358,7 @@ bool Qt4Project::restoreSettingsImpl(PersistentSettingsReader &settingsReader)
|
||||
|
||||
// Ensure that the qt version and tool chain in each build configuration is valid
|
||||
// or if not, is reset to the default
|
||||
|
||||
foreach (BuildConfiguration *bc, buildConfigurations()) {
|
||||
qtVersionId(bc);
|
||||
toolChainType(bc);
|
||||
|
@@ -145,7 +145,7 @@ QString Qt4ProjectConfigWidget::displayName() const
|
||||
void Qt4ProjectConfigWidget::init(const QString &buildConfiguration)
|
||||
{
|
||||
if (debug)
|
||||
qDebug() << "Qt4ProjectConfigWidget::init()";
|
||||
qDebug() << "Qt4ProjectConfigWidget::init() for"<<buildConfiguration;
|
||||
|
||||
m_buildConfiguration = buildConfiguration;
|
||||
ProjectExplorer::BuildConfiguration *bc = m_pro->buildConfiguration(buildConfiguration);
|
||||
@@ -183,6 +183,7 @@ void Qt4ProjectConfigWidget::setupQtVersionsComboBox()
|
||||
m_ui->qtVersionComboBox->addItem(tr("Default Qt Version (%1)").arg(vm->defaultVersion()->name()), 0);
|
||||
|
||||
int qtVersionId = m_pro->qtVersionId(m_pro->buildConfiguration(m_buildConfiguration));
|
||||
|
||||
if (qtVersionId == 0) {
|
||||
m_ui->qtVersionComboBox->setCurrentIndex(0);
|
||||
m_ui->invalidQtWarningLabel->setVisible(false);
|
||||
|
@@ -159,6 +159,7 @@ QtVersionManager *QtVersionManager::instance()
|
||||
void QtVersionManager::addVersion(QtVersion *version)
|
||||
{
|
||||
m_versions.append(version);
|
||||
m_uniqueIdToIndex.insert(version->uniqueId(), m_versions.count() - 1);
|
||||
emit qtVersionsChanged();
|
||||
writeVersionsIntoSettings();
|
||||
}
|
||||
@@ -823,6 +824,7 @@ void QtVersion::updateVersionInfo() const
|
||||
{
|
||||
if (m_versionInfoUpToDate)
|
||||
return;
|
||||
|
||||
// extract data from qmake executable
|
||||
m_versionInfo.clear();
|
||||
m_notInstalled = false;
|
||||
@@ -937,7 +939,7 @@ void QtVersion::updateMkSpec() const
|
||||
mkspecPath = versionInfo().value("QT_INSTALL_DATA") + "/mkspecs/default";
|
||||
else
|
||||
mkspecPath = mkspecPath + "/default";
|
||||
// qDebug() << "default mkspec is located at" << mkspecPath;
|
||||
// qDebug() << "default mkspec is located at" << mkspecPath;
|
||||
#ifdef Q_OS_WIN
|
||||
QFile f2(mkspecPath + "/qmake.conf");
|
||||
if (f2.exists() && f2.open(QIODevice::ReadOnly)) {
|
||||
|
Reference in New Issue
Block a user