Fix broken enabled/ disabled emulator startbutton state.

Functionality depends entirely on the active start-up project, all other
projects should have the the button disabled if they have no Maemo run
config or the the run config is not the active on.

Reviewed-by: ck
This commit is contained in:
kh1
2010-03-01 16:47:32 +01:00
parent 044ca68e1e
commit adefff60ad
5 changed files with 73 additions and 37 deletions

View File

@@ -97,9 +97,6 @@ void MaemoRunConfiguration::init()
connect(qt4Target(), SIGNAL(targetInformationChanged()), this,
SLOT(invalidateCachedTargetInformation()));
connect(qt4Target(), SIGNAL(targetInformationChanged()), this,
SLOT(enabledStateChanged()));
connect(qt4Target()->qt4Project(),
SIGNAL(proFileUpdated(Qt4ProjectManager::Internal::Qt4ProFileNode*)),
this, SLOT(proFileUpdate(Qt4ProjectManager::Internal::Qt4ProFileNode*)));
@@ -232,6 +229,7 @@ bool MaemoRunConfiguration::fileNeedsDeployment(const QString &path,
void MaemoRunConfiguration::setDeviceConfig(const MaemoDeviceConfig &devConf)
{
m_devConfig = devConf;
emit deviceConfigurationChanged(target());
}
MaemoDeviceConfig MaemoRunConfiguration::deviceConfig() const
@@ -454,6 +452,10 @@ void MaemoRunConfiguration::updateSimulatorInformation() const
void MaemoRunConfiguration::startStopQemu()
{
const MaemoDeviceConfig &config = deviceConfig();
if (!config.isValid()|| config.type != MaemoDeviceConfig::Simulator)
return;
if (qemu->state() != QProcess::NotRunning) {
if (qemu->state() == QProcess::Running) {
qemu->terminate();
@@ -496,11 +498,6 @@ void MaemoRunConfiguration::qemuProcessFinished()
emit qemuProcessStatus(false);
}
void MaemoRunConfiguration::enabledStateChanged()
{
MaemoManager::instance().setQemuSimulatorStarterEnabled(isEnabled());
}
void MaemoRunConfiguration::updateDeviceConfigurations()
{
qDebug("%s: Current devid = %llu", Q_FUNC_INFO, m_devConfig.internalId);