RemoteLinux: Move some stuff into the new target base class.

All these things were always conceptually per-target, but due to not
having a common target class we had to awkwardly implement the concept
using shared pointers.

Change-Id: I1bb1992a230a485d519a892a6ca602a6846fc3cf
Reviewed-by: Tobias Hunger <tobias.hunger@nokia.com>
This commit is contained in:
Christian Kandeler
2012-02-07 14:13:56 +01:00
parent 7e9e3a816f
commit 53e2cbfb7f
23 changed files with 106 additions and 117 deletions

View File

@@ -31,6 +31,7 @@
#include "remotelinuxdeployconfigurationwidget.h"
#include "ui_remotelinuxdeployconfigurationwidget.h"
#include "abstractembeddedlinuxtarget.h"
#include "deployablefilesperprofile.h"
#include "deploymentinfo.h"
#include "linuxdeviceconfigurations.h"
@@ -109,20 +110,20 @@ void RemoteLinuxDeployConfigurationWidget::init(DeployConfiguration *dc)
SLOT(showDeviceConfigurations()));
connect(&d->tableView, SIGNAL(doubleClicked()), SLOT(openProjectFile()));
d->ui.deviceConfigsComboBox->setModel(d->deployConfiguration->deviceConfigModel().data());
d->ui.deviceConfigsComboBox->setModel(d->deployConfiguration->target()->deviceConfigModel());
connect(d->ui.deviceConfigsComboBox, SIGNAL(activated(int)),
SLOT(handleSelectedDeviceConfigurationChanged(int)));
connect(d->deployConfiguration, SIGNAL(deviceConfigurationListChanged()),
SLOT(handleDeviceConfigurationListChanged()));
handleDeviceConfigurationListChanged();
d->ui.projectsComboBox->setModel(d->deployConfiguration->deploymentInfo().data());
connect(d->deployConfiguration->deploymentInfo().data(), SIGNAL(modelAboutToBeReset()),
d->ui.projectsComboBox->setModel(d->deployConfiguration->deploymentInfo());
connect(d->deployConfiguration->deploymentInfo(), SIGNAL(modelAboutToBeReset()),
SLOT(handleModelListToBeReset()));
// Queued connection because of race condition with combo box's reaction
// to modelReset().
connect(d->deployConfiguration->deploymentInfo().data(), SIGNAL(modelReset()),
connect(d->deployConfiguration->deploymentInfo(), SIGNAL(modelReset()),
SLOT(handleModelListReset()), Qt::QueuedConnection);
connect(d->ui.projectsComboBox, SIGNAL(currentIndexChanged(int)), SLOT(setModel(int)));
@@ -188,7 +189,8 @@ void RemoteLinuxDeployConfigurationWidget::handleDeviceConfigurationListChanged(
= d->deployConfiguration->deviceConfiguration();
const LinuxDeviceConfiguration::Id internalId
= LinuxDeviceConfigurations::instance()->internalId(devConf);
const int newIndex = d->deployConfiguration->deviceConfigModel()->indexForInternalId(internalId);
const int newIndex
= d->deployConfiguration->target()->deviceConfigModel()->indexForInternalId(internalId);
d->ui.deviceConfigsComboBox->setCurrentIndex(newIndex);
}