Commit 9cfe7078 authored by dt's avatar dt
Browse files

Disable the browse button if the shadow build checkbox is disabled.

parent 63fd503c
......@@ -58,11 +58,11 @@ Qt4ProjectConfigWidget::Qt4ProjectConfigWidget(Qt4Project *project)
m_ui->setupUi(this);
// fix the layout
QAbstractButton *browseButton = m_ui->shadowBuildDirEdit->buttonAtIndex(0);
m_browseButton = m_ui->shadowBuildDirEdit->buttonAtIndex(0);
#ifdef Q_OS_WIN
browseButton->setSizePolicy(QSizePolicy::Expanding, QSizePolicy::Expanding);
#endif
m_ui->gridLayout->addWidget(browseButton, 4, 2);
m_ui->gridLayout->addWidget(m_browseButton, 4, 2);
int minimumHeight = qMax(m_ui->qtVersionComboBox->sizeHint().height(), m_ui->manageQtVersionPushButtons->sizeHint().height());
Qt::Alignment labelAlignment = Qt::Alignment(style()->styleHint(QStyle::SH_FormLayoutLabelAlignment));
for (int i = 0; i < m_ui->gridLayout->rowCount(); ++i) {
......@@ -137,6 +137,7 @@ void Qt4ProjectConfigWidget::init(const QString &buildConfiguration)
bool shadowBuild = m_pro->value(buildConfiguration, "useShadowBuild").toBool();
m_ui->shadowBuildCheckBox->setChecked(shadowBuild);
m_ui->shadowBuildDirEdit->setEnabled(shadowBuild);
m_browseButton->setEnabled(shadowBuild);
m_ui->shadowBuildDirEdit->setPath(m_pro->buildDirectory(buildConfiguration));
updateImportLabel();
updateToolChainCombo();
......@@ -189,6 +190,7 @@ void Qt4ProjectConfigWidget::onBeforeBeforeShadowBuildDirBrowsed()
void Qt4ProjectConfigWidget::shadowBuildCheckBoxClicked(bool checked)
{
m_ui->shadowBuildDirEdit->setEnabled(checked);
m_browseButton->setEnabled(checked);
bool b = m_ui->shadowBuildCheckBox->isChecked();
m_pro->setValue(m_buildConfiguration, "useShadowBuild", b);
if (b)
......
......@@ -31,6 +31,7 @@
#define QT4PROJECTCONFIGWIDGET_H
#include <projectexplorer/buildstep.h>
#include <QtGui/QPushButton>
namespace Qt4ProjectManager {
......@@ -62,12 +63,14 @@ private slots:
void qtVersionComboBoxCurrentIndexChanged(const QString &);
void manageQtVersions();
void selectToolChain(int index);
void toggleDetails();
private:
void updateToolChainCombo();
void updateImportLabel();
void setToolChain(int index);
Ui::Qt4ProjectConfigWidget *m_ui;
QAbstractButton *m_browseButton;
Qt4Project *m_pro;
QString m_buildConfiguration;
};
......
Supports Markdown
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