void Qt4BuildConfigWidget::setupQtVersionsComboBox() { if (m_buildConfiguration.isEmpty()) // not yet initialized return; disconnect(m_ui->qtVersionComboBox, SIGNAL(currentIndexChanged(QString)), this, SLOT(qtVersionComboBoxCurrentIndexChanged(QString))); m_ui->qtVersionComboBox->clear(); m_ui->qtVersionComboBox->addItem(tr("Default Qt Version"), 0); if (m_pro->qtVersionId(m_buildConfiguration) == 0) { m_ui->qtVersionComboBox->setCurrentIndex(0); m_ui->invalidQtWarningLabel->setVisible(false); } // Add Qt Versions to the combo box QtVersionManager *vm = m_pro->qt4ProjectManager()->versionManager(); const QList<QtVersion *> &versions = vm->versions(); for (int i = 0; i < versions.size(); ++i) { m_ui->qtVersionComboBox->addItem(versions.at(i)->name(), versions.at(i)->uniqueId()); if (versions.at(i)->uniqueId() == m_pro->qtVersionId(m_buildConfiguration)) { m_ui->qtVersionComboBox->setCurrentIndex(i + 1); m_ui->invalidQtWarningLabel->setVisible(!versions.at(i)->isValid()); } } // And connect again connect(m_ui->qtVersionComboBox, SIGNAL(currentIndexChanged(QString)), this, SLOT(qtVersionComboBoxCurrentIndexChanged(QString))); }
QWidget *QtOptionsPage::createPage(QWidget *parent) { QtVersionManager *vm = QtVersionManager::instance(); m_widget = new QtOptionsPageWidget(parent, vm->versions()); if (m_searchKeywords.isEmpty()) m_searchKeywords = m_widget->searchKeywords(); return m_widget; }