Commit Graph

41608 Commits

Author SHA1 Message Date
Ulf Hermann
fc3c6cde83 qmake: Don't call QDir::count() over and over
This can be expensive. We don't expect files to be added to the
directory while qmake is running, and if that happened, the result would
be unpredictable anyway.

Change-Id: I5db93132046c1284130bbe51ce1ecd2a14665206
Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
2019-10-30 09:23:24 +01:00
Qt Forward Merge Bot
a317bff298 Merge remote-tracking branch 'origin/5.14' into 5.15
Change-Id: Ib4df563fc7b1f7c40f425e0e71180d9517a672be
2019-10-30 01:00:14 +01:00
Edward Welbourne
d05ca484cf Make tst_QNumeric more systematic about checking float as well as double
Do this by templating the floating-point tests, which removes some
existing duplication as well as avoiding new duplication. Did some
renaming in the process. Added some tests of fuzzyCompare that come
closer to its boundary. Increased number of tests from 69 to 97. Use
std::numeric_limits to replace assorted hard-coded constants and old
C-library boundary-value macros.

It turns out MSVC's float conflates quiet and signaling NaN (although
MinGW's doesn't); and WebAssembly's old fastcomp compiler conflates
NaNs for both float and double; so XFAIL the test for distinct NaNs in
those cases.

Change-Id: I0a1c0d2f68f75d51b8cda9e3ddfe7fa9c190a3e2
Reviewed-by: Qt CI Bot <qt_ci_bot@qt-project.org>
Reviewed-by: Erik Verbruggen <erik.verbruggen@me.com>
2019-10-29 16:46:54 +01:00
Alessandro Portale
d157292f16 Wasm: Fix the markup in wasm_shell.html
Img width and height are separate tags. Alternatively, they could
be defined in the style tag.

Change-Id: I0a4a93b63a99a7b644e9096bb9238739f408c0df
Reviewed-by: Morten Johan Sørvig <morten.sorvig@qt.io>
2019-10-29 16:12:23 +01:00
Morten Johan Sørvig
b56e856d21 Cocoa: rename IsMouseOrKeyEvent -> isUserInputEvent
This matches the intended use of this function. Reformat
to modern Qt style.

Change-Id: I076d2bdb3ac14b346f0dc6934f7a47765badc6b0
Reviewed-by: Timur Pocheptsov <timur.pocheptsov@qt.io>
2019-10-29 15:22:46 +01:00
Laszlo Agocs
58a67e4e0a rhi: Move to CBOR in QShader and expand the autotest
Binary JSON is said to become deprecated. Therefore, add support
for CBOR. Binary JSON is still supported for deserialization, so
all existing .qsb files will continue to work, as long as the
binaryjson feature is enabled in the Qt build.

Also makes QShaderDescription comparable. This is important for
tests in particular.

A nice side effect of using CBOR is that .qsb files become smaller.
For a typical Qt Quick material shader this can mean a reduction of
300 bytes or more.

Task-number: QTBUG-79576
Change-Id: I5547c0266e3e8128c9653e954e47487352267f71
Reviewed-by: Paul Olav Tvete <paul.tvete@qt.io>
2019-10-29 15:22:46 +01:00
Morten Johan Sørvig
dcbcda81b4 wasm: add local file access manual test
Testes file load and save, computes a sha256 hash
for verifying file content.

Change-Id: Id7f697c4dfd41e051442350f4050f04b493cfc18
Reviewed-by: Morten Johan Sørvig <morten.sorvig@qt.io>
2019-10-29 14:02:43 +00:00
Tor Arne Vestbø
aa91b0083e qpa: Add note about QScreen taking care of primary screen during removal
Change-Id: I31b4ed6e6597e22172dcca7180750f1392b9ad68
Reviewed-by: Simon Hausmann <simon.hausmann@qt.io>
Reviewed-by: Tor Arne Vestbø <tor.arne.vestbo@qt.io>
2019-10-29 11:07:50 +00:00
Qt Forward Merge Bot
f3fd887de1 Merge "Merge remote-tracking branch 'origin/5.13' into 5.14" 2019-10-29 11:13:03 +01:00
Alexandru Croitor
82ee87b7b8 CMake: Fix androiddeployqt support when using add_library MODULE
The recent change to support android with CMake assumes that the user
project will have add_library(foo SHARED), and sets the
CMAKE_SHARED_LIBRARY_SUFFIX_CXX variable to modify the final library
name to contain an ABI suffix.

This did not work when using add_library(foo MODULE), and
androiddeployqt failed saying it can't find the application binary.

Make sure to apply the ABI suffix to MODULE targets. Also cover
the suffix to be added regardless if the language used for compiling
the SO is C or C++.

Amends 52c799ed44

Change-Id: Ic44d67e33a123bd0104d98b368ceda0844474980
Reviewed-by: Cristian Adam <cristian.adam@qt.io>
Reviewed-by: BogDan Vatra <bogdan@kdab.com>
2019-10-29 08:57:44 +01:00
Andy Shaw
11acbc2c99 sqlite: Update to v3.30.1
Since the patch applied previously is no longer required, we have
removed that too.

[ChangeLog][QtSQL][sqlite] Updated to v3.30.1

Fixes: QTBUG-79416
Change-Id: Ifc3fcc6e1768f80e97a5e0ab4b2aeabddf2ced9d
Reviewed-by: Simon Hausmann <simon.hausmann@qt.io>
2019-10-29 09:17:41 +02:00
Christian Ehrlicher
c87e2c37de tst_QDataWidgetMapper/QFileIconProvider/ItemEditorFactory: cleanup
Cleanup QDataWidgetMapper/QFileIconProvider/ItemEditorFactory autotests:
 - use range-based for loops
 - use nullptr
 - use member initialization
 - use new signal/slot syntax
 - use static invocations
 - use override

Change-Id: I1a36ea2da7de1cfa5d5d4e305ef508fda3a6c460
Reviewed-by: Friedemann Kleint <Friedemann.Kleint@qt.io>
2019-10-29 06:24:01 +01:00
Giuseppe D'Angelo
538d5bdf66 Add a getter for QObjectPrivate::threadData
Strictly a temporary measure to deal with cross-module merges.

Change-Id: I344bb3f20f68f04367041834e608669122ff70b1
Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
2019-10-28 21:05:52 +02:00
Ville Voutilainen
c33d8bfc99 Add a timeout for transfers
If a transfer timeout is set for QNetworkRequest, downloads
and uploads are aborted if the timeout expires and bytes
haven't been transmitted in either direction.

Task-number: QTBUG-3443
Change-Id: I702d223d673f0c6612343dc9d053815acfcb61b8
Reviewed-by: Mårten Nordheim <marten.nordheim@qt.io>
2019-10-28 21:15:43 +03:00
Christian Ehrlicher
5d4b5dab7f Widget examples: replace QItemDelegate with QStyledItemDelegate
Replace QItemDelegate with QStyledItemDelegate in the examples since
QItemDelegate is deprecated.
Also fix up some unused documentation snippet references.

Change-Id: I42b8780ad0c317b9a253cc722d0b471695ed253f
Reviewed-by: Friedemann Kleint <Friedemann.Kleint@qt.io>
2019-10-28 19:36:32 +02:00
Eskil Abrahamsen Blomfeldt
c62dbc0c02 no-thread: Add dummy implementations for stackSize functions in QThread
We recently added a call to setStackSize() in the QML thread, which
revealed that the dummy implementation for this function was missing
in no-thread builds.

Fixes: QTBUG-79571
Change-Id: Ibabb48d9cba73afda0842642045a2961e65523f9
Reviewed-by: Morten Johan Sørvig <morten.sorvig@qt.io>
2019-10-28 13:29:32 +01:00
Christian Ehrlicher
5b22dc71a3 QGraphicsItem: disable deprecated warnings during compilation
The previous commits which deprecated the function forgot to add
QT_WARNING_PUSH/QT_WARNING_POP around the affected code.

Change-Id: I042a2bcd40afe2e5fe517954be26a02fd048b563
Reviewed-by: Friedemann Kleint <Friedemann.Kleint@qt.io>
2019-10-28 13:09:40 +01:00
Morten Johan Sørvig
9cb823cd0f QTestLib: basic WebAssembly support
Disable the crash signal handler. This makes it possible
to run auto-tests in the browser.

Long-running tests may cause the browser to interrupt
or display the “a web page is slowing down your computer”
message, or not produce any console output while the
test is running.

Change-Id: Ifd53b744bd3652abfb466b78992ce2371eca2536
Task-number: QTBUG-68504
Reviewed-by: Lorn Potter <lorn.potter@gmail.com>
2019-10-28 11:52:57 +00:00
Qt Forward Merge Bot
08f90adffd Merge remote-tracking branch 'origin/5.13' into 5.14
Conflicts:
	src/corelib/serialization/qjson_p.h

Change-Id: I83cea141a4de8b3998478bfded84ca9029f7a2a9
2019-10-28 10:50:03 +01:00
Tor Arne Vestbø
4b346aedf8 macOS: Deliver update requests even when view or layer needs display
This was a workaround to prevent visual artefacts from flushing GL
during window resizing, but now that we skip the flush entirely in
this situation we don't need to limit the update request delivery.

Change-Id: I84bd48e4e2fc5a03e9d27d5f9b4b32b8098e56a5
Reviewed-by: Timur Pocheptsov <timur.pocheptsov@qt.io>
2019-10-28 11:48:40 +02:00
Qt Forward Merge Bot
c78560f19a Merge "Merge remote-tracking branch 'origin/5.14' into 5.15" 2019-10-28 01:00:55 +01:00
Qt Forward Merge Bot
7920397f0c Merge remote-tracking branch 'origin/5.14' into 5.15
Change-Id: I7803400aa500363fbaa57b0661315064bd3239d9
2019-10-28 01:00:42 +01:00
Tor Arne Vestbø
dcbe25bbbb macOS: Only skip screen reconfigure if primary screen changed
Change-Id: Ia5d208ace5086e8e92f95f859383773894a18768
Reviewed-by: Timur Pocheptsov <timur.pocheptsov@qt.io>
2019-10-27 20:19:01 +01:00
Tor Arne Vestbø
3ee634d520 macOS: Extend QCocoaScreen logging
Change-Id: I91f89ff336b3f48aea91e50860264bd8359805cb
Reviewed-by: Timur Pocheptsov <timur.pocheptsov@qt.io>
2019-10-27 20:18:59 +01:00
Tor Arne Vestbø
5982451ac6 macOS: Class initialize QCocoaScreen members
Change-Id: I163858400da28668b8a85241e9e6b1d989227a3e
Reviewed-by: Timur Pocheptsov <timur.pocheptsov@qt.io>
2019-10-27 20:18:56 +01:00
Tor Arne Vestbø
360a2e79c8 macOS: Don't leak CFUUIDRefs when resolving NSScreen for platform screen
Change-Id: I5609071346ef44dc9f16359db451ea9b29dd2b0d
Reviewed-by: Timur Pocheptsov <timur.pocheptsov@qt.io>
2019-10-27 20:18:52 +01:00
Francisco Boni
a9b34f5726 QRandom: add support for RDSEED on INTEL_ICL & MSVC
We set the macro for RDSEED because neither MSVC nor the Intel compiler
on Windows defines the macro. The implication is that when qRandomCpu()
calls qCpuHasFeature() in simd.cpp, qDetectCpuFeatures() correctly
receives the expected CPU features enabled in the build from
qCompilerCpuFeatures, namely CpuFeatureRDSEED (qsimd_x86_p.h)

Change-Id: I5741d4f956a93f21c358af8a4ee393c1741b85ee
Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
2019-10-27 15:53:58 -03:00
Timur Pocheptsov
7ac3bc9f83 Network proxy (macOS) - fix a memory leak
there are several conditional statements where we return without
releasing a dictionary (which is returned by a function having
'Copy' in its name, thus giving us the ownership == CFRelease
is needed). QCFType fixes this issue.

Fixes: QTBUG-79524
Change-Id: Id8a8616ad5b6ec21b5e8103bf52b1d9df9ca5c2f
Reviewed-by: Mårten Nordheim <marten.nordheim@qt.io>
2019-10-27 20:40:45 +02:00
Tor Arne Vestbø
22c3fd0508 macOS: Remove assert that primary display always matches CGMainDisplayID
Fixes: QTBUG-78707
Change-Id: Ia517f543728c76dcf19558e9e68ed97db7cfaaa4
Reviewed-by: Timur Pocheptsov <timur.pocheptsov@qt.io>
2019-10-27 20:00:02 +02:00
Yulong Bai
a21d4395f4 Drag'n'Drop: fix attached Drag object deleted when DnD is progressing
The attached Drag object's owner, i.e. its parent, is also the dragged
item. So the attached Drag object will also be destroyed as the dragged
item is deleted.

Fixes: QTBUG-65701
Change-Id: I39b0a3180f205c427deed5c70cd1912524f9324e
Reviewed-by: Shawn Rutledge <shawn.rutledge@qt.io>
2019-10-27 17:40:44 +02:00
Qt Forward Merge Bot
dd0cd71170 Merge "Merge remote-tracking branch 'origin/5.14' into 5.15" 2019-10-26 01:01:27 +02:00
Qt Forward Merge Bot
86e74d60d2 Merge remote-tracking branch 'origin/5.14' into 5.15
Change-Id: I208a36bf1c88c8291baaa5ca8fe8e838bc9d7aea
2019-10-26 01:01:14 +02:00
Christoph Schleifenbaum
ed48391c59 QFileSystemEngine: Rework createDirectory on Windows
Try starting to create the directory at the end, not at the front. This
is the same way as the Unix implementation is doing. This avoids problems
like us trying to enter directories we are not allowed to read, which
might be due to access rights or due to sandboxing.

Change-Id: I67c1ed4bdc20a15b1af9b33aa48d59fea359da22
Reviewed-by: Christoph Schleifenbaum <christoph.schleifenbaum@kdab.com>
2019-10-25 23:11:52 +02:00
Joerg Bornemann
73cb5cb01e Fix prefix for non-Windows cross-builds on Windows
When one specified a prefix "/usr/qt5" on Windows for a non-Windows
target (e.g. QNX) that prefix was translated to "C:/usr/qt5" and
passed on to the Makefiles, for example as
"-Wl,-rpath,C:/usr/qt5/lib".

The reason was that we called $$absolute_path on the user-specified
prefix. However, absolute_path operates according to the rules of the
host operating system.

When cross-building, the prefix is an on-device path. Therefore we
must not attempt to make it absolute to the build directory.

The check whether we're cross-compiling looks a bit arcane, but we
cannot use $$qtConfEvaluate(features.cross_compile) at this stage of
configure. Instead, we use XSPEC (set up by qtConfOutput_prepareSpec)
and $$[QMAKE_SPEC] which is the right host mkspec.

Fixes: QTBUG-79214
Change-Id: Id8664f8512cf1d9e178054a38e72323d7929547d
Reviewed-by: Edward Welbourne <edward.welbourne@qt.io>
Reviewed-by: Qt CI Bot <qt_ci_bot@qt-project.org>
2019-10-25 18:15:36 +02:00
Edward Welbourne
48603baf94 Update public suffix list to latest version
[ChangeLog][Third-Party Code] Updated DNS public suffix list

Task-number: QTBUG-79418
Change-Id: I02dbe2b1f5b5f3e4a1ed4fde60ee71f5b0a50cb5
Reviewed-by: Mårten Nordheim <marten.nordheim@qt.io>
Reviewed-by: Timur Pocheptsov <timur.pocheptsov@qt.io>
2019-10-25 18:06:23 +02:00
Edward Welbourne
265b25a5c3 Specify year in month name lookups for QCalendarWidget
The compiler didn't complain at a QLocale::FormatType values being
passed for the int year parameters of the month-name functions, which
all have a default for their final QLocale::FormatType parameters. So
we didn't notice that the year parameter was missing until the bug was
reported.

Removed some code duplication by giving QCalendarModel a monthName()
method. Reworked QCalendarMonthValidator::text() to avoid repeated
calendar calculations (and use fewer braces).

This commit amends commit 2dee006216

Fixes: QTBUG-79495
Change-Id: Iad48c3b648a0139ab43511e6fb4e6a8f63a0495f
Reviewed-by: Volker Hilsheimer <volker.hilsheimer@qt.io>
2019-10-25 18:06:06 +02:00
Cristián Maureira-Fredes
968cc365d2 uic: Add language::eol in more cases for python code
Change-Id: I0ab4b37399d3fba6d27cf90cab22676a3c599e5a
Reviewed-by: Friedemann Kleint <Friedemann.Kleint@qt.io>
2019-10-25 15:53:13 +02:00
Cristian Adam
52c799ed44 Android: Add multi-abi support for CMake
The patch adds ANDROID_BUILD_ABI_<abi> CMake options, which when enabled
will determine CMake to build the current project with the enabled ABI
settings.

When building with CMake and the official Android CMake toolchain
one needs to specify the Qt base directory as an argument to
CMAKE_FIND_ROOT_PATH, which contains the Android NDK sysroot
set by the toolchain.

CMake will consider directories that contain this base path as
valid directories to search packages. In the developer build case we
have to append "lib/cmake" because the Qt base directory passed as
CMAKE_FIND_ROOT_PATH will be the same directory as the developer
build base, and will not be considered.

Change-Id: I180502032c8ea1105bde2456252b367497f511d6
Reviewed-by: Alexandru Croitor <alexandru.croitor@qt.io>
Reviewed-by: BogDan Vatra <bogdan@kdab.com>
2019-10-25 14:54:28 +02:00
Eirik Aavitsland
f3dbe98dca Update bundled libjpeg-turbo to version 2.0.3
[ChangeLog][Third-Party Code] libjpeg-turbo was updated to version 2.0.3

Task-number: QTBUG-79420
Change-Id: I9f9b8b3a913fd5843759c0610f43b22c5bee67dc
Reviewed-by: Allan Sandfeld Jensen <allan.jensen@qt.io>
2019-10-25 14:33:11 +02:00
Filippo Cucchetto
2fac76e719 Windows QPA: add support for MouseDoubleClickDistance
Query the double click distance using the windows GetSystemMetric.
See https://docs.microsoft.com/en-us/windows/win32/api/winuser/nf-winuser-getsystemmetrics

Change-Id: I6198a38ab1a6216286897f8bdb305f334b7b148e
Reviewed-by: Tor Arne Vestbø <tor.arne.vestbo@qt.io>
2019-10-25 14:12:44 +02:00
Jüri Valdmann
698a95dc8a QFontDatabase: Delete redundant semicolons
There are too many semicolons. Delete some.

Fixes two warnings from Clang 9.0.1.

Change-Id: I363a6a2de9c075c03da62c58ad46828c04a95440
Reviewed-by: Friedemann Kleint <Friedemann.Kleint@qt.io>
2019-10-25 13:05:22 +02:00
Jüri Valdmann
bafb8220b4 Disable Clang warning for 'using namespace' in qtextstream.h
This header file intentionally puts a 'using namespace' into the global
namespace, the artful cleverness of which Clang doesn't properly appreciate.
Teach Clang a lesson by disabling the warning.

Change-Id: I9754ac5fc9d4c53654854082e1145d8b5fef186d
Reviewed-by: Allan Sandfeld Jensen <allan.jensen@qt.io>
2019-10-25 13:05:07 +02:00
Edward Welbourne
43f64b4dc8 Update CLDR to v36
Released on October 4th.
Adds Windows names for two time zones, Qyzylorda and Volgograd.
Added languages Chickasaw (cic), Muscogee (mus) and Silesian (szl).

Norwegian number formatting has flipped back to using colon rather
than dot as time separator; it's flipped back and forth over the last
several CLDR releases.  The dot form is present as a variant, the
colon form was long given as the normal pattern, then went away; but
now it's back as a contributed draft and that's what we pick up.

The MS-Win time-zone ID script was iterating a dict, causing random
reshuffling when new entries are added. Fixed that by doing the
critical iteration in sorted order.

Omitted locales ccp_BD and ccp_IN due to QTBUG-69324.

Task-number: QTBUG-79418
Change-Id: I43869ee1810ecc1fe876523947ddcbcddf4e550a
Reviewed-by: Lars Knoll <lars.knoll@qt.io>
2019-10-25 11:44:48 +02:00
Edward Welbourne
6852ba815d Correct some references to corelib/tools/ to say corelib/text/
The Unicode data tables moved with QString and friends.
So did the locale data generated from CLDR.

This amends commit a9aa206b7b.

Change-Id: If12f0420b559dcb78993adc00e9f39751bca684a
Reviewed-by: Volker Hilsheimer <volker.hilsheimer@qt.io>
2019-10-25 11:44:27 +02:00
Edward Welbourne
ef9c498215 Tidy up data-stream test
While I was looking into a bug related to problems building the test
without GUI, I noticed a lot of spurious #include lines so tidied up a
bit.  Split some long lines, while I was about it.

Change-Id: Id87eb6f612c6b174f8240dfe9c00e0929244fb6c
Reviewed-by: Albert Astals Cid <albert.astals.cid@kdab.com>
2019-10-25 11:44:13 +02:00
Edward Welbourne
425df43d7f Update double-conversion library to 3.1.5
Part of the 5.14.0 third-party component update.

[ChangeLog][Third-Party Code] Updated double-conversion code to
upstream version 3.1.5.

Task-number: QTBUG-79418
Change-Id: I70c3890fcfa0606c462cc0fe702d0f62fd9c7279
Reviewed-by: Friedemann Kleint <Friedemann.Kleint@qt.io>
Reviewed-by: Ulf Hermann <ulf.hermann@qt.io>
2019-10-25 11:43:27 +02:00
Edward Welbourne
a9ac6c89be Compile-fixes in the generator for qurltld_p.h
This is a follow-up to c0ab2ad98f.

Change-Id: Ic05d80fa0561f7609703407cc58a0caccbcb1061
Reviewed-by: Volker Hilsheimer <volker.hilsheimer@qt.io>
2019-10-25 11:43:04 +02:00
Edward Welbourne
59ca056a79 Exclude tests that need GUI when GUI isn't available
Thanks to Dmitriy Purgin for pointing out the serialization one.

Task-number: QTBUG-79353
Change-Id: Ia3d750b17ddd8fbb7a83a55df7e4546ca78c358b
Reviewed-by: Timur Pocheptsov <timur.pocheptsov@qt.io>
2019-10-25 11:42:09 +02:00
Edward Welbourne
fd3db1dc3a Don't try to define QT_NO_CAST_TO_ASCII when the test undefines it
The qmake config for tst_QString tried to impose QT_NO_CAST_TO_ASCII
on it, but the source file explicitly #undef-s this symbol and its
friends. Leave the define commented out in the .pro so that a comment
can explain why it's no good.

Change-Id: I7620f4e104f0cdab05fdc246b903c40026e63d76
Reviewed-by: Frederik Gladhorn <frederik.gladhorn@qt.io>
Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
2019-10-25 11:41:44 +02:00
Edward Welbourne
946c701883 Move a test for feature ICU from .pro to .cpp
Test QT_CONFIG(icu) in the code instead of testing qtConfig(icu) in
the profile and setting an extra define just to shadow what's already
defined. Also remove the matching define from qcollator.pro, whose
test code didn't use it.

Noticed while reviewing the conversions to CMake.

Change-Id: I19d3b1026b2a8f50ec424c450614e721500fd38a
Reviewed-by: Qt CI Bot <qt_ci_bot@qt-project.org>
Reviewed-by: Frederik Gladhorn <frederik.gladhorn@qt.io>
2019-10-25 11:41:30 +02:00