mirror of
				https://github.com/subsurface/subsurface.git
				synced 2025-02-19 22:16:15 +00:00 
			
		
		
		
	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>
This commit is contained in:
		
							parent
							
								
									efb98cfd69
								
							
						
					
					
						commit
						eefd58a5c8
					
				
					 1 changed files with 4 additions and 5 deletions
				
			
		|  | @ -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); | ||||
|  |  | |||
		Loading…
	
	Add table
		Add a link
		
	
		Reference in a new issue