code cleanup: replace deprecated setBackgroundColor() method
Here the replacement has been around for a very long time. Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
This commit is contained in:
parent
46441689b9
commit
daedffce2e
@ -213,7 +213,7 @@ void BtDeviceSelectionDialog::addRemoteDevice(const QBluetoothDeviceInfo &remote
|
|||||||
QListWidgetItem *item = new QListWidgetItem(deviceLabel);
|
QListWidgetItem *item = new QListWidgetItem(deviceLabel);
|
||||||
|
|
||||||
item->setData(Qt::UserRole, QVariant::fromValue(remoteDeviceInfo));
|
item->setData(Qt::UserRole, QVariant::fromValue(remoteDeviceInfo));
|
||||||
item->setBackgroundColor(pairingColor);
|
item->setBackground(pairingColor);
|
||||||
|
|
||||||
ui->discoveredDevicesList->addItem(item);
|
ui->discoveredDevicesList->addItem(item);
|
||||||
}
|
}
|
||||||
@ -342,7 +342,7 @@ void BtDeviceSelectionDialog::pairingFinished(const QBluetoothAddress &address,
|
|||||||
QString updatedDeviceLabel = item->text().replace(pairingExpression, pairingStatusLabel);
|
QString updatedDeviceLabel = item->text().replace(pairingExpression, pairingStatusLabel);
|
||||||
|
|
||||||
item->setText(updatedDeviceLabel);
|
item->setText(updatedDeviceLabel);
|
||||||
item->setBackgroundColor(pairingColor);
|
item->setBackground(pairingColor);
|
||||||
}
|
}
|
||||||
|
|
||||||
// Check if the updated device is the selected one from the list and inform the user that it can/cannot start the download mode
|
// Check if the updated device is the selected one from the list and inform the user that it can/cannot start the download mode
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user