Commit 9cbafa96 authored by ck's avatar ck
Browse files

Maemo: Use first device configuration as default.

Reviewed-by: kh1
parent ea61e132
......@@ -94,6 +94,7 @@ void MaemoRunConfiguration::init()
setDisplayName(tr("MaemoRunConfiguration"));
}
updateDeviceConfigurations();
connect(&MaemoDeviceConfigurations::instance(), SIGNAL(updated()), this,
SLOT(updateDeviceConfigurations()));
......@@ -516,8 +517,15 @@ void MaemoRunConfiguration::qemuProcessFinished()
void MaemoRunConfiguration::updateDeviceConfigurations()
{
qDebug("%s: Current devid = %llu", Q_FUNC_INFO, m_devConfig.internalId);
m_devConfig =
MaemoDeviceConfigurations::instance().find(m_devConfig.internalId);
const MaemoDeviceConfigurations &configManager
= MaemoDeviceConfigurations::instance();
if (!m_devConfig.isValid()) {
const QList<MaemoDeviceConfig> &configList = configManager.devConfigs();
if (!configList.isEmpty())
m_devConfig = configList.first();
} else {
m_devConfig = configManager.find(m_devConfig.internalId);
}
qDebug("%s: new devid = %llu", Q_FUNC_INFO, m_devConfig.internalId);
emit deviceConfigurationsUpdated();
}
......
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