SLOT(handleDebuggingTypeChanged()));
connect(m_runConfiguration, SIGNAL(targetInformationChanged()), this,
SLOT(updateTargetInformation()));
- connect(m_runConfiguration->target(),
- SIGNAL(activeDeployConfigurationChanged(ProjectExplorer::DeployConfiguration*)),
- SLOT(handleActiveDeployConfigurationChanged()));
- handleActiveDeployConfigurationChanged();
+ connect(m_runConfiguration, SIGNAL(deploySpecsChanged()), SLOT(handleDeploySpecsChanged()));
+ handleDeploySpecsChanged();
}
void MaemoRunConfigurationWidget::addDebuggingWidgets(QVBoxLayout *mainLayout)
connect(m_mountView->selectionModel(),
SIGNAL(selectionChanged(QItemSelection,QItemSelection)), this,
SLOT(enableOrDisableRemoveMountSpecButton()));
- connect(m_runConfiguration->remoteMounts(),
- SIGNAL(rowsInserted(QModelIndex, int, int)), this,
- SLOT(handleRemoteMountsChanged()));
- connect(m_runConfiguration->remoteMounts(),
- SIGNAL(rowsRemoved(QModelIndex, int, int)), this,
- SLOT(handleRemoteMountsChanged()));
- connect(m_runConfiguration->remoteMounts(),
- SIGNAL(dataChanged(QModelIndex, QModelIndex)), this,
- SLOT(handleRemoteMountsChanged()));
- connect(m_runConfiguration->remoteMounts(), SIGNAL(modelReset()), this,
- SLOT(handleRemoteMountsChanged()));
enableOrDisableRemoveMountSpecButton();
+ connect(m_runConfiguration, SIGNAL(remoteMountsChanged()), SLOT(handleRemoteMountsChanged()));
handleRemoteMountsChanged();
}
->setText(QDir::toNativeSeparators(m_runConfiguration->localExecutableFilePath()));
}
-void MaemoRunConfigurationWidget::handleActiveDeployConfigurationChanged()
-{
- if (m_deployablesConnected)
- return;
- connect(m_runConfiguration->deployConfig()->deployables().data(),
- SIGNAL(modelReset()), SLOT(handleDeploySpecsChanged()));
- handleDeploySpecsChanged();
- m_deployablesConnected = true;
- disconnect(m_runConfiguration->target(),
- SIGNAL(activeDeployConfigurationChanged(ProjectExplorer::DeployConfiguration*)),
- this,
- SLOT(handleActiveDeployConfigurationChanged()));
-
-}
-
void MaemoRunConfigurationWidget::handleDeploySpecsChanged()
{
m_remoteExecutableLabel->setText(m_runConfiguration->remoteExecutableFilePath());
- m_runConfiguration->updateFactoryState();
}
void MaemoRunConfigurationWidget::showDeviceConfigurationsDialog(const QString &link)
m_mountWarningLabel->show();
m_mountDetailsContainer->setState(Utils::DetailsWidget::Expanded);
}
- m_runConfiguration->updateFactoryState();
}
} // namespace Internal
void handleRemoteMountsChanged();
void handleDebuggingTypeChanged();
void handleDeploySpecsChanged();
- void handleActiveDeployConfigurationChanged();
private:
void addGenericWidgets(QVBoxLayout *mainLayout);
this, SLOT(proFileUpdate(Qt4ProjectManager::Qt4ProFileNode*,bool)));
connect(pro, SIGNAL(proFileInvalidated(Qt4ProjectManager::Qt4ProFileNode *)),
this, SLOT(proFileInvalidated(Qt4ProjectManager::Qt4ProFileNode*)));
+ connect(this, SIGNAL(debuggersChanged()), SLOT(updateEnabledState()));
+ connect(m_d->remoteMounts, SIGNAL(rowsInserted(QModelIndex, int, int)), this,
+ SLOT(handleRemoteMountsChanged()));
+ connect(m_d->remoteMounts, SIGNAL(rowsRemoved(QModelIndex, int, int)), this,
+ SLOT(handleRemoteMountsChanged()));
+ connect(m_d->remoteMounts, SIGNAL(dataChanged(QModelIndex, QModelIndex)), this,
+ SLOT(handleRemoteMountsChanged()));
+ connect(m_d->remoteMounts, SIGNAL(modelReset()), SLOT(handleRemoteMountsChanged()));
}
RemoteLinuxRunConfiguration::~RemoteLinuxRunConfiguration()
{
bool enabled = isEnabled();
m_d->validParse = success;
- if (enabled != isEnabled()) {
- emit isEnabledChanged(!enabled);
- }
+ if (enabled != isEnabled())
+ updateEnabledState();
}
void RemoteLinuxRunConfiguration::proFileInvalidated(Qt4ProjectManager::Qt4ProFileNode *pro)
const AbstractQt4MaemoTarget * const maemoTarget
= qobject_cast<AbstractQt4MaemoTarget *>(target());
const bool remoteMountsAllowed = maemoTarget && maemoTarget->allowsRemoteMounts();
- if (remoteMountsAllowed && freePortCount == 0)
- return false;
const int mountDirCount = remoteMountsAllowed
? remoteMounts()->validMountSpecificationCount() : 0;
if (mode == Debugger::Constants::DEBUGMODE)
void RemoteLinuxRunConfiguration::updateDeviceConfigurations()
{
emit deviceConfigurationChanged(target());
+ updateEnabledState();
}
void RemoteLinuxRunConfiguration::handleDeployConfigChanged()
{
- DeployConfiguration * const activeDeployConf
- = target()->activeDeployConfiguration();
+ Qt4MaemoDeployConfiguration * const activeDeployConf = deployConfig();
if (activeDeployConf) {
+ connect(activeDeployConf->deployables().data(), SIGNAL(modelReset()),
+ SLOT(handleDeployablesUpdated()), Qt::UniqueConnection);
connect(activeDeployConf->stepList(), SIGNAL(stepInserted(int)),
SLOT(handleDeployConfigChanged()), Qt::UniqueConnection);
connect(activeDeployConf->stepList(), SIGNAL(stepInserted(int)),
}
updateDeviceConfigurations();
- updateFactoryState();
+ updateEnabledState();
+}
+
+void RemoteLinuxRunConfiguration::handleDeployablesUpdated()
+{
+ emit deploySpecsChanged();
+ updateEnabledState();
+}
+
+void RemoteLinuxRunConfiguration::handleRemoteMountsChanged()
+{
+ emit remoteMountsChanged();
+ updateEnabledState();
}
QString RemoteLinuxRunConfiguration::baseEnvironmentText() const
QSharedPointer<const LinuxDeviceConfiguration> deviceConfig() const;
PortList freePorts() const;
bool useRemoteGdb() const;
- void updateFactoryState() { emit isEnabledChanged(isEnabled()); }
DebuggingType debuggingType() const;
QString gdbCmd() const;
signals:
void deviceConfigurationChanged(ProjectExplorer::Target *target);
+ void deploySpecsChanged();
void targetInformationChanged() const;
void baseEnvironmentChanged();
void systemEnvironmentChanged();
void userEnvironmentChangesChanged(const QList<Utils::EnvironmentItem> &diff);
+ void remoteMountsChanged();
protected:
RemoteLinuxRunConfiguration(Qt4ProjectManager::Qt4BaseTarget *parent,
void proFileInvalidated(Qt4ProjectManager::Qt4ProFileNode *pro);
void updateDeviceConfigurations();
void handleDeployConfigChanged();
+ void handleDeployablesUpdated();
+ void handleRemoteMountsChanged();
+ void updateEnabledState() { emit isEnabledChanged(isEnabled()); }
private:
void init();