Commit Graph

10726 Commits

Author SHA1 Message Date
Lars Knoll
048debe8f9 Restrict QVariant::isNull() behavior
isNull() would forward to the contained type and check that type's
isNull() method for some of the builtin types. Remove that behavior
and only return true in isNull(), if the variant is invalid, doesn't
contain data or contains a null pointer.

In addition, implement more consistent behavior when constructing
a QVariant using the internal API taking a copy from a void *.
isNull() should return true in both cases. This mainly changes behavior
for some corner cases and when using our internal API.

[ChangeLog][Important Behavior Changes] QVariant::isNull()
no longer returns true when the variant contains an object of some
type with an isNull() method, that returns true for the object;
QVariant::isNull() now only returns true when the variant contains
no object or a null pointer.

Change-Id: I3125041c4f8f8618a04aa375aa0a56b19c02dcf5
Reviewed-by: Fabian Kosmale <fabian.kosmale@qt.io>
2020-08-13 08:48:32 +02:00
Lars Knoll
4a69cd7f72 Restrict comparison of variants
Comparing two variants will not try to convert the types
of the variant anymore. Exceptions are when both types are
numeric types or one type is numeric and the other one a
QString. The exceptions are there to keep compatibility with
C++ and to not completely break QSettings (which needs automatic
conversions from QString to numeric types).

[ChangeLog][Important Behavior Changes] Comparing two
variants in Qt 6 will not try attempt any type conversions before
comparing the variants anymore. Instead variants of different type
will not compare equal, with two exceptions: If both types are numeric
types they will get compared according to C++ type promotion rules. If
one type is a QString and the other type a numeric type, a conversion
from the string to the numeric tpye will be attempted.

Fixes: QTBUG-84636
Change-Id: I0cdd0b7259a525a41679fb6761f1e37e1d5b257f
Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
2020-08-13 08:48:19 +02:00
Lars Knoll
50c96c17b6 Use the new support for comparisons in QMetaType for QVariant
Remove the compare method in the QVariant::Handler struct. Rely
on the generic support provided by QMetaType instead.

[ChangeLog][Important Behavior Changes][QVariant] QVariant will now use builtin support in
QMetaType to compare its content. This implies a behavioral change
for some graphical types like QPixmap, QImage and QIcon that will
never compare equal in Qt 6 (as they do not have a comparison
operator).

Change-Id: I30a6e7116c89124d11ed9052537cecc23f78116e
Reviewed-by: Edward Welbourne <edward.welbourne@qt.io>
2020-08-13 08:48:03 +02:00
Thiago Macieira
99ce02f692 QCborValue: add support for QCOMPARE string output
Change-Id: Ibdc95e9af7bd456a94ecfffd16066c47ea9766d0
Reviewed-by: Ulf Hermann <ulf.hermann@qt.io>
Reviewed-by: Edward Welbourne <edward.welbourne@qt.io>
2020-08-12 21:05:06 -07:00
Ulf Hermann
3e25d09b08 QDecompressHelper: Change order of encodings
Before the introduction of QDecompressHelper gzip was preferred over
deflate. The change seems to be accidental. Amends commit
7b76379a89.

Change-Id: I70f33d551912465d63f49ea3db1ac3575d19a92d
Reviewed-by: Mårten Nordheim <marten.nordheim@qt.io>
2020-08-12 08:27:09 +00:00
Thiago Macieira
e790af0e0a QJsonDocument: fix comparison of valid vs default
[ChangeLog][QtCore][QJsonDocument] Fixed a bug that caused
QJsonDocument's equality operator to crash if one of the operands was
default-constructed and the other wasn't.

Pick-to: 5.15
Fixes: QTBUG-85969
Change-Id: I5e00996d7f4b4a10bc98fffd1629f835f570ef6b
Reviewed-by: Sona Kurazyan <sona.kurazyan@qt.io>
2020-08-11 13:00:47 -07:00
Laszlo Agocs
a99cee1c7b Remove old CBOR-based format from QShader
We only support version 4 and 5 in Qt 6.0. 1 and 2 are already gone
(due to being based on binary JSON), now we remove 3 as well.

Task-number: QTBUG-81346
Change-Id: I3627dcc0587f1e36f11e93edf7172889e911d64e
Reviewed-by: Andy Nichols <andy.nichols@qt.io>
2020-08-11 13:45:09 +02:00
Edward Welbourne
fed97b9264 Sort out the overflow cases in tst_QDateTime
Use the actual minimum value, rather than minus the maximum, and adapt
the overflow expectations so that they're correct west of Greenwich as
well as east.

Change-Id: I7a5f4510db0fdea3855b5b2bd4c4a86882030efd
Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
2020-08-11 11:21:46 +02:00
Edward Welbourne
72d14fe32f Fix handling of last second in 1969
Due to a limitation of mktime(), we would have declared it invalid.
Tidied up qt_mktime() slightly in the process.

Change-Id: I25469e314afee6e0394e564bc69a98883005d4ec
Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
2020-08-11 11:20:43 +02:00
Fabian Kosmale
7b3a2f5e3d cmake support for tst_moc
We use qt_wrap_cpp instead of AUTOMOC so that we can easily find the
json files.
Getting autorcc to run only after json file has been generated was
deemed too tricky.  Therefore the test is slightly modified to check for
the json files in its directory instead of the resource, if the qrc file
does not exist.

Change-Id: Id1aabb117c8bab3ff81156da1f66d64e796bf18b
Reviewed-by: Qt CI Bot <qt_ci_bot@qt-project.org>
Reviewed-by: Alexandru Croitor <alexandru.croitor@qt.io>
2020-08-10 12:59:46 +02:00
Edward Welbourne
fe6a1d34dc QFileInfo: purge deprecated API
Since 5.10: created()
Since 5.13: readLink()

Change-Id: I9722f81750dd92315a67a1c38df41a95ae63e0db
Reviewed-by: Lars Knoll <lars.knoll@qt.io>
2020-08-07 17:44:51 +02:00
Edward Welbourne
5a682b04ce Purge QResource of some deprecated API
Removed isCompressed(), deprecated since 5.15, and (since 5.13)
addSearchPath() and searchPath().

Change-Id: I4b6fb8077c02bbe322334e474eaf0a2a7caf0004
Reviewed-by: Lars Knoll <lars.knoll@qt.io>
2020-08-07 17:44:13 +02:00
Edward Welbourne
7ce27430a7 tst_QStringConverter: fix some deprecation warnings
QString's fromUtf16() prefers char16_t data over ushort.

Change-Id: Ib20c5afa09ceabb4e91fe434b6a057edb4739a53
Reviewed-by: Lars Knoll <lars.knoll@qt.io>
2020-08-07 17:44:01 +02:00
Giuseppe D'Angelo
3f6afac6b1 QPolygon: streamline constructors and special member functions
Employ RO0; inherit the constructors from the base class; and
do some code tidies as a drive by.

The inherited constructors bring in goodies like initializer_list
support.

Change-Id: Ia00a3f9b0ccbf182bf837bc65ba2305110c8dc60
Reviewed-by: Lars Knoll <lars.knoll@qt.io>
2020-08-07 15:01:26 +02:00
Mårten Nordheim
ad1a5bf63f QDecompressHelper: Add brotli support
Task-number: QTBUG-83269
Change-Id: If23b098ee76a4892e4c2c6ce5c635688d8d9138d
Reviewed-by: Timur Pocheptsov <timur.pocheptsov@qt.io>
2020-08-06 20:56:42 +02:00
Alexandru Croitor
92ee9bd6b8 CMake: Properly handle CONFIG += thread aka Threads::Threads
mkspecs/features/qt.prf adds a dependency on the system threading
library if the Qt Core thread feature is enabled. Because qt.prf is
loaded by any public or internal Qt project, it's essentially a public
dependency for any Qt consumer.

To mimic that in CMake, we check if the thread feature is enabled, and
and set the Threads::Threads library as a dependency of Qt6::Platform,
which is a public target used by all Qt modules and plugins and Qt
consumers.

We also need to create a Qt6Dependencies.cmake file so we
find_package(Threads) every time find_package(Qt6) is called.

For the .prl files to be usable, we have to filter out some
CMake implementation specific directory separator tokens
'CMAKE_DIRECTORY_ID_SEP' aka '::@', which are added because we call
target_link_libraries() with a target created in a different scope
(I think).

As a result of this change, we shouldn't have to hardcode
Threads::Threads in other projects, because it's now a global public
dependency.

Task-number: QTBUG-85801
Task-number: QTBUG-85877
Change-Id: Ib5d662c43b28e63f7da49d3bd77d0ad751220b31
Reviewed-by: Qt CI Bot <qt_ci_bot@qt-project.org>
Reviewed-by: Cristian Adam <cristian.adam@qt.io>
2020-08-06 19:15:39 +02:00
Giuseppe D'Angelo
4fc539bd84 QMap: fix insert() rvalue overloads
Receiving an rvalue still requires to check whether the parameter
is detached, otherwise we can't steal its backing std::map.

Change-Id: Ie88dbf39fd777112ad7bb20a46d5c2d65be8eb3d
Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
2020-08-06 19:15:39 +02:00
Giuseppe D'Angelo
14090760a8 Long Live QMap as a refcounted std::map!
... and QMultiMap as std::multimap.

Just use the implementation from the STL; we can't really claim that
our code is much better than STL's, or does things any differently
(de facto they're both red-black trees).

Decouple QMultiMap from QMap, by making it NOT inherit from
QMap any longer. This completes the deprecation started in 5.15:
QMap now does not store duplicated keys any more.

Something to establish is where to put the
QExplictlySharedDataPointer replcement that is in there as an
ad-hoc solution. There's a number of patches in-flight by Marc
that try to introduce the same (or very similar) functionality.

Miscellanea changes to the Q(Multi)Map code itself:

* consistently use size_type instead of int;
* pass iterators by value;
* drop QT_STRICT_ITERATORS;
* iterators implictly convert to const_iterators, and APIs
  take const_iterators;
* iterators are just bidirectional and not random access;
* added noexcept where it makes sense;
* "inline" dropped (churn);
* qMapLessThanKey dropped (undocumented, 0 hits in Qt, 1 hit in KDE);
* operator== on Q(Multi)Map requires operator== on the key type
  (we're checking for equality, not equivalence!).

Very few breakages occur in qtbase.

[ChangeLog][Potentially Source-Incompatible Changes] QMap does not
support multiple equivalent keys any more. Any related functionality
has been removed from QMap, following the deprecation that happened
in Qt 5.15. Use QMultiMap for this use case.

[ChangeLog][Potentially Source-Incompatible Changes] QMap and
QMultiMap iterators random-access API have been removed. Note that
the iterators have always been just bidirectional; moving
an iterator by N positions can still be achieved using std::next
or std::advance, at the same cost as before (O(N)).

[ChangeLog][Potentially Source-Incompatible Changes] QMultiMap does
not inherit from QMap any more. Amongst other things, this means
that iterators on a QMultiMap now belong to the QMultiMap class
(and not to the QMap class); new Java iterators have been added.

Change-Id: I5a0fe9b020f92c21b37065a1defff783b5d2b7a9
Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
Reviewed-by: Lars Knoll <lars.knoll@qt.io>
2020-08-06 19:15:39 +02:00
Eskil Abrahamsen Blomfeldt
76068d0114 Make QFontDatabase member functions static
QFontDatabase is a singleton and all instances would share
a single, mutex-protected global data pointer. But some functions
were implemented as non-static functions. This caused a lot
of code on the form

	QFontDatabase().families(...)

since there was no static access. Other functions were implemented
as static.

To consolidate, we make all functions static. This should be
source-compatible, but not binary compatible.

[ChangeLog][QtGui][Fonts] Some functions in QFontDatabase were in
principle static, but previously not implemented as such. All
member functions have now been made static, so that constructing
objects of QFontDatabase is no longer necessary to access certain
functionality.

Fixes: QTBUG-83284
Change-Id: Ifd8c15016281c71f631b53387402c942cd9c43f6
Reviewed-by: Konstantin Ritt <ritt.ks@gmail.com>
2020-08-06 11:43:24 +02:00
Shawn Rutledge
6d6ed64d6c Add QPointerEvent::is[Press|Update|Release]Event accessors
QQuickPointerEvent had them, so despite how trivial they look,
it's very convenient to keep using them in QQuickWindow rather than
duplicating these kinds of checks in various places, and for multiple
event types too.

Change-Id: I32ad8110fd2361e69de50a679ddbdb2a2db7ecee
Reviewed-by: Fabian Kosmale <fabian.kosmale@qt.io>
2020-08-06 10:23:56 +02:00
Thiago Macieira
45838673df Implement UTF-16 to UTF-8 case-insensitive compare and make public
Change-Id: Ied637aece2a7427b8a2dfffd16116cf3645c6359
Reviewed-by: Lars Knoll <lars.knoll@qt.io>
2020-08-05 21:51:24 -07:00
Mårten Nordheim
7b76379a89 Make use of QDecompressHelper for HTTP downloads
Changes are not too big for now. Just replaces use of the previous
calls to the zlib decompression function. And initialize
QDecompressHelper when we know the content-encoding.

Task-number: QTBUG-83269
Change-Id: I41358feaef2e7ac5f48f14e3f95ec094e0c110b7
Reviewed-by: Timur Pocheptsov <timur.pocheptsov@qt.io>
2020-08-05 17:19:10 +02:00
Morten Johan Sørvig
00f2d1a09b Establish baseline for QIcon test on dpr > 1
After enabling Qt::AA_UseHighDpiPixmaps, QIcon::pixmap()
now returns pixmaps larger than the requested size on
devicePixelRatio > 1 screens.

Adapt tests to account for this changed behavior.
Skip tests where it’s unclear what the the expected
behavior is, or where the test logic does not apply
to dpr > 1.

This gives a clearer indication of where we are
(39 passed, 0 failed, 9 skipped), and enables using
the qicon test to catch regressions also when running
at dpr > 1.

Remove the "lowdpi" testcase flags from the qmake and
cmake project files.

Change-Id: Ia7ce722ae356fc496a91b54e9f5d590d13b9df62
Reviewed-by: Tor Arne Vestbø <tor.arne.vestbo@qt.io>
2020-08-05 11:23:07 +02:00
Mårten Nordheim
07b008425a Privately introducing QDecompressHelper for network purposes
To support streaming decompression in QNAM.
Will also be used to refactor existing decompression code in QNAM.

Task-number: QTBUG-83269
Change-Id: Iecf3e359734163f15686c949f75d41fa4794a00e
Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
2020-08-05 09:17:11 +02:00
Thiago Macieira
f2abfb39d7 QDebug: add operator<<(const char16_t *)
Avoids the conversion from UTF-8 for uses that are not dumping a string.

Mass conversion of Qt sources left for future opportunity.

Fixes: QTBUG-85811
Change-Id: I4ca4a35b687b46c39030fffd1626ae6c3294cacf
Reviewed-by: Edward Welbourne <edward.welbourne@qt.io>
Reviewed-by: Lars Knoll <lars.knoll@qt.io>
2020-08-04 15:13:09 -07:00
Fabian Kosmale
652062dde3 QNotifiedProperty: avoid crash
We can end up in a situation where a (soon to be destroyed) observer is
owned by a binding which is about to be deleted. If in that situation
the binding is destroyed first, we end up with a dangling pointer
and ensuing memory corruption. Instead, we now first transfer the
ownership of the observer and only destroy the binding afterwards.

Fixes: QTBUG-85824
Change-Id: I721c0319281ada981ae7896bd2e02e9a0cc901b8
Reviewed-by: Lars Knoll <lars.knoll@qt.io>
2020-08-04 11:28:33 +00:00
Tor Arne Vestbø
561da776c9 Remove const volatile qualifier on return type in test
Fixes warning by Clang:

   warning: 'const volatile' type qualifiers on return type have no effect
      [-Wignored-qualifiers]
    const volatile unsigned long long * const volatile func_KVPKVull() {...}
                                        ^~~~~~~~~~~~~~~

Change-Id: Ia4aae6521c84f4a18d92ad5035af5b247d283140
Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
2020-08-04 05:12:31 +00:00
Andrei Golubev
b3c1093751 Introduce swap functions for QPromise/QFutureInterface
Made QPromise::swap public, added free standing swap() for
QFutureInterface and QPromise. Updated QPromise special member
functions. Extended tests

Task-number: QTBUG-84977
Change-Id: I5daf6876df306d082441dbcdf5ae4dee3bfc0ead
Reviewed-by: Sona Kurazyan <sona.kurazyan@qt.io>
2020-08-03 16:47:31 +02:00
Mårten Nordheim
246e712548 Move-enable QByteDataBuffer::{append,prepend}
Change-Id: I2fd342465475e3a694c8459a54957149f8b418a9
Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
2020-08-01 10:51:21 +02:00
Mårten Nordheim
5d7be66fd7 QList: Add a append(QList &&) overload
We already had append(const QList &) and now there's an overload
taking an rvalue reference.

Change-Id: Id2fbc6c57badebebeee7b80d15bb333270fa4e19
Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
2020-08-01 00:01:52 +02:00
Thiago Macieira
95afe6b244 QSharedPointer: do allow calling deleters on null pointers
I don't know why std::shared_ptr allows this, but why not.

[ChangeLog][Important Behavior Changes] QSharedPointer objects will now
call custom deleters even when the pointer being tracked was null. This
behavior is the same as std::shared_ptr.

Fixes: QTBUG-85285
Pick-to: 5.15
Change-Id: I24006db8360041f598c5fffd161c260df0313b55
Reviewed-by: Giuseppe D'Angelo <giuseppe.dangelo@kdab.com>
2020-07-31 10:40:25 -07:00
Thiago Macieira
fe9e6b2ceb QString::vasprintf: fix 't' modifier for integers on 64-bit
‘t’
     Specifies that the argument is a ‘ptrdiff_t’.
     This modifier was introduced in ISO C99.

We use qsizetype, which is the same width as ptrdiff_t, so it makes no
difference in va_arg().

Change-Id: Iea47e0f8fc8b40378df7fffd16255730109413a5
Reviewed-by: Tor Arne Vestbø <tor.arne.vestbo@qt.io>
Reviewed-by: Lars Knoll <lars.knoll@qt.io>
2020-07-31 10:36:33 -07:00
Edward Welbourne
a6b3a1e459 Remove deprecated binary json feature
Deprecated in 5.15 in favor of CBOR.

Fixes: QTBUG-81239
Change-Id: I711d4bd7dd1247f58e77ac9fa53304cbe5028918
Reviewed-by: Edward Welbourne <edward.welbourne@qt.io>
Reviewed-by: Lars Knoll <lars.knoll@qt.io>
2020-07-31 17:12:48 +02:00
Allan Sandfeld Jensen
0792188440 Add float->qfloat16 rounding and fix the tests
Our hardware optimized conversions of float to qfloat16 rounds to even
where our table based conversion truncated to zero.

The rounding is not in this patch exactly round to even like the
hardware implementation but much closer.

Change-Id: I4c5e72c15fef9079d3660680b2727ff7ba4e768a
Reviewed-by: Edward Welbourne <edward.welbourne@qt.io>
Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
2020-07-31 16:50:30 +02:00
Linus Jahn
5d69aa3ee1 QCryptographicHash: Add BLAKE2b and BLAKE2s hashing algorithms
BLAKE2 does not specify requirements about specific hash sizes and
since QCryptographicHash does not support dynamic hash sizes, only the
most common hash sizes could be covered by this.

The supported hash sizes were chosen to match the ones supported by the
Linux kernel.

The new hashing algorithms for QCryptographicHash are:
 * BLAKE2b (160 bit, 256 bit, 384 bit, 512 bit)
 * BLAKE2s (128 bit, 160 bit, 224 bit, 256 bit)

[ChangeLog][QtCore][QCryptographicHash] Added BLAKE2b and BLAKE2s
hashing algorithms.

Fixes: QTBUG-78198
Change-Id: Id9e0180a974093982fdf1cdd6180988a2e5e9f4f
Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
2020-07-31 15:05:18 +02:00
Laszlo Agocs
c5da2e6f06 Remove old qsb versions from qshader autotest
Only keep 3, 4, and 5 because 3 is the lowest version where binary JSON
is not used anymore.

Change-Id: Id0319e8eceb845017ed493d0ef6902b53050d5a6
Reviewed-by: Sona Kurazyan <sona.kurazyan@qt.io>
Reviewed-by: Edward Welbourne <edward.welbourne@qt.io>
Reviewed-by: Laszlo Agocs <laszlo.agocs@qt.io>
2020-07-31 12:57:06 +02:00
Fabian Kosmale
cb80720287 Expose QMetaTypeInterface::alignof in QMetaType
We already have the information in the QMetaTypeInterface, and provide
functions to access sizeof. Adding alignof support seems natural, and
should make it easier to handle over-aligned types.
This should also be helpful in QVariant.

Change-Id: I166be76f4b7d2d2e524a3a1e513bd2f361e887c1
Reviewed-by: Lars Knoll <lars.knoll@qt.io>
2020-07-31 09:46:54 +02:00
Tor Arne Vestbø
47cb6ad698 Don't capture this explicitly in tests
Some compilers implicitly captures, and will warn about the unused capture.

Change-Id: Ib5e1cc3956c7eb0dc87cee834cce8a2b3dd0d30b
Reviewed-by: Volker Hilsheimer <volker.hilsheimer@qt.io>
2020-07-29 18:34:16 +00:00
Alex Trotsenko
8969070cfd QEventDispatcherWin32: redesign event notifiers activation
The previous implementation multiplexed callback-based event
notification into a single proxy event (cf. 85403d0af), which was
in turn object-waited for (this was the case since the beginning
of public qt history). It makes more sense to multiplex into a
posted message, because that also works with foreign event loops
that do not know anything about our event objects.

Task-number: QTBUG-64443
Change-Id: I97945ac8b5d7c8582701077134c0aef4f3b5a18f
Reviewed-by: Oswald Buddenhagen <oswald.buddenhagen@gmx.de>
Reviewed-by: Volker Hilsheimer <volker.hilsheimer@qt.io>
2020-07-29 18:34:34 +03:00
Laszlo Agocs
071fc289c4 Re-enable tst_qrhi on Linux
Not sure why this was disabled in the first place.

Change-Id: I66329b55fd46d03fd96818c6c7004718ddea5c79
Reviewed-by: Qt CI Bot <qt_ci_bot@qt-project.org>
Reviewed-by: Alexandru Croitor <alexandru.croitor@qt.io>
2020-07-29 15:04:19 +02:00
Tor Arne Vestbø
e7ade60925 Add missing override in tst_QSortFilterProxyModel
Change-Id: I8ffe92cd5a68bf86688e1d942d079ac6ff115d11
Reviewed-by: Volker Hilsheimer <volker.hilsheimer@qt.io>
2020-07-29 14:33:48 +02:00
Tor Arne Vestbø
b535a67910 Fix warning when comparing qsizetype to size_t
Change-Id: I4ea7ccb4daf05c735c831964f94c120d179521dd
Reviewed-by: Volker Hilsheimer <volker.hilsheimer@qt.io>
2020-07-29 12:33:33 +00:00
Tor Arne Vestbø
9023791a45 Fix warnings about unused expression results in tests
Change-Id: I401ec8a3742a5bb51a1b8b291c53395c3880117c
Reviewed-by: Volker Hilsheimer <volker.hilsheimer@qt.io>
2020-07-29 14:33:29 +02:00
Tor Arne Vestbø
6f17509ad9 Fix warnings about unused members in tests
Change-Id: I741cf08c26f8a2e297926cc01968ff09e70462a2
Reviewed-by: Volker Hilsheimer <volker.hilsheimer@qt.io>
2020-07-29 14:33:24 +02:00
Tor Arne Vestbø
dfeedc17a2 Disable deprecation warnings in some tests
The tests are testing deprecated functionality, which we
still want to test.

Change-Id: Iad6ed35800896170c17fe019c7a6ecda22398ac3
Reviewed-by: Volker Hilsheimer <volker.hilsheimer@qt.io>
2020-07-29 14:33:23 +02:00
Tor Arne Vestbø
57337f21c7 Add missing braces when constructing BigConvertible in tst_qvariant
Change-Id: Ia571e8950aa28721080dc7434921b79ffda913f4
Reviewed-by: Volker Hilsheimer <volker.hilsheimer@qt.io>
2020-07-29 14:33:20 +02:00
Tor Arne Vestbø
f8d1e16da0 Add missing enumeration case in tst_QMacStyle::setSize
Change-Id: Iade36b03c6f8bdaa8feb82ef89744a399f92e21d
Reviewed-by: Volker Hilsheimer <volker.hilsheimer@qt.io>
2020-07-29 14:33:19 +02:00
Allan Sandfeld Jensen
d782df4861 Make qfloat16 helper functions consistent with float/double versions
Infinite is only when the mantissa is 0, everything else is NaN.

std::isnormal returns false on zero.

Pick-to: 5.15
Change-Id: I897fc0dc3b8a9c557bb1922ea7ca8df501e91859
Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
2020-07-28 18:12:07 +02:00
Friedemann Kleint
2405aa9d67 Windows QPA: Move mime-type related classes to the new interface
Move QWindowsMime (which was a public class in Qt 4 and moved to the QPA
plugin in Qt 5) to the platform namespace and add register functions to the
native application.

Move in test code from QtWinExtras.

Task-number: QTBUG-83252
Change-Id: Iaac440e2d5cb370110919921b1eeb779600b5b65
Reviewed-by: Tor Arne Vestbø <tor.arne.vestbo@qt.io>
2020-07-28 13:20:23 +02:00
Timur Pocheptsov
1482739002 QHostAddress: resolve API issues marked with ##Qt6
Also, remove the deprecated function and its auto-test.

Change-Id: If04a54c4b91e0f76523960c7b1a5bcb8fe883ac6
Reviewed-by: Edward Welbourne <edward.welbourne@qt.io>
Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
2020-07-28 12:38:15 +02:00