Qt
Internal/Contributor docs for the Qt SDK. Note: These are NOT official API docs; those are found at https://doc.qt.io/
Toggle main menu visibility
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
#
ifndef
QT_NO_INT128
8
#
define
QT_NO_INT128
9
#
endif
10
11
#
include
"qtbluetoothglobal.h"
12
13
QT_USE_NAMESPACE
14
15
#
if
QT_BLUETOOTH_REMOVED_SINCE
(
6
,
6
)
16
17
#
include
"qbluetoothaddress.h"
// inlined API
18
19
#
include
"qbluetoothuuid.h"
20
21
static_assert
(std::is_aggregate_v<quint128>);
22
static_assert
(std::is_trivial_v<quint128>);
23
24
// These legacy functions can't just call the new (quint128, Endian) overloads,
25
// as the latter may see either QtCore's quint128 (__int128 built-in) _or_ our
26
// fake version from qbluetoothuuid.h. This TU must _always_ see the fake ones
27
// (as that is what we had in 6.5):
28
#
ifdef
QT_SUPPORTS_INT128
29
#
error
This
TU
requires
QT_NO_INT128
to
be
defined
.
30
#
endif
31
32
QBluetoothUuid::QBluetoothUuid(quint128 uuid)
33
: QUuid(fromBytes(uuid.data))
34
{}
35
36
quint128 QBluetoothUuid::toUInt128()
const
37
{
38
quint128 uuid;
39
const
auto
bytes = toBytes();
40
memcpy(uuid.data, bytes.data,
sizeof
(uuid.data));
41
return
uuid;
42
}
43
44
// END quint128 functions
45
46
QBluetoothUuid::QBluetoothUuid(
const
QString &uuid)
47
: QUuid(qToAnyStringViewIgnoringNull(uuid))
48
{
49
}
50
51
#
ifndef
QT_NO_DEBUG_STREAM
52
QDebug QBluetoothUuid::streamingOperator(QDebug debug,
const
QBluetoothUuid &uuid)
53
{
54
debug << uuid.toString();
55
return
debug;
56
}
57
#
endif
// QT_NO_DEBUG_STREAM
58
59
#
endif
// QT_BLUETOOTH_REMOVED_SINCE(6, 6)
qtconnectivity
src
bluetooth
removed_api.cpp
Generated on
for Qt by
1.18.0