summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorFriedemann Kleint <Friedemann.Kleint@qt.io>2023-01-25 10:10:23 +0100
committerQt Cherry-pick Bot <cherrypick_bot@qt-project.org>2023-01-25 10:07:49 +0000
commit9d1911c6c42618f618986b5bab6e17c6bf86505b (patch)
treef7dc920791556ffac40631c8dbf195d0b48da9fd
parent9e0a0f604014b92f9c26149c73fcd6dc4123eeef (diff)
downloadqtconnectivity-9d1911c6c42618f618986b5bab6e17c6bf86505b.tar.gz
Fix CMake Unity (Jumbo) build
Remove clashing string constants. Task-number: QTBUG-109394 Change-Id: I44c89cbc58fcc2e2ae33d23acd541eaba1a5a288 Reviewed-by: Ivan Solovev <ivan.solovev@qt.io> (cherry picked from commit a68dd14499f557d1f334f19069498669eca90058) Reviewed-by: Qt Cherry-pick Bot <cherrypick_bot@qt-project.org>
-rw-r--r--src/bluetooth/qbluetoothserviceinfo_bluez.cpp5
-rw-r--r--src/bluetooth/qbluetoothsocket_bluezdbus.cpp6
2 files changed, 6 insertions, 5 deletions
diff --git a/src/bluetooth/qbluetoothserviceinfo_bluez.cpp b/src/bluetooth/qbluetoothserviceinfo_bluez.cpp
index 9c1ece3c..14c3e451 100644
--- a/src/bluetooth/qbluetoothserviceinfo_bluez.cpp
+++ b/src/bluetooth/qbluetoothserviceinfo_bluez.cpp
@@ -13,9 +13,10 @@
QT_BEGIN_NAMESPACE
+using namespace Qt::StringLiterals;
+
Q_DECLARE_LOGGING_CATEGORY(QT_BT_BLUEZ)
-static const QLatin1String profilePathTemplate("/qt/profile");
static QAtomicInt pathCounter;
static void writeAttribute(QXmlStreamWriter *stream, const QVariant &attribute)
@@ -197,7 +198,7 @@ bool QBluetoothServiceInfoPrivate::registerService(const QBluetoothAddress & /*l
stream.writeEndDocument();
// create path
- profilePath = profilePathTemplate;
+ profilePath = u"/qt/profile"_s;
profilePath.append(QString::fromLatin1("/%1%2/%3")
.arg(sanitizeNameForDBus(QCoreApplication::applicationName()))
.arg(QCoreApplication::applicationPid())
diff --git a/src/bluetooth/qbluetoothsocket_bluezdbus.cpp b/src/bluetooth/qbluetoothsocket_bluezdbus.cpp
index 59fb1605..f094c62b 100644
--- a/src/bluetooth/qbluetoothsocket_bluezdbus.cpp
+++ b/src/bluetooth/qbluetoothsocket_bluezdbus.cpp
@@ -25,9 +25,9 @@
QT_BEGIN_NAMESPACE
-Q_DECLARE_LOGGING_CATEGORY(QT_BT_BLUEZ)
+using namespace Qt::StringLiterals;
-static const QLatin1String profilePathTemplate("/qt/btsocket/%1%2/%3");
+Q_DECLARE_LOGGING_CATEGORY(QT_BT_BLUEZ)
QBluetoothSocketPrivateBluezDBus::QBluetoothSocketPrivateBluezDBus()
{
@@ -140,7 +140,7 @@ void QBluetoothSocketPrivateBluezDBus::connectToServiceHelper(
// profile registration might fail in case other service uses same path
// try 10 times and otherwise abort
- profilePath = QString(profilePathTemplate).
+ profilePath = u"/qt/btsocket/%1%2/%3"_s.
arg(sanitizeNameForDBus(QCoreApplication::applicationName())).
arg(QCoreApplication::applicationPid()).
arg(QRandomGenerator::global()->generate());