Maemo: Make deploy mount port user-settable.

This commit is contained in:
qt-info@nokia.com
2010-08-12 10:31:52 +02:00
committed by ck
parent db5a61d3cf
commit 724ecfcafb
7 changed files with 89 additions and 21 deletions

View File

@@ -20,6 +20,7 @@ MaemoDeployStepWidget::MaemoDeployStepWidget(MaemoDeployStep *step) :
m_step(step)
{
ui->setupUi(this);
ui->mountPortSpinBox->setToolTip(ui->mountPortLabel->toolTip());
connect(m_step->deployables(), SIGNAL(modelsCreated()), this,
SLOT(handleModelsCreated()));
@@ -33,6 +34,14 @@ MaemoDeployStepWidget::~MaemoDeployStepWidget()
void MaemoDeployStepWidget::init()
{
#ifdef DEPLOY_VIA_MOUNT
ui->mountPortSpinBox->setValue(m_step->mountPort());
connect(ui->mountPortSpinBox, SIGNAL(valueChanged(int)), this,
SLOT(handleMountPortEdited(int)));
#else
ui->mountPortLabel->hide();
ui->mountPortSpinBox->hide();
#endif
handleDeviceConfigModelChanged();
connect(m_step->buildConfiguration()->target(),
SIGNAL(activeRunConfigurationChanged(ProjectExplorer::RunConfiguration*)),
@@ -90,5 +99,12 @@ void MaemoDeployStepWidget::setCurrentDeviceConfig(int index)
m_step->deviceConfigModel()->setCurrentIndex(index);
}
void MaemoDeployStepWidget::handleMountPortEdited(int newPort)
{
#ifdef DEPLOY_VIA_MOUNT
m_step->setMountPort(newPort);
#endif
}
} // namespace Internal
} // namespace Qt4ProjectManager