forked from qt-creator/qt-creator
RemoteLinux: The device manager should not be itself a model.
The ListModel functionality is only needed in very few contexts, so we move it into a dedicated class. This cleans up the actual device manager. Change-Id: I325bf43a9260ab9a8e484f8972e2d962ea2f1b3e Reviewed-by: Kai Koehne <kai.koehne@nokia.com>
This commit is contained in:
@@ -32,6 +32,7 @@
|
||||
|
||||
#include "startgdbserverdialog.h"
|
||||
|
||||
#include "devicemanagermodel.h"
|
||||
#include "remotelinuxprocesslist.h"
|
||||
#include "linuxdeviceconfiguration.h"
|
||||
#include "linuxdeviceconfigurations.h"
|
||||
@@ -174,14 +175,15 @@ StartGdbServerDialog::StartGdbServerDialog(QWidget *parent) :
|
||||
setWindowTitle(tr("List of Remote Processes"));
|
||||
|
||||
LinuxDeviceConfigurations *devices = LinuxDeviceConfigurations::instance();
|
||||
DeviceManagerModel * const model = new DeviceManagerModel(devices, this);
|
||||
|
||||
QObject::connect(d->closeButton, SIGNAL(clicked()), this, SLOT(reject()));
|
||||
|
||||
d->deviceComboBox->setModel(devices);
|
||||
d->deviceComboBox->setModel(model);
|
||||
d->deviceComboBox->setCurrentIndex(d->settings->value(LastDevice).toInt());
|
||||
connect(&d->gatherer, SIGNAL(error(QString)), SLOT(portGathererError(QString)));
|
||||
connect(&d->gatherer, SIGNAL(portListReady()), SLOT(portListReady()));
|
||||
if (devices->rowCount() == 0) {
|
||||
if (devices->deviceCount() == 0) {
|
||||
d->tableView->setEnabled(false);
|
||||
} else {
|
||||
d->tableView->setSelectionBehavior(QAbstractItemView::SelectRows);
|
||||
|
||||
Reference in New Issue
Block a user