Commit Graph

41692 Commits

Author SHA1 Message Date
Qt Forward Merge Bot
cd04181b2b Merge remote-tracking branch 'origin/5.15' into dev
Change-Id: I7f11733bda960196a96c6452bdabeb7072a8430d
2019-10-30 01:00:33 +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
Volker Hilsheimer
3ea6a13a01 Replace usage of Q_DECL_ALIGN with C++11 alignas keyword
The macro is not documented, so can be considered private API.
Pre-C++11 compilers that don't support alignas will no longer be
supported with Qt 6.

The macro definition for the standard case of compilers supporting
the alignof keyword is left in place.

Task-number: QTBUG-76414
Change-Id: I7d722e4faf09ae998a972d3ed914de808ab316d7
Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
2019-10-29 10:37:09 +01:00
Volker Hilsheimer
226a60baf5 Replace Q_ALIGNOF usage in qtbase with C++11 alignof keyword
The macro is not documented, so not part of the public Qt API. It is
made obsolete by the alignof keyword in C++11.

Remove the usage of the macro across qtbase, in particular the
workarounds for compilers that didn't support alignof, and that will
not be supported in Qt 6.

The macro definition is left in place, no need to break existing
code.

Task-number: QTBUG-76414
Change-Id: I1cfedcd4dd748128696cdfb546d97aae4f98c3da
Reviewed-by: Allan Sandfeld Jensen <allan.jensen@qt.io>
2019-10-29 10:37:02 +01: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
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
Qt Forward Merge Bot
8bcecd86fa Merge remote-tracking branch 'origin/5.15' into dev
Change-Id: I182a639748760393f9e6b0724259201588aeaae3
2019-10-27 01:00:50 +02:00
Qt Forward Merge Bot
7b3bdcbfe8 Merge remote-tracking branch 'origin/5.15' into dev
Change-Id: I379794a01cbf6fb39d94b24cc8c90b1971a212b9
2019-10-26 01:01:32 +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
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
Friedemann Kleint
dff3843d98 QShortcut: Properly port to the new configure system
Move the feature to corelib so that the QMetaType enumeration
values can be properly excluded and there is no need for a
dummy class.

Use QT_REQUIRE_CONFIG in the headers of classes to be disabled.
Add headers/source files in the .pro file depending on the configure
feature in libraries and tests.
Add the necessary exclusions and use QT_CONFIG.

Task-number: QTBUG-76493
Change-Id: I02499ebee1a3d6d9a1e5afd02517beed5f4536b7
Reviewed-by: Mitch Curtis <mitch.curtis@qt.io>
2019-10-25 12:12:39 +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
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
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
Albert Astals Cid
9d504e1150 QSqlTableModel::record: Use the const & we're given
QSqlTableModelPrivate::ModifiedRow::rec returns a const &
so use it instead doing a copy. QSqlRecord is cheap to copy constructor
but not having to do it is faster

Change-Id: Iad6e79fcdcdf380ce681fe9426436f8cb98be553
Reviewed-by: Andy Shaw <andy.shaw@qt.io>
2019-10-25 09:39:39 +02:00
Christian Romberg
6acab25f97 Remove GCC-style PCH directives from android-clang mkspec
As described in QTBUG-72404, the android-clang mkspec has the gcc pch
style hardcoded for no reason. This change removes the respective lines.

[ChangeLog][qmake][Android] Remove gcc-style PCH directives from the
android-clang mkspec.

Fixes: QTBUG-72404
Change-Id: Iad42651e25ecce08eda7aa5fa8bbf531c9497896
Reviewed-by: BogDan Vatra <bogdan@kdab.com>
2019-10-25 07:04:57 +00:00
Christian Romberg
059172c633 Fix precompiled headers for Clang
Precompiled headers were put in a directory which had exactly the same
name as the binary to be generated. This resulted in a failure with any
mkspec that used clang_pch_style. The g++-mkspec avoid this problem by
extending the directory name. This change adopts this technique for
clang mkspecs.

[ChangeLog][qmake] Fixed precompiled headers for the Clang compiler.

Fixes: QTBUG-72404
Change-Id: I471462e2bcb1e33f19d277c21acde0c04b1ffcd6
Reviewed-by: BogDan Vatra <bogdan@kdab.com>
2019-10-25 07:04:50 +00:00
BogDan Vatra
b5b9eb68c4 Fix typo
Change-Id: I9a429805414fb50aa059677beb5f8f8a48b72d9b
Reviewed-by: Mårten Nordheim <marten.nordheim@qt.io>
2019-10-25 07:03:37 +03:00
BogDan Vatra
1ce71a6a11 Fix bundled_libs section from libs.xml
Fixes: QTBUG-79376
Change-Id: If7681365110341379913ae46a96a2f2296197b8f
Reviewed-by: Eskil Abrahamsen Blomfeldt <eskil.abrahamsen-blomfeldt@qt.io>
2019-10-25 07:01:32 +03:00
Qt Forward Merge Bot
375efdd0e1 Merge remote-tracking branch 'origin/5.14' into 5.15
Change-Id: Iebedaa967a263854f18cd403ce007d7965f26d2b
2019-10-25 01:00:16 +02:00
Samuel Gaist
c8aadc79fc QSet: Document to/from QVector transformation techniques
Change-Id: I2a2ff6332bd6e8ed3d4ba7b4765da0a94a06f133
Fixes: QTBUG-71067
Reviewed-by: Paul Wicking <paul.wicking@qt.io>
Reviewed-by: Mitch Curtis <mitch.curtis@qt.io>
2019-10-24 23:10:21 +02:00
Shawn Rutledge
cffb88928c Update 3rdparty/md4c to post-0.3.4
0.3.4 is the newest tagged release. This updates to upstream
0354e1ab5a453e9913dcd5f87c2cfe9a2510dfda which has a change that
affects behavior of the ".\n" case in QTBUG-78870 (it will be
seen as a paragraph rather than a list item).

Task-number: QTBUG-78870
Change-Id: Ib01f9c1d3f71a39782608da071c2f42512845382
Reviewed-by: Edward Welbourne <edward.welbourne@qt.io>
Reviewed-by: Shawn Rutledge <shawn.rutledge@qt.io>
2019-10-24 20:19:15 +00:00
Shawn Rutledge
d377d1f3a9 Enforce QTextDocument::MarkdownFeature compatibility at compile time
We use md4c for parsing markdown.  It provides flags to control the
feature set that will be supported when parsing particular documents.
QTextMarkdownImporter::Feature is a fine-grained set of flags that
exactly match the md4c feature flags that we support in Qt so far.
QTextMarkdownImporter is a private exported class (new in 5.14).
We don't expect the corresponding flags in md4c to change in
incompatible ways in the future: the md4c authors have as much respect
for avoiding compatibility issues as we do, and likely will only add
features, not remove them.

We now enforce QTextMarkdownImporter::Features compatibility with
QTextDocument::MarkdownFeatures by setting them directly.  We check
QTextMarkdownImporter::Features compatibility with md4c's #define'd
feature flags using static asserts, so that any hypothetical
incompatibility would be detected at compile time.
The enum conversion from QTextDocument::MarkdownFeatures to
QTextMarkdownImporter::Features is moved to a new QTextMarkdownImporter
constructor; thus the conversions from QTextDocument::MarkdownFeatures
to QTextMarkdownImporter::Features, and then to unsigned (in
QTextMarkdownImporter::import()) are adjacent in the same private class
implementation.  If incompatibility ever occurred, we would need to
replace one or both of those with another suitable conversion function.

Change-Id: I0bf8a21eb7559df1d38406b948ef657f9060c67b
Reviewed-by: Vitaly Fanaskov <vitaly.fanaskov@qt.io>
2019-10-24 20:58:44 +02:00
Christian Ehrlicher
9ae0fa4d49 cleanup QSortFilterProxyModel tests
Cleanup QSortFilterProxyModel tests:
 - adjust includes
 - use nullptr
 - use override
 - avoid unneeded casts
 - use new signal/slot syntax

Change-Id: I05f7c18cd2642bc8251bf1560803e7635684d24d
Reviewed-by: Friedemann Kleint <Friedemann.Kleint@qt.io>
2019-10-24 19:41:16 +02:00
Christian Ehrlicher
31cbda4833 QItemSelectionModel: make parent an optional parameter
Make parent an optional parameter to be consistent with the rest of the
API.

Change-Id: I5942fee69ca33bd87d4d14b6919d2b8d5b60c0b4
Reviewed-by: Friedemann Kleint <Friedemann.Kleint@qt.io>
Reviewed-by: David Faure <david.faure@kdab.com>
2019-10-24 19:41:15 +02:00
Christian Ehrlicher
5edf34848a QTableView: properly deselect row when column 0 is hidden/not visible
When the first column is hidden or not visible in the current viewport,
it is not possible to deselect the current row.
Fix it by passing the correct column to
QItemSelectionModel::selectedRows() when testing if the current index is
selected.

Fixes: QTBUG-79092
Change-Id: I9d8082d2b29ad2f799156aee910c6ff6e3217771
Reviewed-by: David Faure <david.faure@kdab.com>
Reviewed-by: Friedemann Kleint <Friedemann.Kleint@qt.io>
2019-10-24 19:41:14 +02:00