`git-review` is a command line tool for interacting with Gerrit.
Some IDEs offer support for this tool, either natively or through
plugins. The tool relies on a configuration file, .gitreview. Adding
this configuration file to our repositories simplifies initial setup
for contributors that use the tool directly or through their IDE of
choice.
The configuration file adds a remote called 'gerrit'. This is the
default for the tool, and also the name set for
codereview.qt-project.org by Qt's `init-repository` script. Thus,
the configuration should work seamlessly alongside other repository
helpers.
Task-number: QTBUG-132604
Pick-to: 6.9 6.8
Change-Id: Ic14f4ac93dae34701e2a35b1802ab2d7b740985e
Reviewed-by: Samuel Gaist <samuel.gaist@idiap.ch>
1/
A QStringList and an int are not a faithful representation of a KDE
Theme, so the ctor should be explicit. Make it so™.
2/
As a polymorphic class, the (undeclared, therefore inline) dtor may
cause weak vtables to be emitted, with all the bad side-effects
described in the docs of -Wweak-vtable and QTBUG-45582. Mark the dtor
out-of-line in the usual way (= default'ing, but in the .cpp file).
Amends 53fb13456fffe8bfd192f9197c6d1703854b49a2.
Task-number: QTBUG-45582
Task-number: QTBUG-132929
Task-number: QTBUG-135037
Change-Id: Ie0c14e60d76d2205c2025598ac31a917dbf870b1
Reviewed-by: Axel Spoerl <axel.spoerl@qt.io>
Simplifies the code and avoids unnecessary indirections.
It's done in a quirky way with a d member with operator->() to mostly
preserve Git history.
Change-Id: I0989ef9b4cd7a620c891fffdb521d4280896d275
Reviewed-by: Tor Arne Vestbø <tor.arne.vestbo@qt.io>
Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
This class doesn't have signals or slots, so it doesn't need to depend
on QObject.
Change-Id: Ie4d7f47c659f4319abb6fffd181973fbb3a91ff3
Reviewed-by: Tor Arne Vestbø <tor.arne.vestbo@qt.io>
Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
The previous commit ensured we did delete the instances of regular,
dynamic plugins when this QFactoryLoader went out of scope. This commit
repeats the same technique for the staticplugins.
Change-Id: Ic9ff94cf7a6de95c63fbfffd30b8a418c211e824
Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
Reviewed-by: Tor Arne Vestbø <tor.arne.vestbo@qt.io>
We just left everything for QLibraryStore::cleanup() to do when that ran
at QtCore unload time. Which is certainly weird because that meant no
other library could be unloaded if it was a dependency of a plugin we'd
loaded. Now, this should allow the libraries to start unloading before
QtCore, when the Q_GLOBAL_STATICs holding the QFactoryLoaders get
destroyed by ::exit().
This also explicitly deletes the instances in each of those dynamic
plugins, otherwise they may remain around and cause crashes later. This
is not done for instances coming from staticplugins - see next commit.
Change-Id: I752d41069e192c7be4a0fffd5ab0a253108b0b0c
Reviewed-by: Fabian Kosmale <fabian.kosmale@qt.io>
Reviewed-by: Tor Arne Vestbø <tor.arne.vestbo@qt.io>
We already move the instances coming from dynamic plugins, but for some
reason we don't for the ones coming from staticplugins. There's no hint
about it in the history; my guess is it was simply forgotten when the
staticplugins were added.
This necessitated extending the mutex lock over the staticplugin list
scan so we'd reach the QObject::moveToThread() call too.
Change-Id: Ibe0107a9daf46792b09efffd9a7d9c45214aa589
Reviewed-by: Tor Arne Vestbø <tor.arne.vestbo@qt.io>
Since the label of a progressbar is drawn right of the bar, it does not
make sense to draw a label for vertical bars. This is consistent with
windows and windowsvista style.
Pick-to: 6.9 6.8
Fixes: QTBUG-132459
Change-Id: I6610a1ef1b4074a6301aac12928c1dfe99ffd457
Reviewed-by: Wladimir Leuschner <wladimir.leuschner@qt.io>
Older CMakes error out with
CMake Error at cmake/QtSyncQtHelpers.cmake:156 (list):
list sub-command REMOVE_ITEM requires two or more arguments.
if the last expanded variable is empty.
Fix by doing an explicit non-emptiness check.
Amends e7834e90f38891382f830da7700f00ebd81f21a8
Pick-to: 6.8 6.9
Task-number: QTBUG-134672
Task-number: QTBUG-128730
Change-Id: I3c355a02519c2c450235770b2ff8c92416615a9f
Reviewed-by: Alexey Edelev <alexey.edelev@qt.io>
Initialize them as part of the base-class constructor rather than
through an explicit init-call.
Coverity-Id: 478630
Change-Id: Ibd97630418650f72668be20ca3cff7f24eec8387
Reviewed-by: Volker Hilsheimer <volker.hilsheimer@qt.io>
Qt relies internally on connections to the destroyed() signal of
application-objects, for example to clean up accessibility interface
implementations or other data structures that would otherwise grow or
hold danging pointers.
The QObject::disconnect function is already documented to be potentially
dangerous, as a wildcard call (with signal, receiver, and method
defaulted to nullptr) will disconnect everything. However, what happpens
to work in one Qt release might break things in another if we add code
that relies on connections to destroyed().
To make users aware of the danger of a wildcard disconnect call, and to
help with fixing the issues that might arise, emit a warning when a
wildcard disconnect() breaks an existing connection to the sender's
destroyed() signal.
Do this while we hold the connection mutex, and only if all parameters
to the disconnect() call are wildcarded. This happens very rarely, and
should never happen in performance critical code.
Fix the only test I found emitting this warning due to a wildcard
disconnect (the drag'n'drop subsystem relies on the destroyed signal).
Store the only relevant connection instead so that we can disconnect
when done.
Fixes: QTBUG-134610
Pick-to: 6.9 6.8
Change-Id: I9e6dcade0d5572345b71e3e8f06902bbea1ef89a
Reviewed-by: Fabian Kosmale <fabian.kosmale@qt.io>
The combined icu.dll was only made part of the OS in Windows 10 1903.
Since we still support 1809, we cannot rely on it.
The old API unfortunately also requires explicit initialization /
deinitialization of COM with CoInitializeEx / CoUninitialize. Make sure
that initialization happens in the current thread by calling the
qt_win_ensureComInitializedOnThisThread() helper function in relevant
code paths.
Fixes: QTBUG-134540
Pick-to: 6.9 6.9.0
Change-Id: I01677ccc8bfd3780267e3c788295d4ac2b0ed93c
Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
This adapts a pattern first introduced for qtmultimedia (7398c5daa9).
Pick-to: 6.9 6.9.0
Change-Id: I4682fcf49fe074c55b4a70a1e1ec659b33b31bbb
Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
removed_api.cpp included qabstractitemmodel.h unconditionally.
Wrap it in #if QT_CONFIG(itemmodel)
As a drive-by, add the missing blank line after the initial
#if QT_CORE_REMOVED_SINCE(6, 8)
Amends cbda9583521633fa6e8a9274d2e47aa14c8bd175.
Pick-to: 6.9 6.8
Change-Id: I6888d9a76078a2473a0a8f063cf8b93ac3025385
Reviewed-by: Marc Mutz <marc.mutz@qt.io>
Manage the HostInfo variable prefix the correct way. The prefix
takes the HostInfo PROJECT_VERSION_MAJOR as the version specifier,
which is not necessary is the same as the PROJECT_VERSION_MAJOR
of the project that uses respective API. Instead of relying on the
current PROJECT_VERSION, use the version info stored in HostInfo
package and adjust the prefix accordingly. This will allow version
mismatching between the project that uses API and HostInfo version.
Change-Id: Idbaec1c7bb203448ceb0f15c9173ad3985c7112d
Reviewed-by: Alexandru Croitor <alexandru.croitor@qt.io>
Generate and install the HostInfoConfigVersion file for the
HostInfo package. The package had no strict version compatibility
as Qt modules before, so we avoid adding them here too.
Pick-to: 6.5 6.8 6.9
Change-Id: Iaee43639dd87d911946c8ce72c4849f43599d08e
Reviewed-by: Alexandru Croitor <alexandru.croitor@qt.io>
QFuture is tricky in the sense that it can store multiple results.
The users might write the code like:
QList<int> values{1, 2, 3};
auto f = QtConcurrent::mapped(values, func)
.then([](auto val) { otherFunc(val); });
with the expectation that the lambda will be called on each mapped
value of the original input container.
However, that is not true. QtConcurrent::mapped() returns a QFuture
which has multiple results, and in this case only the first result will
be passed to the then() continuation.
We cannot detect this problem at compile-time, because we do not know
how many results will the QFuture hold. So, add at least a runtime
warning.
The warning is added in a new logging category, so that the users who
really need this behavior can disable it. The warning is implemented
as an exported out-of-line method for two reasons:
* To avoid code duplication for each template parameter of
CompactContinuation.
* To avoid exposing a Qt-specific logging category into a public header.
Such design, however, prevents us from cherry-picking the change to
older branches.
Fixes: QTBUG-133522
Change-Id: I3344b5228b50e9c9d68d0c57961bbc969f566bb9
Reviewed-by: Mårten Nordheim <marten.nordheim@qt.io>
Explain that the continuation should take QFuture<T> as a parameter in
order to be able to access all results.
Add notes with examples to the QtConcurrent::mapped and
QtConcurrent::filtered overviews.
Task-number: QTBUG-133522
Pick-to: 6.9 6.8 6.5
Change-Id: I65655aadc8d4623b147d22a9bf9b2189c80b14c5
Reviewed-by: Edward Welbourne <edward.welbourne@qt.io>
Reviewed-by: Mårten Nordheim <marten.nordheim@qt.io>
If the item at index is an associative container, then we can operate
directly on that container. Otherwise, call the base class
implementation.
In contrast to the default implementation, the setItemData
implementation is transactional: nothing will be written to a multi-role
storage unless all entries could be written.
Change-Id: I883c647dac82b3a068afd77b36c245525d59b44b
Reviewed-by: Artem Dyomin <artem.dyomin@qt.io>
Row types that are convertible to bool, such as pointers, but also
unique_ptr and similar wrappers, should not be dereferenced when
accessing values for reading or writing. This is already done implicitly
when operating on single-value types, but for tuples we have to do so
explicitly, before accessing the element.
For example, inserting a row where the row type is a pointer will leave
that row be nullptr in the range, and both data and setData should fail
until a row has been constructed. For rows that are pointers to tuples,
we must never call get<>, as get cannot test if the item received is a
nullptr and still return a valid value (reference).
Since e.g. unique_ptr is explicitly convertible to bool we have to use
std::is_constructible rather than is_convertible, as the latter only
works for types that are implicitly convertible.
Change-Id: I9dbdf6e5cac0146ed5d1b88c523e182590b0c8ab
Reviewed-by: Artem Dyomin <artem.dyomin@qt.io>
The result of QStyleFactory::create() must be deleted by the caller.
Some test functions stored it in a QScopedPointer, while others
didn't, each causing a leak of a QWindowsStyle object.
DRY the test functions (except the one that checks that 'delete
widget.style();' works) by introducing an owning pointer at the test
class level, to be reused by test functions. This is not so much for
caching the object across test functions (though this is a nice
benefit, too), but in order to keep the owning pointer out of the test
functions, and allow most functions to just do
setStyle(deterministicStyle()).
Found by ASAN.
On my machine, this test is now ASAN-clean, except a) the usual
cp-demangle.c leak and b) destroyedSignal(), which still leaks.
As a drive-by, pass a QStringLiteral instead of QL1SV to
QStyleFactory::create() and port one QVERIFY( != ) to QCOMPARE_NE().
No amends, it'd be too many. Not picking back far, because others
don't care, and I expect lots of conflicts when backporting, due to
many different amended commits.
Pick-to: 6.9
Change-Id: Ie9e7faf21bc177e08af56c659dc58870ad3cf6ff
Reviewed-by: Volker Hilsheimer <volker.hilsheimer@qt.io>
Since the introduction of QPageRanges with Qt6, multiple/arbitrary page
ranges are broken in the unix implementation of QPrintDialog due to a
possible double application of the page ranges: on the application side
and on the server side with CUPS. Reason for this is that the
QPrinter::PrintRange is set to PageRange instead of AllPages.
The latter is needed when relying on the CUPS server-side page range.
However, the server-side page range is always applied later on.
Restore the behavior of Qt5 and set the PrintRange to AllPages for
multiple/arbitrary page ranges and rely on the server-side filtering
with CUPS.
Pick-to: 6.9 6.8
Change-Id: I1b85552a8cf2509b11a81db028f957584043f3ee
Reviewed-by: Albert Astals Cid <aacid@kde.org>
Reviewed-by: David Faure <david.faure@kdab.com>
The code comment above the cast is correct, but the code wasn't: While
we're receiving the result of the cast in a QDialog pointer, the cast
is still to QMessageBox*, and whether that cast is in the Q_Q macro or
not doesn't change the fact that it's invalid.
Says UBSan:
qmessagebox.cpp:2804:31: runtime error: downcast of address 0x7ffebfd87140 which does not point to an object of type 'QMessageBox'
0x7ffebfd87140: note: object is of type 'QDialog'
2b 7f 00 00 30 94 57 b9 2b 7f 00 00 80 8c 00 00 90 61 00 00 08 96 57 b9 2b 7f 00 00 00 00 d8 bf
^~~~~~~~~~~~~~~~~~~~~~~
vptr for 'QDialog'
The trivial fix is to cast only to QDialog.
Amends 29b2506e8cf0c792821a3ddb28e62080cd66ae28.
Pick-to: 6.9 6.8
Change-Id: Ia3f6c08b62f6bed274f43baab881a0d802bd986b
Reviewed-by: Thorbjørn Lund Martsum <tmartsum@gmail.com>
The windows vista style modifies the palette for a QCommandLinkButton to
match the vista style. For windows11 we simply use the same color as for
a normal button so no need to modify the palette is needed.
Since the vista style does not reset the palette on style change, the
wrong color is still used in the widgetsgallery example when switching
from vista to win11 (or fusion).
Pick-to: 6.9 6.8
Task-number: QTBUG-130480
Change-Id: I963215295ee1d2e483b5b58045752474c920c64b
Reviewed-by: Oliver Wolff <oliver.wolff@qt.io>
Reviewed-by: Wladimir Leuschner <wladimir.leuschner@qt.io>
If the range used with QGenericItemModel contains associative containers
that map from Qt::ItemDataRole, int, or QString to QVariant, then we
interpret such values as multi-role items, and look up the respective
value for the role requested.
Add test coverage and documentation.
This change does not implement QAbstractItemModel::itemData/setItemData.
Change-Id: I00aa8da9369a20ea4ddb58bb24c45fef9465b33f
Reviewed-by: Artem Dyomin <artem.dyomin@qt.io>
QAIM::createIndex() takes a const void* pointer, so we don't need to
const_cast the const away.
Amends the start of the public history.
Picking all the way back, because I'm hunting a memleak here, and
can't say, yet, whether these lines need to be modified or
not. Besides, this change is 100% safe: either it compiles and works
as before or it doesn't compile. There is no silent breakage possible.
Pick-to: 6.9 6.8 6.5 5.15
Change-Id: I2f9284540beed9d1ab027ac1e24f1c527537e122
Reviewed-by: Robert Löhning <robert.loehning@qt.io>
Reviewed-by: Volker Hilsheimer <volker.hilsheimer@qt.io>
Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
Since Qt associative containers don't have the same iterator API as
their std equivalents, generic access to the key/value pair of a
container will be useful when adding support for multi-role storage
types and sparse tables.
Change-Id: I409e94485257982ac8a231f9bffd791a53867968
Reviewed-by: Volker Hilsheimer <volker.hilsheimer@qt.io>
Using Q_DECLARE_OPAQUE_POINTER means that the metatype system won't have
any knowledge about the type, beyond it being a pointer. That leads to
all kinds of unexpected errors in code that needs to introspect the
meta-type information to handle QObject's and gadgets, notably but not
limited to QML.
Warn about using Q_DECLARE_OPAQUE_POINTER for gadgets and QObject's, and
offer Q_MOC_INCLUDE as a potential alternative for some use cases.
Pick-to: 6.9 6.8 6.5
Task-number: QTBUG-127012
Task-number: QTBUG-134883
Change-Id: I4fe53f277d0aa51ef552d04f642364aa6613ef7c
Reviewed-by: Marc Mutz <marc.mutz@qt.io>
Reviewed-by: Leena Miettinen <riitta-leena.miettinen@qt.io>
WorkerThread needs an explicit constructor, otherwise
WorkerThread *workerThread = new WorkerThread(this);
will fail. While at it, at some infrastructure code so that the
.cpp file actually compiles.
Pick-to: 6.9
Change-Id: I35835b1be3da2a1f75222594197f6013b41a7b4a
Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
Don't confuse the next person working on this code.
Pick-to: 6.9 6.8
Change-Id: I3f9ff59299a4150a96cc11d851d06539a5701a70
Reviewed-by: Tor Arne Vestbø <tor.arne.vestbo@qt.io>
QGenericItemModel provides a QAbstractItemModel implementation that can
make any C++ range with a cbegin/cend iterator pair available to Qt's
model/view framework.
To avoid subclassing a polymorphic type with a template, resulting
in weak vtables, the calls are dispatched through a set of static
helpers similar to existing pattern in e.g. QObject or QRunnable.
The public QGenericItemModel class is then a subclass of
QAbstractItemModel, where only the constructor is a template that
instantiates the specialization of QGenericItemModelImpl. The virtual
function overrides dispatch the call through the static helper to the
template class operating on the range.
The core of the implementation is the template class
QGenericItemModelImpl, that implements the QAbstractItemModel
functionality on top of iterator APIs. Implementations that are
specific to the structure of the model, i.e. whether it is a flat table
or list model, or (in a later commit) a tree, are in a base class of
QGenericItemModelImpl, QGenericItemModelStructureImpl. It uses CRTP
with decltype(auto) where we would otherwise have a return type that
is dependent on the (not yet fully specialized) implementation type.
The data for the model can be provided by copy, rvalue reference, or
pointer. If provided by pointer, the model will modify the original
data. Functionality that requires that the model itself, or the data
in the model, can be modified is compiled out if the model or data
is const.
The initial implementation supports lists and tables, where tables can
be nested containers (like `std::vector<std::vector<item_type>>`), or
as structs that implement the C++ tuple protocol.
Include test framework and documentation, as well as a snippet-project
that tests the code snippets.
[ChangeLog][QtCore] Added QGenericItemModel, a QAbstractItemModel
implementation that make any C++ range with a cbegin/cend iterator pair
available to Qt's model/view framework.
Change-Id: I8ff2b95cde2566f422f3aee7912660a8cb217397
Reviewed-by: Artem Dyomin <artem.dyomin@qt.io>
The theme stores an array of pointers to allocated QFonts, which need to
be freed.
While this is not a "hard" leak (the OS will clean up the memory on
shutdown, and QKdeTheme lives as long as the application), it creates
ASAN warnings, which distract from more severe issues.
Change-Id: Iaa57138e5273c300c616ba85340283f18a267b09
Reviewed-by: Piotr Wierciński <piotr.wiercinski@qt.io>
To suppress clang-tidy's
bugprone-pointer-arithmetic-on-polymorphic-object
because we store a dynamically allocated array of
QHttpNetworkConnectionChannel objects in QHttpNetworkConnectionPrivate
and index into this all over the code.
Pick-to: 6.9 6.8
Change-Id: Ibcdf7c8acc4a57eaf36bca3719733655053ac818
Reviewed-by: Marc Mutz <marc.mutz@qt.io>
Reviewed-by: Mate Barany <mate.barany@qt.io>
The related functionality meant to be enabled by BuildInternals, which
makes the lookup of the pre-defined HostInfo version based on either
calculated or pre-defined INSTALL_CMAKE_NAMESPACE.
The PROJECT_VESION(_MAJOR) meanwhile is hardcoded by the current Qt
repo, which is not necessary aligned with BuildInternals/HostInfo.
Pick-to: 6.5 6.8 6.9
Change-Id: I61052c93ce2d6ee3c6d8025da2e078edcde48d0d
Reviewed-by: Alexandru Croitor <alexandru.croitor@qt.io>
Avoid hardcoding the HostInfo package version, use the
INSTALL_CMAKE_NAMESPACE as the reference for the find_package calls.
If we assume that the package follows the versioning in the future,
we should consider the Qt version, to avoid any version related
issues.
Pick-to: 6.5 6.8 6.9
Change-Id: If84550ab82f8de51ff5af41c7f31838c4ed53a67
Reviewed-by: Alexandru Croitor <alexandru.croitor@qt.io>
Some VxWorks touch device drivers return improper value of min and max
ranges in both axes (both 0 for both axes). This makes any touch point
position equal to (0, 0), making touch unusable in Qt.
[ChangeLog][Platform Specific Changes][VxWorks] The user can now
override touch ranges that the driver returns, by setting the
new parameters "rangex" and "rangey" on the environment variable
QT_QPA_VXEVDEV_TOUCHSCREEN_PARAMETERS with comma-separated
min and max touch ranges for X and Y axis respectively.
For example, add rangex=10,815:rangey=15,1024
Pick-to: 6.9
Task-number: QTBUG-115777
Change-Id: I4f4aba7ee66e76b80438888697f84c4db9896c3d
Reviewed-by: Shawn Rutledge <shawn.rutledge@qt.io>
Coverity complained that the default ctor didn't initialize its two
members. This is true, and it even remains true if the user of the
type explicitly asks for value-initialization (ChangeSignal s = {}) as
opposed to default-construction (ChangeSignal s;).
Remove the default ctor as the minimally-possible fix. It was only
needed because of a call to QFlatMap::value(1-arg), which,
incidentally, constitutes a double-lookup, because it is following a
contains() call. Replacing that combo with find() and it.value()
avoids the double-lookup and removes the need for the type to be
default-constructible.
Amends 0328e4297e339de8a2acd84979c667936f6fadf8.
Coverity picked this up as a new issue following
53fb13456fffe8bfd192f9197c6d1703854b49a2, so there probably is another
CID for this for the same code in the old location, but my Coverity
search-foo is insufficient to find the corresponding CID, without
undue effort, so I didn't try.
Coverity-Id: 478089
Pick-to: 6.9 6.8 6.5
Change-Id: I912bf2af343b98fe62faf2d4bf8a6d1f385593e8
Reviewed-by: Giuseppe D'Angelo <giuseppe.dangelo@kdab.com>
Reviewed-by: Axel Spoerl <axel.spoerl@qt.io>
Coverity complains that the binary search algorithm can yield high =
32, which, when passed to primeForNumBits(), will overflow
prime_deltas[]. This is true, for negative 'count', or, more general,
if the MSB of 'count' is set.
Add a Q_ASSERT(count >= 0) to inform Coverity (and other readers of
the code) that this function is only expecting non-negative arguments.
Amends 4adf5e1a9ef4fe78f4b70b7462943246903f4f11, which didn't fully
solve the issue, at least not as far as Coverity is concerned.
Pick-to: 6.9 6.8 6.5
Coverity-Id: 11295
Task-number: QTBUG-134543
Change-Id: I994dd1d1850c6644188a9fc0b83973614dd51e6b
Reviewed-by: Laszlo Agocs <laszlo.agocs@qt.io>
Writing "adjusted()" would have produced a link automatically, but
since an argument is present, the function name is not a link. Add it
manually. Omit the parentheses and the argument, because that's how
QDoc renders "adjusted()", too (only the function name is the link).
Amends 1aa4ad46e4878072be9acb8389572e7f9e8198df.
Pick-to: 6.9 6.8 6.5 5.15
Change-Id: I350a277f91e486256ca014e554beea3348b6ca96
Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
[ChangeLog][QtCore][QCborValue] Fixed conversions from QVariant when the
variant contained long, unsigned long, or qfloat16.
[ChangeLog][QtCore][QJsonValue] Fixed conversions from QVariant when the
variant contained long, unsigned long, or qfloat16.
Pick-to: 6.9 6.8
Fixes: QTBUG-134756
Change-Id: I08d069dd639c0fc5a15afffd4067762ec94d606d
Reviewed-by: Marc Mutz <marc.mutz@qt.io>
Which will use the actual spaceship operator if Qt is compiled in C++20
mode. Hopefully this will generate better code than the explicit
content, especially for floating point types, because the compiler
recognizes the <=> operator.
Change-Id: I1313aafe7ca105eca510fffd46e1d1932a0943bc
Reviewed-by: Marc Mutz <marc.mutz@qt.io>
Needed to make some conversions explicit, since you can't assign to a
qfloat16 from double.
[ChangeLog][QtCore][QVariant] Implemented converting of qfloat16 to and
from the other numeric types, text conversions to and from QString and
QByteArray, and conversions to and from QJsonValue and QCborValue. This
should make qfloat16 behave the same as float and double.
Also flip the order of arguments in one of the addComparePairs(): left
side is actual, right side is expected. I noticed on the copy & paste
to do the qfloat16 above it.
Pick-to: 6.9 6.8
Task-number: QTBUG-134756
Change-Id: I6a6c469d21746a07c18efffd6b3b961c73c0e2f2
Reviewed-by: Marc Mutz <marc.mutz@qt.io>
No-op change. All this does is explicitly wrap the right side of the
expression in a double() function-style cast.
Pick-to: 6.8 6.9
Change-Id: I84bc14bf75b4d0a046dcfffd19f318eaf7fe0e9f
Reviewed-by: Marc Mutz <marc.mutz@qt.io>
Reviewed-by: Fabian Kosmale <fabian.kosmale@qt.io>