CMake: Show a error if the cached generator is incompatible

Task-number: QTCREATORBUG-8594
Change-Id: I20b2ed5b82f5003315e6f72346a11980ce0929ef
Reviewed-by: Matt McLin <matt.mclin@barco.com>
Reviewed-by: Daniel Teske <daniel.teske@digia.com>
This commit is contained in:
Daniel Teske
2014-04-30 12:39:56 +02:00
parent 9926752d34
commit faab380cc1
2 changed files with 13 additions and 0 deletions

View File

@@ -429,6 +429,9 @@ void CMakeRunPage::initWidgets()
m_generatorComboBox = new QComboBox(this);
fl->addRow(tr("Generator:"), m_generatorComboBox);
m_generatorExtraText = new QLabel(this);
fl->addRow(m_generatorExtraText);
m_runCMake = new QPushButton(this);
m_runCMake->setText(tr("Run CMake"));
connect(m_runCMake, SIGNAL(clicked()), this, SLOT(runCMake()));
@@ -550,6 +553,15 @@ void CMakeRunPage::initializePage()
m_generatorComboBox->addItem(info.displayName(), qVariantFromValue(info));
}
if (!m_generatorComboBox->count()) {
m_generatorExtraText->setVisible(true);
m_generatorExtraText->setText(tr("The cached generator %1 is incompatible with the configured kits.")
.arg(QString::fromLatin1(cachedGenerator)));
} else {
m_generatorExtraText->setVisible(false);
}
m_generatorComboBox->setCurrentIndex(defaultIndex);
} else {
// Note: We don't compare the actually cached generator to what is set in the buildconfiguration