| Commit message (Collapse) | Author | Age | Files | Lines |
| |
|
|
|
|
|
|
| |
Amends 439e818f7843b6a117e1bfe755e313022e14aafa.
Pick-to: 6.6 6.5 6.2 5.15
Change-Id: If08fc84a495d493b463cc71de43237b1cc950a5b
Reviewed-by: Alex Blasche <alexander.blasche@qt.io>
|
| |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
QBluetoothUuid clearly is-a QUuid, so it should have the same
constructors, though it may add its own on top. Three Qt releases
(6.3-6.6) of QUuid changes have, however, not been properly reflected
in QBluetoothUuid, so fix it once and for all by adding
using QUuid::QUuid;
to QBluetoothUuid, thereby inheriting all the QUuid ctors (except
SMFs) that QBluethoothUuid doesn't supply itself.
This fixes or simplifies:
- The Id128Bytes ctor, which we don't need to supply at all now.
- The QString ctor, which was replaced by a QAnyStringView overload in
QUuid a long time ago (6.3).
- Anything else that we have missed in the past (GUID, e.g.).
The superfluous constructors still have to be retained in the ABI,
because QBluetoothUuid is unfortunately exported wholesale. This
affects only the QString ctor. The other one was not in 6.5, and we
don't provide BC with pre-releases of Qt.
Add some variance to the fromString() tests now that we have
QAnyStringView instead of just QString.
Found in API-review.
[ChangeLog][QtBluetooth] QBluetoothUuid now provides all the
constructors that QUuid also provides (incl. from GUID and
QAnyStringView).
Pick-to: 6.6
Change-Id: I2cb76a9a9cbc47f2fd4e637bdb41233d1ffc6972
Reviewed-by: Ivan Solovev <ivan.solovev@qt.io>
|
| |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
We can actually write a body that works for both unsigned __int128 as
well as the legacy struct quint128, using QUuid::fromBytes(), so do
that.
This removes the need to keep a complex implementation behind the ABI
boundary, and thus allows to remove the function from the ABI so we
don't run into even more BiC problems once MSVC starts supporting
__int128, possibly with just a newer /std flag which, as per current
rules, isn't supposed to change the ABI.
Pick-to: 6.6
Change-Id: I1975cf68bc5f5421bf90f81a691ddf68bfa928dd
Reviewed-by: Ivan Solovev <ivan.solovev@qt.io>
|
| |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
It really shouldn't be out-of-line. We should allow the compiler to
see it as the no-op that it is.
As a drive-by, pre-program the signature to pass by value come Qt 7,
fixing a Clazy warning. We could already do it now, but since T and
const T& don't overload, we'd have to take out the QT6_NEW_OVERLOAD
bazooka, and it's not really worth it. When the code is inline, the
compiler can see through the pass-by-reference overhead and avoid
allocating the argument on the stack.
Pick-to: 6.6
Change-Id: Ic708bb9b2cacd4df22313b704de557dbda4d28fa
Reviewed-by: Alex Blasche <alexander.blasche@qt.io>
|
| |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
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>
|
| |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
This mimicks the new APIs of the same name in QUuid.
For QBluetoothUuid, this is wonderful news, because the old overloads
that lack the Endian parameter are now _always_ referring to the old
struct quint128, and are, as usual, defined in removed_api.cpp¹
¹ with the caveat that QT_NO_INT128 is defined there globally, which
may create problems for potential QT_REMOVED_SINCE(6, 7)s.
A solution would be to move this stuff out into a
compat/old_int128_api.cpp, but let's first get the 6.6 part done.
The new overloads are now either `unsigned __int128` (#ifdef
QT_SUPPORTS_INT128) or `struct quint128` (otherwise), never both, so
we don't need a second TU to do the overloading at the ABI level.
This leaves removed_api.cpp with its traditional role of dealing with
QT_REMOVED_SINCE (with the caveat mentioned above) and the
QT_SUPPORTS_INT128 handling is in qbluetoothuuid.{h,cpp}, where it
belongs.
This greatly simplifies the #ifdef'ery in all three files and allows
to do away with the "normal" vs. "not typical" QT_REMOVED_SINCE(6, 6)
section split.
Amends 5d90296f312f72ffa6a5322df7b565c3e5521684.
As a drive-by, fix missing Q_QDOC handling.
Pick-to: 6.6
Change-Id: I4ead4ee39533967a78c145ef222d9991fdf4cd98
Reviewed-by: Alex Blasche <alexander.blasche@qt.io>
|
| |
|
|
|
|
|
|
|
|
|
|
|
|
| |
Learn to love -Wswitch and avoid default case labels even at the cost
of having a few enumerator cases "too many". They help catch mistakes,
like, in this case, the missing handling of
QBluetoothUuid::CharacteristicType::WeightScaleFeature.
[ChangeLog][QtBluethooth][QBluetoothUuid] Fixed missing result of
characteristicToString(CharacteristicType::WeightScaleFeature).
Pick-to: 6.6 6.5 6.2 5.15
Change-Id: I04b7cf9ee058ef5a8d202fff01fb347d315562f6
Reviewed-by: Alex Blasche <alexander.blasche@qt.io>
|
| |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
We're considering remove the QUuid(quint12*) ctor in favor of the
"named" fromUInt128() ctor, so isolate the code against that by going
via the Id128Bytes ctor, which always exists.
This particular way of writing the code requires C++20/C99 designated
initializer support enabled in the compiler. It just so happens that
the only compiler that doesn't support __int128 (MSVC) also is the
only compiler that doesn't allow the use of designated initializers in
C++17 builds (because MSVC never implemented C99), only in C++20+
ones, so for the moment we're ok. If this becomes a problem, we can
rewrite the code.
Pick-to: 6.6
Change-Id: Ic4424ddad1a8a703e00b2ff3d9b45b07bb321fd0
Reviewed-by: Ivan Solovev <ivan.solovev@qt.io>
|
| |
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
The base class has it, so QBluetoothUuid also has to have it, too, for
API symmetry.
Adapt the docs to be more like QUuid's for the same function, even
though those may still be improved in qtbase (in which case we
shouldn't forget to re-sync them here).
Found in API-review.
Pick-to: 6.6
Change-Id: If13df1e7551235e2c9f57ba0e8729d7f2a6d494c
Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
|
| |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
are not supported
... to retain SC with prior Qt versions.
For QBluetoothUuid::toUInt128() this is done by introducing
an extra condition to the method declaration and definition.
If the 128-bit ints are not supported, we shouldn't hide the
method under QT_BLUETOOTH_REMOVED_SINCE.
The QBluetoothUuid(quint128) c-tor is a bit more tricky,
because we need to provide a forwarding c-tor to be able to
use QUuid(quint128) c-tor. And at the same time, we need
to keep BC by keeping the constructor that takes custom
struct quint128.
This is achieved by having an unconstrained c-tor declaration
and two implementations:
* an implementation in qbluetoothuuid.cpp is only available
when Qt supports 128-bit ints. It just forwards to the
QUuid c-tor.
* an implementation in removed_api.cpp serves as a backup
implementation to keep BC for the case when Qt supports
128-bit ints. And at the same time it serves as a main
implementation when 128-bit ints are not supported.
Also extend the unit-tests to explicitly check that both
APIs are available on all platforms.
The test additionally makes sure that QUuid::toUInt128() and
QBluetoothUuid::toUInt128() provide the result which is similar to
QUuid::toBytes(). This guarantees compatibility between platforms.
This commit amends 1e903be81f43da4e31385bb7866bb4d3f07e5eba.
Pick-to: 6.6
Change-Id: I6ba3ff6278e6db11a372b46f001429f4466520a0
Reviewed-by: Marc Mutz <marc.mutz@qt.io>
|
| |
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
The unit test fails to build without allowing a QBluetoothUuid to
be created explicitly from an 128-bit integer. Since the constructor
taking a quint128 has been removed from Qt 6.6, and since the
constructor from QUuid is explicit, we need to add a constructor from
the QUuid::Id128Bytes union type.
To avoid that QtCore/qtypes.h declares the quint128 typedef we have
to include all the headers that qtypes.h includes into removed_api.cpp
before undefining the __SIZEOF_INT128__ symbol.
Change-Id: If857faefc253dbbe6cf91bd13bdc31f31cdfb54e
Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
|
| |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
Only kept for in removed_api.cpp for binary compatibility.
[ChangeLog][QtBluetooth] The undocumented quint128 was removed from
QtBluetooth. This affects the QBluetoothUuid constructor and the
toUInt128() method. QUuid has support for an integer quint128 on certain
64-bit platforms (all except MSVC) with a constructor and a getter of
the same name, so this change is mostly source-compatible, so long as
the application code doesn't attempt to treat this type as a structure.
For cross-platform support, use QUuid::Id128Bytes.
Change-Id: Id8e48e8f498c4a029619fffd1728c34931ac525e
Reviewed-by: Qt CI Bot <qt_ci_bot@qt-project.org>
Reviewed-by: Ivan Solovev <ivan.solovev@qt.io>
|
| |
|
|
|
|
|
|
|
|
|
| |
Replace the current license disclaimer in files by
a SPDX-License-Identifier.
License files are organized under LICENSES directory.
Pick-to: 6.4
Task-number: QTBUG-67283
Change-Id: Ifc22d8ae24532e9a1093ca613ed6590a1992bc39
Reviewed-by: Jörg Bornemann <joerg.bornemann@qt.io>
|
| |
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
This reduces compilation time by avoiding repeated metatype
instantiations.
Can't pick to 6.3 or 6.2, because this introduces new exported
symbols.
As a drive-by: added missing QT_BEGIN/END_NAMESPACE macros
Fixes: QTBUG-102215
Change-Id: If76d768b9565a43071dc73a8e738269048db86cb
Reviewed-by: Qt CI Bot <qt_ci_bot@qt-project.org>
Reviewed-by: Alex Blasche <alexander.blasche@qt.io>
|
| |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
operator<< was changed to be a hidden friend in QtBluetooth.
Two properties of operator<< were desired:
First, it should be a hidden friend. This implies that
it is defined inline.
Second, its implementation should not part of the public interface.
To achieve both, an indirection and the static method
streamingoperator() were introduced.
This patch changes its name to streamingOperator() to
adhere to Qt's camelCase coding style.
Pick-to: 6.2
Change-Id: I4e01a81eac8261c5198cdb832c1345efbf647419
Reviewed-by: Alex Blasche <alexander.blasche@qt.io>
|
| |
|
|
|
|
|
|
|
|
| |
This patch changes all streaming operators in QtBluetooth
to hidden friends. Thereby, they can only be found through ADL,
not polluting the global namespace.
Fixes: QTBUG-91554
Change-Id: I757687ff177dc4d7efad53c9125ba4b6bfe2d950
Reviewed-by: Karsten Heimrich <karsten.heimrich@qt.io>
|
| |
|
|
|
|
|
|
|
|
| |
This patch changes all comparison operators in QtBluetooth
to hidden friends. Thereby, they are symmetric and can only
be found through ADL, not polluting the global namespace.
Fixes: QTBUG-91553
Change-Id: I4357dd3fee51beb86e68a9c7a01ea6b6c93f135f
Reviewed-by: Karsten Heimrich <karsten.heimrich@qt.io>
|
| |
|
|
|
|
|
|
|
|
| |
There is no reason to implement own version of dtor and copy ctor.
The above clazy rule was highlighted by a lot of internal
QBluetoothUuid usage.
Change-Id: I506aee1d633cfb52a6e565e9c328847ec506268f
Reviewed-by: Karsten Heimrich <karsten.heimrich@qt.io>
Reviewed-by: Andreas Buhr <andreas.buhr@qt.io>
|
| |
|
|
|
|
|
|
|
|
|
|
| |
QBluetoothUuid contains enums for ProtocolUuid, ServiceClassUuid,
CharacteristicType and DescriptorType. So far, they all
put their constants directly into the QBluetoothUuid
namespace, making it easy to mix them up. This patch changes
those to scoped enums. That way, each enum has its items in
its own namespace.
Change-Id: I86ea08ff31009dc8073d84cfe678e27920d693f7
Reviewed-by: Alex Blasche <alexander.blasche@qt.io>
|
| |
|
|
|
|
|
|
|
|
|
|
| |
Constexpr usage shifts the ctors to inline implementation. In addition,
the meta type registration has to be separated from the ctor
implementation. A global static variable takes care of this now.
This optimization speeds the ctor performance by factor 15.
Change-Id: I7443a84554611e6a0c857c1e295648fae1e858b5
Reviewed-by: Andreas Buhr <andreas.buhr@qt.io>
Reviewed-by: Oliver Wolff <oliver.wolff@qt.io>
|
| |\
| |
| |
| |
| |
| |
| | |
Conflicts:
examples/nfc/corkboard/corkboard.pro
Change-Id: I5d1ea0a8e21a1b55dbf744c2f4b469bc51f05c7a
|
| | |
| |
| |
| |
| |
| |
| |
| |
| | |
It highlights the optional curly braces and the connection to QUuid.
Task-number: QTBUG-52685
Change-Id: Iebfa84dc7f83fd2ef0aa02cb5e21b3f62de84d24
Reviewed-by: Timur Pocheptsov <timur.pocheptsov@theqtcompany.com>
Reviewed-by: Martin Smith <martin.smith@theqtcompany.com>
|
| |\ \
| | |
| | |
| | | |
Change-Id: If9cf6718cbd619dd7ce38db2da274fe9d0a41fb7
|
| | |/
| |
| |
| |
| |
| |
| |
| |
| |
| | |
From Qt 5.7 -> LGPL v2.1 isn't an option anymore, see
http://blog.qt.io/blog/2016/01/13/new-agreement-with-the-kde-free-qt-foundation/
Updated license headers to use new LGPL header instead of LGPL21 one
(in those files which will be under LGPL v3)
Change-Id: I856c13e2a6d4d12c46e1286b0ca1c092ee4608f8
Reviewed-by: Lars Knoll <lars.knoll@theqtcompany.com>
|
| |/
|
|
|
| |
Change-Id: I37942b9123116693c5b4cf6dd9d0747b7cfb2d06
Reviewed-by: Alex Blasche <alexander.blasche@theqtcompany.com>
|
| |\
| |
| |
| | |
Change-Id: I4404df69bfdac335e9c1eb63e4ada3ba89b48b6c
|
| | |
| |
| |
| |
| |
| |
| |
| |
| |
| | |
The QMetaType register my not be up and running by the time
we attempt these meta type registration.
Change-Id: I1a857a936a24b4b00a49574fac311c08c09b3d5a
Task-number: QTBUG-49455
Reviewed-by: Timur Pocheptsov <timur.pocheptsov@theqtcompany.com>
Reviewed-by: Alex Blasche <alexander.blasche@theqtcompany.com>
|
| |/
|
|
|
| |
Change-Id: Id3fe0f89966a60f2f34ff971ad26319e95de6ae9
Reviewed-by: Topi Reiniö <topi.reinio@digia.com>
|
| |
|
|
|
|
|
|
|
| |
The actual message was:
> warning: dereferencing type-punned pointer will break strict-aliasing
rules [-Wstrict-aliasing]
Change-Id: I70f30da77a925e50032c5a82014af2e1aee511fb
Reviewed-by: Alex Blasche <alexander.blasche@theqtcompany.com>
|
| |
|
|
|
|
| |
Change-Id: I7d5f9f8b9ad26ed607684c44e231eb0fcbcdc9ab
Reviewed-by: Christian Stenger <christian.stenger@theqtcompany.com>
Reviewed-by: Alex Blasche <alexander.blasche@theqtcompany.com>
|
| |
|
|
|
|
|
|
|
|
| |
- Use Linguist comments instead of disambiguating strings
for developer comments
- Add Linguist comments for some abbreviations
- Fix spelling.
Change-Id: I5887be7c7c5ef9197b5bde8b0b46ba68690af0ef
Reviewed-by: Alex Blasche <alexander.blasche@theqtcompany.com>
|
| |
|
|
|
| |
Change-Id: Icbbfe9cfb1e4187f2c043b85b8c0d19c9a82b6b9
Reviewed-by: Alex Blasche <alexander.blasche@theqtcompany.com>
|
| |
|
|
|
|
|
|
|
| |
Qt copyrights are now in The Qt Company, so we could update the source
code headers accordingly. In the same go we should also fix the links to
point to qt.io.
Change-Id: I3822a6484e8f7a420330de1cb1aeb0c3d1cf41b7
Reviewed-by: Sergio Ahumada <sahumada@texla.cl>
|
| |
|
|
|
|
| |
Change-Id: I02e4b3518c57e120d46fdcc427663a5910e01a97
Reviewed-by: Timur Pocheptsov <Timur.Pocheptsov@digia.com>
Reviewed-by: Alex Blasche <alexander.blasche@theqtcompany.com>
|
| |
|
|
|
|
| |
Change-Id: Id0ed9503da1cff66a04a83196cf61863289b98ab
Reviewed-by: Timur Pocheptsov <Timur.Pocheptsov@digia.com>
Reviewed-by: Alex Blasche <alexander.blasche@theqtcompany.com>
|
| |
|
|
|
|
| |
Change-Id: I57eff858c2e5700ac814d24fb173c269ebff5fd3
Reviewed-by: Timur Pocheptsov <Timur.Pocheptsov@digia.com>
Reviewed-by: Alex Blasche <alexander.blasche@theqtcompany.com>
|
| |\
| |
| |
| | |
Change-Id: I6c1eabeea1b3397803e285d13cef147220ff5aa4
|
| | |
| |
| |
| |
| |
| | |
Change-Id: Ie51d6e549d80baae57864d4e0d43a1c58897f149
Reviewed-by: Timur Pocheptsov <Timur.Pocheptsov@digia.com>
Reviewed-by: Topi Reiniö <topi.reinio@digia.com>
|
| |/
|
|
|
|
| |
Change-Id: I7010e36d6abed116dbf0a941109d61208d901951
Reviewed-by: Timur Pocheptsov <Timur.Pocheptsov@digia.com>
Reviewed-by: Alex Blasche <alexander.blasche@theqtcompany.com>
|
| |
|
|
|
|
| |
Change-Id: I50d818294cb53962bca2b08edbfdc4558890777c
Task-number: QTBUG-36775
Reviewed-by: Topi Reiniö <topi.reinio@digia.com>
|
| |
|
|
|
|
|
| |
This adds some valuable piece of information from the Bluetooth spec.
Change-Id: Idb0211e23a3fc03674f7878eaebea9c529dbd69d
Reviewed-by: Topi Reiniö <topi.reinio@digia.com>
|
| |
|
|
|
|
|
| |
The change improves the performance between 8-10%.
Change-Id: I342e669d3f18cd2179b65f1af172db52303ff44c
Reviewed-by: Aaron McCarthy <mccarthy.aaron@gmail.com>
|
| |
|
|
|
|
|
|
|
| |
- Renamed LICENSE.LGPL to LICENSE.LGPLv21
- Added LICENSE.LGPLv3 & LICENSE.GPLv2
- Removed LICENSE.GPL
Change-Id: I7a8b8b787fcae9a178794364efdefe1021d10b1b
Reviewed-by: Alex Blasche <alexander.blasche@digia.com>
|
| |
|
|
|
| |
Change-Id: I65d28f43862e95258c3115b79de839b884966119
Reviewed-by: Leena Miettinen <riitta-leena.miettinen@digia.com>
|
| |
|
|
|
|
|
| |
This improves conversion performance.
Change-Id: Ib78b2a6e24d0f44723be0bfb63b6aafc965188a6
Reviewed-by: Fabian Bumberger <fbumberger@rim.com>
|
| |
|
|
|
|
|
|
|
| |
Also, this patch fixes the uninitialised m_type member in the
QLowEnergyDescriptorInfo private implementation
Change-Id: I6736d5f38738490bc4f0f53908f925361f1843bd
Reviewed-by: Lars Knoll <lars.knoll@digia.com>
Reviewed-by: Alex Blasche <alexander.blasche@digia.com>
|
| |
|
|
|
|
|
|
|
|
|
| |
- Sort enum values based on their hex values
- Add QBluetoothUuid::characteristicToString(CharacteristicType)
- Rename QBluetoothUuid::CharacteristicDescriptor -> DescriptorType
- Add a couple of missing \since tags
Change-Id: I9724eb2f43c6978f07420bf6ec4c8557ad9efbaf
Reviewed-by: Lars Knoll <lars.knoll@digia.com>
Reviewed-by: Alex Blasche <alexander.blasche@digia.com>
|
| |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
1. QLowEnergyDescriptorInfo::type() added
2. QLowEnergyDescriptorInfo ctor signature modified
3. QBluetoothUuid::DescriptorId enum renamed
4. QLowEnergyDescriptorInfo::uuid() changed its meaning
5. QBluetoothUuid(CharacteristicDescriptor) ctor added
Starting from this change QNX is going to be broken. In particular
point 2 cause breaks or bug. The focus is on santizing the API at
this point in time.
Change-Id: I7838f550410b6a0f94026b68ecf0751533eba3cb
Reviewed-by: Lars Knoll <lars.knoll@digia.com>
Reviewed-by: Alex Blasche <alexander.blasche@digia.com>
|
| |
|
|
|
| |
Change-Id: I83a99666b8b16ae80ad7712785ee294cb340add1
Reviewed-by: Fabian Bumberger <fbumberger@rim.com>
|
| |\
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| | |
Conflicts:
examples/bluetooth/bluetooth.pro
src/bluetooth/bluez/bluez.pri
src/bluetooth/doc/src/bluetooth-index.qdoc
src/bluetooth/qbluetoothdevicediscoveryagent_bluez.cpp
src/bluetooth/qbluetoothdeviceinfo.cpp
src/bluetooth/qbluetoothservicediscoveryagent_bluez.cpp
src/bluetooth/qbluetoothservicediscoveryagent_p.h
src/bluetooth/qbluetoothservicediscoveryagent_qnx.cpp
Change-Id: I88b22c51a4ee95b067ef8d2b2fddb5cbff4566f8
|