Commit Graph

50096 Commits

Author SHA1 Message Date
Assam Boudjelthia
4e60681c87 Make QJniObject and QJniEnvironment public API
As part of Qt 6 restructring for the extras modules, this change exposes
the Jni APIs which are very important for Android platform. This patch
adds the APIs QJniObject, QJniEnvironment, QJniExceptionCleaner based
from private QtCore and QtAndroidExtras.

The Jni interface is cross-platform which justifies the name, but
currently, this API is used mainly for Android, and the naming comes
generic without Android keyword to avoid any future limitation on
supporting other platforms.

[ChangeLog][QtCore] Add new QJniObject, QJniEnvironment and
QJniExceptionCleaner APIs.

Task-number: QTBUG-89482
Fixes: QTBUG-89633
Change-Id: I4382dd53a225375759b9d042f6035a4a9810572b
Reviewed-by: Ville Voutilainen <ville.voutilainen@qt.io>
2021-01-27 17:23:04 +02:00
Nico Vertriest
407ce5c0af Doc: Fix CI warnings qtbase
Change-Id: I4e5a2d3494b86008bde234447ef701ea2d6447f6
Reviewed-by: Topi Reiniö <topi.reinio@qt.io>
2021-01-27 14:46:36 +00:00
Sona Kurazyan
3a5a404a53 Port QMovie to the new property system
Task-number: QTBUG-85520
Task-number: QTBUG-85521
Change-Id: Ib936020260cf01a5221b63fb1eb0ccb23f5553a3
Reviewed-by: Ivan Solovev <ivan.solovev@qt.io>
Reviewed-by: Edward Welbourne <edward.welbourne@qt.io>
2021-01-27 15:16:20 +01:00
Sona Kurazyan
67ced4da5a QMovie: initialize the private members while declaring them
Change-Id: Ie9c1484c8ad3483da3d559e1703770cdf22cec5e
Reviewed-by: Ivan Solovev <ivan.solovev@qt.io>
Reviewed-by: Andreas Buhr <andreas.buhr@qt.io>
Reviewed-by: Edward Welbourne <edward.welbourne@qt.io>
2021-01-27 15:16:16 +01:00
Allan Sandfeld Jensen
f0ab1c02d7 Optimize subpixel positioning
Dividing by (1/x) is the same as multiplying with x.

Change-Id: Ica854d1e012ad83437e32f12de0d3513a42ae6f8
Reviewed-by: Lars Knoll <lars.knoll@qt.io>
2021-01-27 15:09:58 +01:00
Fabian Kosmale
0f4d512dc4 Q(Untyped)Bindable: add takeBinding method
We missed takeBinding as a supported operation on Q(Untyped)Bindable.
To avoid adding version checks to code dealing with QBindableInterface,
we simply synthesize takeBinding as a combination of binding to retrieve
the binding and setBinding with a default-constructed
QUntypedPropertyBinding.

Change-Id: I43803a0dfe210353d0235f0373d2257f75ffe534
Reviewed-by: Lars Knoll <lars.knoll@qt.io>
2021-01-27 15:01:56 +01:00
Fabian Kosmale
f07c6f52ac QBindable: add initial documentation
Change-Id: I43681093c8819289037c76bd9c05b88a6da8311b
Reviewed-by: Andrei Golubev <andrei.golubev@qt.io>
Reviewed-by: Lars Knoll <lars.knoll@qt.io>
2021-01-27 15:01:54 +01:00
Allan Sandfeld Jensen
16b8d766ab Fix division by zero
Consider a zero we need to divide with illegal input.

Fixes oss-fuzz 29347

Pick-to: 5.15 6.0
Change-Id: I2aae1d765d2dd81c95d423038ef5cb878d4f8026
Reviewed-by: Robert Löhning <robert.loehning@qt.io>
2021-01-27 15:00:57 +01:00
Friedemann Kleint
5849619607 Stabilize tst_QListView::internalDragDropMove() on X11
The test was flaky in recent test runs on X11. Debugging
showed that the global position of the synthesized mouse
events was not correct due to the window not being mapped
properly. Use QTest::qWaitForWindowActive() instead of
QTest::qWaitForWindowExposed() to ensure that.

Task-number: QTBUG-90016
Pick-to: 5.15
Pick-to: 6.0
Change-Id: Ie1bc4157e6d0e807d8530f70dcbd27b5e2fc813c
Reviewed-by: Andy Shaw <andy.shaw@qt.io>
2021-01-27 14:00:57 +00:00
Edward Welbourne
3c9013b76a QTzTimeZonePrivate::init(): fix handling of empty ID
We were using the first abbreviation in the list, where the current
time's one is probably more apt.

We look up displayName() using ICU, when in use, but that abbreviatio
may be unknown to it. So ensure, when using abbreviation in place of
empty id, that we get the system zone for ICU, for use if we're asked
for the display name.

This is a follow up to b12d6c6a8a.

Pick-to: 6.0 5.15
Change-Id: I177db55de1ffbc763def8a0423642f2b3da74fa6
Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
2021-01-27 15:00:57 +01:00
Edward Welbourne
b08368d99f Add qHypot() to qmath.h, exposing and extending std::hypot()
We have plenty of places where we add some squares and take a square
root; this may be done more accurately and faster by hypot().
Introduce QHypotHelper to handle hypot with more than 3 parameters,
and with 3 when the C++17 version is missing (which it never should
be). Include an overload taking arbitrarily many valus and ensure that
we can use qHypot() with qfloat16.  Illustrate with some example uses,
add some tests.

[ChangeLog][QtCore][QMath] Header <QMath> now provides qHypot(), an
implementation of std::hypot() taking arbitrarily many numeric values,
including support for qfloat16, while avoiding the overflow and
underflow problems that arise when naively taking the square root of a
sum of squares.

Change-Id: Ia4e3913fe83fc27d17d8e7f1a52f03ad445c1fed
Reviewed-by: Andrei Golubev <andrei.golubev@qt.io>
Reviewed-by: Mårten Nordheim <marten.nordheim@qt.io>
2021-01-27 15:00:57 +01:00
Edward Welbourne
ad16f79e5f Update public suffix list to today's latest
Fetched from the authoritative source, verified the content matches
that of the current master revision in the github repository.

Amend one cookie jar test to find the last group in the last chunk
correctly - each group arises from a non-empty hsah-table entry, but
the last few hash-table entries may be empty, in which case the last
group isn't just before the last index, it's earlier by the number of
empty hash table entries. In the process, amend this test and the
related test of the end of the first chunk to iterate all the entries
in the group (in the present version, as it happens, each end-group
has just one entry, but that may vary).

Task-number: QTBUG-90214
Pick-to: 6.0 5.15
Change-Id: I6da365a6ca558124f8275e392735071dc77e04bb
Reviewed-by: Mårten Nordheim <marten.nordheim@qt.io>
Reviewed-by: Timur Pocheptsov <timur.pocheptsov@qt.io>
Reviewed-by: Qt CI Bot <qt_ci_bot@qt-project.org>
2021-01-27 15:00:57 +01:00
Edward Welbourne
05e67fbcab Update to CLDR v38.1, adding Yukon Standard Time
No change to QLocale's data, one addition to the Windows time-zone
data. What was formerly "Us Mountain Standard time / Canada" is now
Yukon Standard Time.

Fixes: QTBUG-89784
Pick-to: 6.0 5.15
Change-Id: I4c9a23620e74ea379be8a4c5ba0896d35fe9b594
Reviewed-by: Mårten Nordheim <marten.nordheim@qt.io>
2021-01-27 15:00:57 +01:00
Sona Kurazyan
8f8405e046 Port QThreadPool to the new property system
Ported all properties, except activeThreadCount. Marking it dirty may
cause a re-evaluation of properties depending on it, which may reault in
a deadlock in case of trying to read activeThreadCount property which is
being marked as dirty.

Task-number: QTBUG-85520
Change-Id: Id073b0895c89a9e6b05b57ad520db994e550a1c9
Reviewed-by: Fabian Kosmale <fabian.kosmale@qt.io>
2021-01-27 15:00:56 +01:00
Fabian Kosmale
6d3a886f09 QVariant benchmark: fix crashes
- Skip unused metatype id
- Do not construct a QVariant from an int, when we instead want to
  construct a QVariant for a given metatype (was: metatype id in Qt 5)

Pick-to: 6.0
Change-Id: I1ac19dec5549b424a9429f69999eaf8e96c022e2
Reviewed-by: Ulf Hermann <ulf.hermann@qt.io>
2021-01-27 15:00:56 +01:00
Mårten Nordheim
d3735ff838 Fix schannel compilation issues
Amends 7cf8e5ada9

Change-Id: I6e188675ab53fd173bd75defe9d190a509f4adad
Reviewed-by: Timur Pocheptsov <timur.pocheptsov@qt.io>
2021-01-27 15:00:56 +01:00
Allan Sandfeld Jensen
05741b404a Protect against sign-change of size on 32bit
Since qsizetype is signed and the profileSize unsigned, it can turn
negative circumventing the test here.

Fixes oss-fuzz issue 29278.

Pick-to: 6.0 5.15
Change-Id: I1e211c78db6f4ff150613f52d8fc29807f0088ff
Reviewed-by: Robert Löhning <robert.loehning@qt.io>
Reviewed-by: Eirik Aavitsland <eirik.aavitsland@qt.io>
2021-01-27 10:30:26 +01:00
Juha Vuolle
a543e8f42e Fix QT_TOOL_PATH_SETUP_COMMAND
Commit 18fc9e1bf8 introduced a
Windows-only QT_TOOL_PATH_SETUP_COMMAND to make it possible to
call the tool of a module while building the module itself.
The "set PATH=..." command in QT_TOOL_PATH_SETUP_COMMAND was flawed,
because it contained escaped double quotes which made the set command ineffective.

Fix this by removing the escaping of the double quotes.
This was uncovered when porting qtscxml to CMake.

Change-Id: I5909aa841e7895d6d0feb4037a935b805ccfdc99
Reviewed-by: Joerg Bornemann <joerg.bornemann@qt.io>
2021-01-27 11:30:26 +02:00
Timur Pocheptsov
dcbca2975f Q_GLOBAL_STATIC - deal with static code analysers
At least some of them don't like the fact we have classes with
non-trivial destructors but trivial move/copy constructors -
disable them explicitly, hopefully those analysers are smart
enough to stop complaining.

Change-Id: I285711a2d21bff89661af928ba326ecd5b69823f
Reviewed-by: Volker Hilsheimer <volker.hilsheimer@qt.io>
Reviewed-by: Mårten Nordheim <marten.nordheim@qt.io>
Reviewed-by: Edward Welbourne <edward.welbourne@qt.io>
2021-01-27 10:30:26 +01:00
Fabian Kosmale
bf7b1a2aa8 QVariant: Do not destroy trivial types
perf indicates that we spend quite some time in ~QVariant in the
referenced task's benchmark. With this patch, we significantly reduce
the amount of work we do in the destructor for trivial types: Instead of
calling an out-of-line function, which does a few checks and then does
an indirect call through a function pointer to a do-nothing dtor before
freeing the memory, we now simply free the memory.

We achieve this by changing QMetaTypeInterface to leave the dtor
function pointer null if the type is trivially destructible. Then, in
QVariant we use the QMetaTypeInterface directly instead of going through
QMetaType.

Task-number: QTBUG-90560
Change-Id: Iaf87036710e1680323842e1ba703a5d3d0e5027a
Reviewed-by: Lars Knoll <lars.knoll@qt.io>
2021-01-27 10:30:26 +01:00
Thiago Macieira
00b759a8d0 QJsonObject::take: add missing detach() call
We were modifying shared objects.

Pick-to: 6.0 5.15
Fixes: QTBUG-89625
Change-Id: Id6bc735b79cf4beb9454fffd165c56476a5dec04
Reviewed-by: Volker Hilsheimer <volker.hilsheimer@qt.io>
Reviewed-by: Christian Ehrlicher <ch.ehrlicher@gmx.de>
2021-01-27 05:11:39 +00:00
ChunLin Wang
6da6b6da44 Fix that the placeholdertext of QCombobox is not drawn
If the current index is invalid,a placeholdertext will be displayed.

Fixes: QTBUG-90595
Pick-to: 6.0 5.15.2
Change-Id: Id4c6b9c959242b96ee0944b8fc3131a9a2fdcccc
Reviewed-by: Christian Ehrlicher <ch.ehrlicher@gmx.de>
2021-01-27 09:11:42 +08:00
Valery Volgutov
f7f618b312 evdevtouch: Fix normalizedPosition
Set the available virtual screen geometry. This geometry is needed for
QEventPoint::normalizedPosition calculation.

Pick-to: 6.0
Change-Id: I7e25488d62a5099c14b5c15fa2b4040ea32b9ecd
Reviewed-by: Volker Hilsheimer <volker.hilsheimer@qt.io>
Reviewed-by: Jaeyoon Jung <jaeyoon.jung@lge.com>
2021-01-27 00:56:05 +00:00
Sona Kurazyan
ba62256c5a Port QStandardItemModel to the new property system
Task-number: QTBUG-85520
Task-number: QTBUG-85521
Change-Id: I2f9bbe8bc06838fcbadd446e111fb697120f550c
Reviewed-by: Ivan Solovev <ivan.solovev@qt.io>
Reviewed-by: Edward Welbourne <edward.welbourne@qt.io>
2021-01-26 21:48:00 +01:00
Ivan Solovev
709a0942aa QTimer: port to new property system
Task-number: QTBUG-85520
Change-Id: I1f92b86619f2ca186c505251b21463f396af0ac6
Reviewed-by: Qt CI Bot <qt_ci_bot@qt-project.org>
Reviewed-by: Edward Welbourne <edward.welbourne@qt.io>
Reviewed-by: Andreas Buhr <andreas.buhr@qt.io>
2021-01-26 21:47:50 +01:00
Sona Kurazyan
519420641f Port QPauseAnimation to the new property system
Task-number: QTBUG-85520
Change-Id: I8c0ee86598f4c0f093f64b2891ee835a43964b84
Reviewed-by: Andreas Buhr <andreas.buhr@qt.io>
Reviewed-by: Edward Welbourne <edward.welbourne@qt.io>
2021-01-26 21:47:47 +01:00
Andy Shaw
feb20459bd ibase: Fix the compilation and include it again so it can be detected
Change-Id: I38721155f090173862da8beab8cb04b2e015dcff
Reviewed-by: Christian Ehrlicher <ch.ehrlicher@gmx.de>
2021-01-26 21:47:36 +01:00
Ivan Solovev
fe7cbf8fe6 QRegularExpression: add move constructor
- Add move constructors to QRegularExpression, QRegularExpressionMatch
  and QRegularExpressionMatchIterator.
- Update the documentation to explicitly state that only destructor
  and assignment operators can be called for a moved-from object

Task-number: QTBUG-86634
Change-Id: I06b4f54e300541033a9a18339c97338717a06da0
Reviewed-by: Edward Welbourne <edward.welbourne@qt.io>
Reviewed-by: Alex Blasche <alexander.blasche@qt.io>
2021-01-26 17:20:01 +01:00
Alexey Edelev
114d5c045d Fix invalid Qt prefix version when looking for HostInfo module
In QtSetup.cmake the PROJECT_VERSION_MAJOR variable was used to
identify prefix of 'Qt<version>HostInfoConfig.cmake'.
Qt<version>HostInfo is not found, if project version differs
from qtbase version.

Move the 'INSTALL_CMAKE_NAMESPACE' and 'QT_CMAKE_EXPORT_NAMESPACE'
variables to 'QtBuildInternalsConfig.cmake'. In this case
variables will be exposed for a wider list of internal routines.

Use the 'INSTALL_CMAKE_NAMESPACE' variable as prefix to find
Qt<version>HostInfo module.

Fixes: QTBUG-90345
Change-Id: Ic595d1c5beb74f34e69b58e18590a3afc2f346f7
Reviewed-by: Qt CI Bot <qt_ci_bot@qt-project.org>
Reviewed-by: Joerg Bornemann <joerg.bornemann@qt.io>
2021-01-26 17:16:04 +01:00
Bastien Bouclet
b69b04c479 QIcon: Use the @nx pixmaps in the paint method
Make use of the device pixel ratio in the QIcon paint method so the @nx
hi-dpi pixmaps are selected when appropriate when painting to a
QPainter.

Pick-to: 6.0
Fixes: QTBUG-90042
Change-Id: I53995a2285ef879e3c4fddb9f8da702e256a260f
Reviewed-by: Eirik Aavitsland <eirik.aavitsland@qt.io>
2021-01-26 15:33:08 +00:00
Alexey Edelev
127a1ada32 Change XCB::XFIXES condition in library mapping
Replace condition of XCB::XFIXES from the 'XCB_XFIXES_FOUND' variable
to 'TARGET XCB::XFIXES'.

Fixes: QTBUG-89979
Change-Id: I77b8b4046dc6852ecb209d942ee94d864a35c378
Reviewed-by: Joerg Bornemann <joerg.bornemann@qt.io>
2021-01-26 16:18:24 +01:00
Alexey Edelev
e3e1fc4820 Add upstream version of FindPostgreSQL.cmake
Add CMake upstream(3.20.0) version of FindPostgreSQL.cmake, to avoid
server-related headers lookup.
Avoid using the Qt version of the PostgreSQL module, if it's
older than the CMake's one.

Fixes: QTBUG-89639
Change-Id: I71a0c3508000901969933aea8a08d1ad431db711
Reviewed-by: Craig Scott <craig.scott@qt.io>
Reviewed-by: Joerg Bornemann <joerg.bornemann@qt.io>
2021-01-26 16:05:05 +01:00
Fabian Kosmale
293b7fab55 Workaround MinGW not handling error suppression macro correctly
Fixes: QTBUG-90353
Change-Id: I9270f4107f3f7083d28228f2426b34bc1e198112
Reviewed-by: Edward Welbourne <edward.welbourne@qt.io>
Reviewed-by: Kai Koehne <kai.koehne@qt.io>
Reviewed-by: Volker Hilsheimer <volker.hilsheimer@qt.io>
2021-01-26 15:55:21 +01:00
Volodymyr Samokhatko
976f28e7bb Fix populating selection clipboard with keyboard
Task-number: QTBUG-59879
Pick-to: 6.0 5.15
Change-Id: I6948919fc90995c60a34b5bd6b4a225c1a59fd9b
Reviewed-by: Liang Qi <liang.qi@qt.io>
2021-01-26 12:28:49 +00:00
Andy Nichols
3509fc3a1f Android: Fix deprecated QVariant usage
Change-Id: Ib14bbba726d1da352933ed418931d69443720946
Reviewed-by: Edward Welbourne <edward.welbourne@qt.io>
2021-01-26 13:28:35 +01:00
Mårten Nordheim
6cd5448404 Don't forward-declare non-Qt things with QT_FORWARD_DECLARE_*
As it breaks in namespace builds

Change-Id: I1a278330eeea6b2b89c8a57c0df828dff94ebf7a
Reviewed-by: Tor Arne Vestbø <tor.arne.vestbo@qt.io>
2021-01-26 13:28:35 +01:00
Tor Arne Vestbø
c4c0c54ba1 Clean up QCocoaFileDialogHelper
- Remove indirections via helper functions that did nothing but
   redirect.
 - Remove unneeded checks of !m_helper in delegate. The helper is
   always valid for a delegate.
 - Use m_ prefix for member variables, as in the rest of Qt.
 - Implement init: as per modern Objective-C recommendations.
 - Remove respondsToSelector checks that were not needed.
 - Use modern Objective-C property syntax.
 - Fix code style issues/formatting.
 - Remove unused functions.
 - Reorder and remove unused includes.
 - Class-initialize member variables.

Change-Id: Iedc084b67bb496b2ef13001a0e6aa46d4574eb57
Reviewed-by: Morten Johan Sørvig <morten.sorvig@qt.io>
Reviewed-by: Tor Arne Vestbø <tor.arne.vestbo@qt.io>
2021-01-26 13:28:35 +01:00
Tor Arne Vestbø
d7c07578bc macOS: Don't restrict non-modal file dialogs to open-dialogs only
None of the APIs used for non-modal operation require NSOpenPanel.

Pick-to: 6.0 5.15
Change-Id: I7ea49a8dad6e724a8a0d4321ea443d4cdcc5a6b1
Reviewed-by: Morten Johan Sørvig <morten.sorvig@qt.io>
2021-01-26 13:28:35 +01:00
Tor Arne Vestbø
fce391fefb macOS: Show system tray icon on mouse button press, not release
This was a regression from 395e2d9bc4.

The system behavior is to show the menu on press, so we follow that.

This is also documented at:

 https://doc.qt.io/qt-5/qsystemtrayicon.html#ActivationReason-enum

Fixes: QTBUG-86518
Pick-to: 6.0 5.15
Change-Id: Ia4dc5356bf0377a9d55f238caf5bf1becd95648d
Reviewed-by: Volker Hilsheimer <volker.hilsheimer@qt.io>
2021-01-26 13:28:35 +01:00
Fabian Kosmale
37b0bad8ad QVariant: avoid superfluous QMetaType lookup
Constructing a QMetaType from an id requires a lookup which isn't free,
even for builtin types. When constructing a QVariant from an integer,
this leads to a noticeable performance loss.

In the mirco-benchmark of the linked bug, we improve from
100000000 965
to
100000000 789
on Linux, Intel i5-4690, clang 11.01 with a CMake release build.
This however still does not recover the performance we had in Qt 5.

Task-number: QTBUG-90560
Change-Id: I26440bdc04ef131ce91d3698957f0df43a4c4017
Reviewed-by: Lars Knoll <lars.knoll@qt.io>
Reviewed-by: Andrei Golubev <andrei.golubev@qt.io>
2021-01-26 11:36:48 +01:00
Ulf Hermann
606b03d0a3 Partially revert 813a928c7c
Otherwise ASAN complains about mismatched new/delete.

Change-Id: I76ddcc388309e20055c93c68b9b6fa8a11b884e1
Reviewed-by: Andrei Golubev <andrei.golubev@qt.io>
Reviewed-by: Ville Voutilainen <ville.voutilainen@qt.io>
2021-01-26 10:57:42 +01:00
Lars Knoll
92db806aa8 Update QMutexLocker documentation
And add an entry about the API changes to qt6-changed.qdoc.

Pick-to: 6.0
Task-number: QTBUG-89429
Change-Id: I146574acd3e4aa5ed6f1629fc68888f009472f19
Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
2021-01-26 10:04:11 +01:00
Andrei Golubev
37e26d2b30 Extend alignment of QArrayData to std::max_align_t in allocation
Make stricter alignment requirements for the allocated header

This strict alignment allows reallocateUnaligned() to property account
for the padding occurring in cases when
alignof(QArrayData) < alignof(T) <= alignof(std::max_align_t), which
happens to be the case on e.g. 32-bit platforms with specific alignment
requirements.

This adds 4 bytes (the difference between alignof(std::max_align_t) and
sizeof(QArrayData)) of overhead for QString, QByteArray and certain QLists
on 32-bit systems.

Task-number: QTBUG-90359
Pick-to: 6.0
Change-Id: I8176a4cc79f100ee772b09425e88fe8ff3ae226a
Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
Reviewed-by: Qt CI Bot <qt_ci_bot@qt-project.org>
2021-01-26 08:01:27 +00:00
Craig Scott
ecc2a28cab Ensure consistent flags for ASM language and MODULE targets
By not including ASM in the languages for which compiler flags are
adjusted, we can end up with inconsistent optimization and debug
settings between different languages. Make sure they are treated the
same.

Similarly, linker flags for MODULE target types should also have their
debugging and incremental linking flags adjusted, just like EXE and
SHARED targets. When building with MSVC, MODULE targets were having
the relevant flags stripped, but not then replaced with the desired
ones, leaving them empty in typical scenarios. This would primarily
affect plugins, which are built as MODULE rather than SHARED libraries.

Fixes: QTBUG-90237
Change-Id: I648ea74be1654d24cbecc592ce0ca4b59b2ae839
Reviewed-by: Joerg Bornemann <joerg.bornemann@qt.io>
Reviewed-by: Qt CI Bot <qt_ci_bot@qt-project.org>
2021-01-26 02:41:38 +01:00
Alexey Edelev
7c69eb8868 Use system PCRE2 for Bootstrap library
By default, use system PCRE2 for Bootstrap library, if not
cross-compiling.

Fixes: QTBUG-90556
Change-Id: I7291927565484073cadacec9a381b54b44ebeaec
Reviewed-by: Joerg Bornemann <joerg.bornemann@qt.io>
2021-01-25 20:55:14 +01:00
Kai Köhne
cf96836018 Update start of cmake/README.md
Make the document reflect the current status of the port.

Also link to https://doc.qt.io/qt-6/build-sources.html  and
https://wiki.qt.io/Building_Qt_6_from_Git as official sources
on how to build Qt. This document should IMO rather
concentrate on documenting the build system internals.

Pick-to: 6.0
Change-Id: If62cb966b41b7452edb5b63725756916b66affac
Reviewed-by: Craig Scott <craig.scott@qt.io>
Reviewed-by: Joerg Bornemann <joerg.bornemann@qt.io>
2021-01-25 20:01:00 +01:00
Kai Köhne
87ffd79622 QMimeDatabase/xml: support both 'xmlstarlet' and 'xml' for minifying XML
Commit 370324f6e2 changed the call to 'xml' to 'xmlstarlet' because
some Linux distributions do not provide a binary called xml. Anyhow,
the official Windows packages of xmlstarlet only provide 'xml.exe'.

Therefore just check for both.

Pick-to: 5.15 6.0
Change-Id: I4381b256850e4101b760df21f2b0baffb4414620
Reviewed-by: Eric Lemanissier <eric.lemanissier@gmail.com>
Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
2021-01-25 19:00:53 +00:00
Kai Köhne
9165866b19 Bump copyright year to 2021
Change-Id: I18a9c2de391ca51655148b2e3cc9abdfbb8ddbcf
Reviewed-by: Tarja Sundqvist <tarja.sundqvist@qt.io>
Reviewed-by: Joerg Bornemann <joerg.bornemann@qt.io>
2021-01-25 20:00:44 +01:00
Kai Köhne
e7c028bb9c QLocale: Allow direct conversion from language, country, and script codes
This complements patch a148c7b5d71d244, where languageToCode(),
countryToCode() scriptToCode() methods were introduced, with matching
codeToLanguage(), codeToCountry(), and codeToScript() methods.

This allows us to remove the use of private Qt Core API in Qt Linguist.

[ChangeLog][QtCore][QLocale] Added static codeToLanguage(),
codeToCountry(), codeToScript() methods that convert ISO code strings
to the respective enum values.

Change-Id: If5c0843a718c006ade086a6f74ceb86ac6e0fce4
Reviewed-by: Edward Welbourne <edward.welbourne@qt.io>
2021-01-25 19:56:59 +01:00
Tor Arne Vestbø
aa3b42d634 macOS: Don't exec file dialogs via runModal unless they are app modal
Non-modal or window modal dialogs are shown at show(), via AppKit APIs
that are non-blocking. If we want to block execution at this point, we
need to spin our own event loop. The runModal API of NSSavePanel is not
meant to be used for blocking execution for already shown dialogs, but
is reserved for application modal dialogs.

This means we no longer trip over AppKit's understanding of what state
the dialog is in, which would result in the dialog not reporting back
any files. It also allows us to remove the guard for closing dialogs
twice.

We now also correctly close and end the application modal session if
the dialog is closed programmatically using Qt APIs.

Task-number: QTBUG-89959
Fixes: QTBUG-85547
Pick-to: 6.0 5.15
Change-Id: Ida3dc404417789d4823822ecfbf0935591c23878
Reviewed-by: Morten Johan Sørvig <morten.sorvig@qt.io>
2021-01-25 18:26:47 +01:00