Connect the showMessage() signals from the devices
This commit is contained in:
parent
f5f0714c85
commit
429620b957
1 changed files with 7 additions and 5 deletions
|
@ -24,6 +24,7 @@ DeviceModel::DeviceModel(QObject *parent)
|
|||
for( int i = 0; i < numberOfDevices; ++i ) {
|
||||
int id = tdGetDeviceId(i);
|
||||
Device *device = new Device(id, SUPPORTED_METHODS, this);
|
||||
connect(device, SIGNAL(showMessage(QString,QString,QString)), this, SIGNAL(showMessage(QString,QString,QString)));
|
||||
devices.append(device);
|
||||
connect(device, SIGNAL(stateChanged(int)), this, SLOT(deviceStateChanged(int)), Qt::QueuedConnection);
|
||||
connect(device, SIGNAL(nameChanged(int,QString)), this, SLOT(nameChanged(int,QString)), Qt::QueuedConnection);
|
||||
|
@ -143,6 +144,7 @@ void DeviceModel::deviceChanged( int deviceId, int eventType, int changeType ) {
|
|||
//We are not running in the DeviceModel-thread here. Move the device to the correct thread
|
||||
device->moveToThread(this->thread());
|
||||
device->setParent(this);
|
||||
connect(device, SIGNAL(showMessage(QString,QString,QString)), this, SIGNAL(showMessage(QString,QString,QString)));
|
||||
devices.append(device);
|
||||
connect(device, SIGNAL(stateChanged(int)), this, SLOT(deviceStateChanged(int)));
|
||||
connect(device, SIGNAL(nameChanged(int,QString)), this, SLOT(nameChanged(int,QString)));
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue