summaryrefslogtreecommitdiffstats
path: root/src
diff options
context:
space:
mode:
authorAlex Blasche <alexander.blasche@qt.io>2017-11-03 09:58:55 +0100
committerAlex Blasche <alexander.blasche@qt.io>2017-11-06 11:32:15 +0000
commita8a4fae732dba2e3783236f4486acde60d03d997 (patch)
tree34d3c586ff0a2f1bf2e40cdfc1e798c9785b607e /src
parentab73af08c79be5359004c6602f754349282b56d7 (diff)
Use QStringLiteral where needed to avoid QString allocations
Change-Id: I9edc229e43f5e09ca45ede5032aacb4d54fa76af Reviewed-by: Oliver Wolff <oliver.wolff@qt.io>
Diffstat (limited to 'src')
-rw-r--r--src/bluetooth/qbluetoothserviceinfo.cpp2
-rw-r--r--src/imports/bluetooth/qdeclarativebluetoothdiscoverymodel.cpp4
2 files changed, 3 insertions, 3 deletions
diff --git a/src/bluetooth/qbluetoothserviceinfo.cpp b/src/bluetooth/qbluetoothserviceinfo.cpp
index e4e5d1ed..385e9463 100644
--- a/src/bluetooth/qbluetoothserviceinfo.cpp
+++ b/src/bluetooth/qbluetoothserviceinfo.cpp
@@ -625,7 +625,7 @@ QDebug operator<<(QDebug dbg, const QBluetoothServiceInfo &info)
QDebugStateSaver saver(dbg);
dbg.noquote() << "\n";
foreach (quint16 id, info.attributes()) {
- dumpAttributeVariant(dbg, info.attribute(id), QString::fromLatin1("(%1)\t").arg(id));
+ dumpAttributeVariant(dbg, info.attribute(id), QStringLiteral("(%1)\t").arg(id));
}
return dbg;
}
diff --git a/src/imports/bluetooth/qdeclarativebluetoothdiscoverymodel.cpp b/src/imports/bluetooth/qdeclarativebluetoothdiscoverymodel.cpp
index f2486e81..ee78fbdb 100644
--- a/src/imports/bluetooth/qdeclarativebluetoothdiscoverymodel.cpp
+++ b/src/imports/bluetooth/qdeclarativebluetoothdiscoverymodel.cpp
@@ -148,7 +148,7 @@ QDeclarativeBluetoothDiscoveryModel::QDeclarativeBluetoothDiscoveryModel(QObject
connect(d->m_deviceAgent, SIGNAL(canceled()), this, SLOT(finishedDiscovery()));
connect(d->m_deviceAgent, SIGNAL(error(QBluetoothDeviceDiscoveryAgent::Error)),
this, SLOT(errorDeviceDiscovery(QBluetoothDeviceDiscoveryAgent::Error)));
- d->m_deviceAgent->setObjectName("DeviceDiscoveryAgent");
+ d->m_deviceAgent->setObjectName(QStringLiteral("DeviceDiscoveryAgent"));
d->m_serviceAgent = new QBluetoothServiceDiscoveryAgent(this);
connect(d->m_serviceAgent, SIGNAL(serviceDiscovered(QBluetoothServiceInfo)),
@@ -157,7 +157,7 @@ QDeclarativeBluetoothDiscoveryModel::QDeclarativeBluetoothDiscoveryModel(QObject
connect(d->m_serviceAgent, SIGNAL(canceled()), this, SLOT(finishedDiscovery()));
connect(d->m_serviceAgent, SIGNAL(error(QBluetoothServiceDiscoveryAgent::Error)),
this, SLOT(errorDiscovery(QBluetoothServiceDiscoveryAgent::Error)));
- d->m_serviceAgent->setObjectName("ServiceDiscoveryAgent");
+ d->m_serviceAgent->setObjectName(QStringLiteral("ServiceDiscoveryAgent"));
QHash<int, QByteArray> roleNames;
roleNames = QAbstractItemModel::roleNames();