diff options
author | Berthold Stoeger <bstoeger@mail.tuwien.ac.at> | 2019-06-06 11:45:02 +0200 |
---|---|---|
committer | Lubomir I. Ivanov <neolit123@gmail.com> | 2019-06-06 14:52:42 +0300 |
commit | eefd58a5c8f8b5f7d3f01e74c94e27de4c896cba (patch) | |
tree | e729dadbe53c1173680c387cdc6d4a402a3f6dd9 /desktop-widgets/btdeviceselectiondialog.cpp | |
parent | efb98cfd6971e09c5722c95e38ecf566f4d46773 (diff) | |
download | subsurface-eefd58a5c8f8b5f7d3f01e74c94e27de4c896cba.tar.gz |
Cleanup: remove unnecessary QRegularExpression copies
A regular expression was generated and then copied twice without
apparent reason. Remove these copies.
Signed-off-by: Berthold Stoeger <bstoeger@mail.tuwien.ac.at>
Diffstat (limited to 'desktop-widgets/btdeviceselectiondialog.cpp')
-rw-r--r-- | desktop-widgets/btdeviceselectiondialog.cpp | 9 |
1 files changed, 4 insertions, 5 deletions
diff --git a/desktop-widgets/btdeviceselectiondialog.cpp b/desktop-widgets/btdeviceselectiondialog.cpp index bf56005d3..1bb675e46 100644 --- a/desktop-widgets/btdeviceselectiondialog.cpp +++ b/desktop-widgets/btdeviceselectiondialog.cpp @@ -333,14 +333,13 @@ void BtDeviceSelectionDialog::pairingFinished(const QBluetoothAddress &address, // Find the items which represent the BTH device and update their state QList<QListWidgetItem *> items = ui->discoveredDevicesList->findItems(remoteDeviceStringAddress, Qt::MatchContains); - QRegularExpression pairingExpression = QRegularExpression(QString("%1|%2|%3").arg(tr("PAIRED"), - tr("AUTHORIZED_PAIRED"), - tr("UNPAIRED"))); + QRegularExpression pairingExpression(QString("%1|%2|%3").arg(tr("PAIRED"), + tr("AUTHORIZED_PAIRED"), + tr("UNPAIRED"))); for (int i = 0; i < items.count(); ++i) { QListWidgetItem *item = items.at(i); - QString updatedDeviceLabel = item->text().replace(QRegularExpression(pairingExpression), - pairingStatusLabel); + QString updatedDeviceLabel = item->text().replace(pairingExpression, pairingStatusLabel); item->setText(updatedDeviceLabel); item->setBackgroundColor(pairingColor); |