Qt
Internal/Contributor docs for the Qt SDK. <b>Note:</b> These are NOT official API docs; those are found <a href='https://doc.qt.io/'>here</a>.
Loading...
Searching...
No Matches
removed_api.cpp
Go to the documentation of this file.
1// Copyright (C) 2022 Intel Corporation.
2// SPDX-License-Identifier: LicenseRef-Qt-Commercial OR LGPL-3.0-only OR GPL-2.0-only OR GPL-3.0-only
3
4#define QT_BLUETOOTH_BUILD_REMOVED_API
5
6// Undefine Qt 128-bit int types
7#define QT_NO_INT128
8
9#include "qtbluetoothglobal.h"
10
12
13#if QT_BLUETOOTH_REMOVED_SINCE(6, 6)
14
15#include "qbluetoothaddress.h" // inlined API
16
17#include "qbluetoothuuid.h"
18
19static_assert(std::is_aggregate_v<quint128>);
20static_assert(std::is_trivial_v<quint128>);
21
22// These legacy functions can't just call the new (quint128, Endian) overloads,
23// as the latter may see either QtCore's quint128 (__int128 built-in) _or_ our
24// fake version from qbluetoothuuid.h. This TU must _always_ see the fake ones
25// (as that is what we had in 6.5):
26#ifdef QT_SUPPORTS_INT128
27# error This TU requires QT_NO_INT128 to be defined.
28#endif
29
31 : QUuid(fromBytes(uuid.data))
32{}
33
35{
36 quint128 uuid;
37 const auto bytes = toBytes();
38 memcpy(uuid.data, bytes.data, sizeof(uuid.data));
39 return uuid;
40}
41
42// END quint128 functions
43
46{
47}
48
49#ifndef QT_NO_DEBUG_STREAM
50QDebug QBluetoothUuid::streamingOperator(QDebug debug, const QBluetoothUuid &uuid)
51{
52 debug << uuid.toString();
53 return debug;
54}
55#endif // QT_NO_DEBUG_STREAM
56
57#endif // QT_BLUETOOTH_REMOVED_SINCE(6, 6)
\inmodule QtBluetooth
constexpr QBluetoothUuid() noexcept
Constructs a new null Bluetooth UUID.
quint128 toUInt128(QSysInfo::Endian order=QSysInfo::BigEndian) const noexcept
Returns the 128 bit representation of this UUID in byte order order.
\inmodule QtCore
\macro QT_RESTRICTED_CAST_FROM_ASCII
Definition qstring.h:129
\inmodule QtCore
Definition quuid.h:31
QString toString(StringFormat mode=WithBraces) const
Definition quuid.cpp:650
Id128Bytes toBytes(QSysInfo::Endian order=QSysInfo::BigEndian) const noexcept
Definition quuid.h:232
QAnyStringView qToAnyStringViewIgnoringNull(const QStringLike &s) noexcept
GLint GLsizei GLsizei GLenum GLenum GLsizei void * data
quint8 data[16]