Commit a11695f5 authored by con's avatar con

Show the "real" name of the default version in build settings.

Reviewed-by: dt
(cherry picked from commit 85cdc9b4)
parent 2e0cd8cf
......@@ -110,6 +110,8 @@ Qt4ProjectConfigWidget::Qt4ProjectConfigWidget(Qt4Project *project)
connect(vm, SIGNAL(qtVersionsChanged()),
this, SLOT(setupQtVersionsComboBox()));
connect(vm, SIGNAL(qtVersionsChanged()),
this, SLOT(updateDetails()));
}
Qt4ProjectConfigWidget::~Qt4ProjectConfigWidget()
......@@ -128,7 +130,7 @@ void Qt4ProjectConfigWidget::updateDetails()
QtVersion *version = m_pro->qtVersion(m_buildConfiguration);
QString versionString;
if (m_pro->qtVersionId(m_buildConfiguration) == 0) {
versionString = tr("Default Qt Version");
versionString = tr("Default Qt Version (%1)").arg(version->name());
} else {
versionString = version->name();
}
......@@ -187,15 +189,16 @@ void Qt4ProjectConfigWidget::setupQtVersionsComboBox()
disconnect(m_ui->qtVersionComboBox, SIGNAL(currentIndexChanged(QString)),
this, SLOT(qtVersionComboBoxCurrentIndexChanged(QString)));
QtVersionManager *vm = QtVersionManager::instance();
m_ui->qtVersionComboBox->clear();
m_ui->qtVersionComboBox->addItem(tr("Default Qt Version"), 0);
m_ui->qtVersionComboBox->addItem(tr("Default Qt Version (%1)").arg(vm->defaultVersion()->name()), 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 = QtVersionManager::instance();
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());
......
......@@ -64,12 +64,12 @@ private slots:
void manageQtVersions();
void selectToolChain(int index);
void toggleDetails();
void updateDetails();
private:
void updateToolChainCombo();
void updateImportLabel();
void setToolChain(int index);
void updateDetails();
Ui::Qt4ProjectConfigWidget *m_ui;
QAbstractButton *m_browseButton;
Qt4Project *m_pro;
......
......@@ -76,7 +76,7 @@ QString QtOptionsPage::trCategory() const
QWidget *QtOptionsPage::createPage(QWidget *parent)
{
QtVersionManager *vm = QtVersionManager::instance();
m_widget = new QtOptionsPageWidget(parent, vm->versions(), vm->currentQtVersion());
m_widget = new QtOptionsPageWidget(parent, vm->versions(), vm->defaultVersion());
return m_widget;
}
......
......@@ -174,7 +174,7 @@ void QtVersionManager::updateDocumentation()
void QtVersionManager::updateExamples()
{
QList<QtVersion *> versions;
versions.append(currentQtVersion());
versions.append(defaultVersion());
versions.append(m_versions);
QString examplesPath;
......@@ -334,7 +334,7 @@ void QtVersionManager::updateSystemVersion()
++m_defaultVersion;
}
QtVersion *QtVersionManager::currentQtVersion() const
QtVersion *QtVersionManager::defaultVersion() const
{
if (m_defaultVersion < m_versions.count())
return m_versions.at(m_defaultVersion);
......
......@@ -188,7 +188,7 @@ public:
QList<QtVersion *> versions() const;
QtVersion *version(int id) const;
QtVersion *currentQtVersion() const;
QtVersion *defaultVersion() const;
QtVersion *qtVersionForDirectory(const QString &directory);
// Used by the projectloadwizard
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment