forked from qt-creator/qt-creator
Utils: Use more views in Id setup
Since this means that StringBuilder expressions are not usable as arguments anymore, use .withSuffix() more extensively. This makes this "unusual" construction also a bit better findable. No measurable performance gain or loss in either direction. Change-Id: I04508e77764455bd9d3a21eda63bc6de01508e4b Reviewed-by: Eike Ziller <eike.ziller@qt.io>
This commit is contained in:
@@ -75,8 +75,9 @@ void DeviceDetector::handleDeviceEvent(QdbDeviceTracker::DeviceEventType eventTy
|
||||
return;
|
||||
}
|
||||
|
||||
const Utils::Id deviceId = Constants::QdbHardwareDevicePrefix.withSuffix(':' + serial);
|
||||
const auto messagePrefix = Tr::tr("Device \"%1\" %2").arg(serial);
|
||||
const Utils::Id deviceId =
|
||||
Utils::Id(Constants::QdbHardwareDevicePrefix).withSuffix(':').withSuffix(serial);
|
||||
const QString messagePrefix = Tr::tr("Device \"%1\" %2").arg(serial);
|
||||
DeviceManager * const dm = DeviceManager::instance();
|
||||
|
||||
if (eventType == QdbDeviceTracker::NewDevice) {
|
||||
|
||||
Reference in New Issue
Block a user