summaryrefslogtreecommitdiffstats
path: root/src/bluetooth/qbluetoothuuid.h
diff options
context:
space:
mode:
authorMarc Mutz <marc.mutz@qt.io>2023-08-10 22:58:07 +0200
committerMarc Mutz <marc.mutz@qt.io>2023-08-15 16:33:35 +0000
commita16133c959151892a386204aa54c8115992c1075 (patch)
tree8d0b196417de7191f13da2b88f1979300efeb186 /src/bluetooth/qbluetoothuuid.h
parentbfa5d5f6581439216ccbff97e1c9af76fc461dc7 (diff)
QBluetoothUuid: cut out the streamingOperator() middle-man
The split into an inline friend op<< and an out-of-line streamingOperator() just causes the QDebug object to be copied once more than otherwise necessary. Relegate the streamingOperator() middle-man to QT_REMOVED_SINCE status and make op<< the real thing. We can't make the named function call op<<, because Thiago says there are situations in which the op<<(QDebug, QBluetoothUuid) call in removed_api.cpp, if we were to use it, would get resolved to an exported version of the old op<< in a user library compiled without -fvisibility-hidden, creating a cycle. Fortunately, the implementation is simple enough to make a DRY violation acceptable. Problem exists in 6.5, too, but let's get as many removed_api.cpp tasks done for 6.6, because the QT_NO_INT128 in removed_api.cpp will make a QT_REMOVED_SINCE(6, 7) in this header file that much harder. Pick-to: 6.6 Change-Id: I10b42cfc1565db8d9a6924cee0af8fb6623c9000 Reviewed-by: Thiago Macieira <thiago.macieira@intel.com> Reviewed-by: Alex Blasche <alexander.blasche@qt.io>
Diffstat (limited to 'src/bluetooth/qbluetoothuuid.h')
-rw-r--r--src/bluetooth/qbluetoothuuid.h7
1 files changed, 3 insertions, 4 deletions
diff --git a/src/bluetooth/qbluetoothuuid.h b/src/bluetooth/qbluetoothuuid.h
index d91670d9..9e087d76 100644
--- a/src/bluetooth/qbluetoothuuid.h
+++ b/src/bluetooth/qbluetoothuuid.h
@@ -370,12 +370,11 @@ public:
}
friend bool operator!=(const QBluetoothUuid &a, const QBluetoothUuid &b) { return !(a == b); }
#ifndef QT_NO_DEBUG_STREAM
- friend QDebug operator<<(QDebug debug, const QBluetoothUuid &uuid)
- {
- return streamingOperator(debug, uuid);
- }
+ friend Q_BLUETOOTH_EXPORT QDebug operator<<(QDebug debug, const QBluetoothUuid &uuid);
+#if QT_BLUETOOTH_REMOVED_SINCE(6, 6)
static QDebug streamingOperator(QDebug debug, const QBluetoothUuid &uuid);
#endif
+#endif
int minimumSize() const;