Commit Graph

48995 Commits

Author SHA1 Message Date
Andrei Golubev
504972f838 Refine {QString, QBA}::reallocData() logic
Fixed misleading naming of "slowReallocatePath". It's no longer "slow",
it's downright dangerous now to reallocate under certain conditions

While at it, added extra assert to QArrayData::reallocateUnaligned()
and cleaned up that function a bit

Change-Id: I05921fb5058eb563997e66107566c87fb4ea5599
Reviewed-by: Lars Knoll <lars.knoll@qt.io>
Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
2020-11-06 10:16:31 +01:00
Assam Boudjelthia
42f8afc2dc CMake: add --apk to androiddeployqt to copy resulting apk to build dir
Task-number: QTQAINFRA-3867
Change-Id: If036aa88d8e9db3ddc9d27811ccfafa1152a9f2a
Reviewed-by: Alexandru Croitor <alexandru.croitor@qt.io>
2020-11-06 11:16:30 +02:00
Morten Johan Sørvig
52ce0c177e Set the url to have the AtNx filename if one is found
There’s no need to convert the file name/path to QUrl,
and then back again to QString before calling qt_findAtNxFile().

Call qt_findAtNxFile first, and then convert to QUrl.
This makes sure the url-name and string-name stays
in sync.

Change-Id: I8b8939eabbdaff473945ebe31faafd408e9c4295
Pick-to: 5.15
Fixes: QTBUG-60793
Reviewed-by: Andy Shaw <andy.shaw@qt.io>
2020-11-06 09:16:30 +00:00
Fabian Kosmale
83982ac1c5 pro2cmake: Support QML_PAST_MAJOR_VERSIONS
Change-Id: I47504d6c032c9a6ace7440580f0081cc5f254038
Reviewed-by: Maximilian Goldstein <max.goldstein@qt.io>
Reviewed-by: Alexandru Croitor <alexandru.croitor@qt.io>
2020-11-06 10:16:30 +01:00
Joerg Bornemann
ca59c20939 CMake: Fix usage of cache variables in qt.toolchain.cmake
We have some cache variables that are used in our qt.toolchain.cmake
toolchain file, for example QT_CHAINLOAD_TOOLCHAIN_FILE. When CMake
runs a configure test with try_compile, our toolchain file is included
again, but only a restricted set of variables is available.

Add the variables that are used in our internal toolchain file to
CMAKE_TRY_COMPILE_PLATFORM_VARIABLES. This makes them visible for
try_compile calls operating on source files.

Also pass the variables via the environment to support try_compile
calls that operate on whole projects.

Fixes: QTBUG-87873
Change-Id: Iebca9e23686bec5072194b15482e1782b9367a0e
Reviewed-by: Alexandru Croitor <alexandru.croitor@qt.io>
2020-11-05 13:04:56 +01:00
Martin Storsjö
48faa8ed5a Add _MSC_VER check to MSVC ARM compiler workaround
While _M_ARM is a MSVC specific builtin define, mingw headers do
also define it (in code, as opposed to a compiler built in
define), just as the same headers do for e.g. _M_IX86 and _M_X64.

This avoids warnings about unrecognized pragmas, when compiling
for armv7 mingw.

The original compiler bug (from QTBUG-42038) probably already is
fixed and/or no longer in scope.

Change-Id: I98722e2a7ee1de4f1937a866555ec460f5d898d1
Pick-to: 5.15
Reviewed-by: Friedemann Kleint <Friedemann.Kleint@qt.io>
2020-11-05 14:04:55 +02:00
Volker Hilsheimer
66d2bf7659 Give batch files CRLF line endings
Batch files should be CRLF, otherwise they may end up triggering an
"The system cannot find the batch label specified" error.

Relying on core.autocrlf to ensure this runs the risk of the user not
having the config set correctly, and also doesn't cover the use of
the same source checkouts across platforms.

Change-Id: I3166b99ce38e4ba9a0674336d69aa915e27860d1
Reviewed-by: Tor Arne Vestbø <tor.arne.vestbo@qt.io>
Reviewed-by: Oswald Buddenhagen <oswald.buddenhagen@gmx.de>
2020-11-04 15:02:29 +00:00
Joni Poikelin
8d5b7df0b6 Mark changed regions dirty instead of bounding box of changes
This helps a bit with LinuxFB on low end devices.

Change-Id: I16fcce23e7073272d1d1c6bc660c255163b96c30
Fixes: QTBUG-88174
Reviewed-by: Laszlo Agocs <laszlo.agocs@qt.io>
2020-11-04 13:38:19 +02:00
Assam Boudjelthia
039d3fe4e8 Android: blacklist a list of failing tests for android
We want to re-enable Android tests in QTQAINFRA-3867. However,
many tests are failing already preventing that from happening.
QTBUG-87025 is currently keeping track (links) to all of those
failing tests.

The current proposal is to hide those failing tests, and enable
Android test running in COIN for other tests. After, that try
to fix them one by one, and at the same time we can make sure
no more failing tests go unnoticed.

Task-number: QTBUG-87025
Change-Id: Ic1fe9fdd167cbcfd99efce9a09c69c344a36bbe4
Reviewed-by: Alexandru Croitor <alexandru.croitor@qt.io>
2020-11-04 12:27:49 +02:00
Andrei Golubev
a7b6f0391b Always use fast path in QString::append(QLatin1String)
This must be possible with a new set of changes and the way QString
reallocates

Task-number: QTBUG-86583
Change-Id: I513f51d7c6e984ae4e81fc344138687c791037c4
Reviewed-by: Qt CI Bot <qt_ci_bot@qt-project.org>
Reviewed-by: Mårten Nordheim <marten.nordheim@qt.io>
Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
Reviewed-by: Lars Knoll <lars.knoll@qt.io>
2020-11-04 11:22:20 +01:00
Lars Knoll
1282c05cdc Rename AllocationPosition enum and its members
Use GrowsAt* and GrowthPosition as that is clearer.

Change-Id: I3c173797dec3620f508156efc0c51b4d2cd3e142
Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
2020-11-04 10:22:16 +00:00
Lars Knoll
edd1e931d1 Fix performance issue with QList::insert() for complex T
When storing complex types in the list and inserting in the middle,
we ended up in some cases moving the items in the list onto itself,
to make space for 0 new items.

Obviously that's not a very good idea. It was not a huge deal for
POD or relocatable types as we'd use memmove in that case which would
return quickly. But for complex types, we actually did copy around
half of the items stored in the list onto themselves.

Change-Id: I54467dccf2e17ba4a604bded755242197dd96b06
Reviewed-by: Mårten Nordheim <marten.nordheim@qt.io>
Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
Reviewed-by: Andrei Golubev <andrei.golubev@qt.io>
2020-11-04 11:22:11 +01:00
Lars Knoll
4d49459e4b Properly implement emplaceBack/Front() in QArrayDataOps
This improves the performance of QList<QString>::append/prepend()
and we now beat QVector in Qt 5. QList from Qt 5 is still a bit
better for QString, but this might be related to the fact that
QString in Qt 6 is larger than in Qt 5.

Appending 20M integers to the list gives:

Qt 6:             35ms
Qt 5.15/QVector:  99ms
Qt 5.15/QList:    78ms

Appending 20M QStrings to the list gives:

Qt 6:            172ms
Qt 5.15/QVector: 194ms
Qt 5.15/QList:   136ms

Appending 20M structs of three pointers gives (100M will
crash in Qt5 as 100M*24bytes overflows):

Qt 6:            109ms
Qt 5.15/QVector: 272ms
Qt 5.15/QList:   469ms

Prepending 20M integers to the list gives:

Qt 6:             58ms
Qt 5.15/QList:    90ms

Prepending 20M QStrings to the list gives:

Qt 6:            448ms
Qt 5.15/QList:   147ms

Prepending 20M structs of three pointers gives (100M will
crash in Qt5 as 100M*24bytes overflows):

Qt 6:            267ms
Qt 5.15/QList:   435ms

No numbers for prepending to a QVector in 5.15 as the operation
was O(n) there. The difference in time between append and prepend
comes from the fact that our growth policy favors appending to
some extent.

Change-Id: Ice4598df5ca408413bfb00f5fe05e0b8d512623d
Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
Reviewed-by: Andrei Golubev <andrei.golubev@qt.io>
2020-11-04 11:22:07 +01:00
Andrei Golubev
2e8656779a Introduce QADP::reallocateGrow()
Added realloc() code path to QMovableArrayOps

Implemented fast realloc() based growing for QADP and used it in
QList::emplaceBack. This gives quite a bit of speedup and shows better
results than 5.15 at 100k+ iterations of "list.append(elem)", meanwhile
also closing a gap between movable types

Task-number: QTBUG-87330
Change-Id: I42fc182ecd93c85600dac622385152fc57735da8
Reviewed-by: Mårten Nordheim <marten.nordheim@qt.io>
Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
2020-11-04 11:22:03 +01:00
Andrei Golubev
8f7016252a Implement QList::emplaceBack as a proper function
My endeavours figuring out why QList::append(elem) gives worst
performance compared to 5.15 ended up into this commit. After some
straightforward fixes, what was left is "everything is uniformly worse"
and takes more CPU cycles

Introduce emplaceBack implementation as append is quite a special case
that could be greatly simplified. This is a "straightforward" part of
the optimizations

While at it, change append(t) to use emplaceBack(t)

For workloads like:
QList<int> list;
forever {
  list.append(0);
}
this gives huge improvement (roughly 30% for 10k+ elements),
movable and complex types also get a tiny speedup

Task-number: QTBUG-87330
Change-Id: I9261084e545c24e5473234220d2a3f2cd26c2b7f
Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
Reviewed-by: Mårten Nordheim <marten.nordheim@qt.io>
2020-11-04 11:21:59 +01:00
Lars Knoll
4deb0d1737 Remove the old insert methods in QArrayDataOps
Inline them into the one place they are called from
and remove duplicated code.

Change-Id: Ica88485e98625905083b16c24ee9eaf223a89ae0
Reviewed-by: Mårten Nordheim <marten.nordheim@qt.io>
Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
Reviewed-by: Andrei Golubev <andrei.golubev@qt.io>
2020-11-04 11:21:54 +01:00
Lars Knoll
9ee50a14b7 Move insert() operation into QArrayDataOps
This allows us to unify and simplify the code base between QList,
QString and QByteArray.

Change-Id: Idc8f360d78f508a68f38eb3ef0ed6e5d37f90574
Reviewed-by: Andrei Golubev <andrei.golubev@qt.io>
Reviewed-by: Mårten Nordheim <marten.nordheim@qt.io>
2020-11-04 11:21:50 +01:00
Lars Knoll
b76fbb48fb Clean up out allocation handling
Get rid of the allocation options inside the flags
field of QArrayData, they are really a completely
separate thing.

Change-Id: I823750ab9e4ca85642a0bd0e471ee79c9cde43fb
Reviewed-by: Andrei Golubev <andrei.golubev@qt.io>
Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
2020-11-04 11:21:46 +01:00
Lars Knoll
419eaa0679 Cleanup QArrayDataOps::reallocate() and related
Don't use QArrayData::GrowsForward/Backward anymore and replace
it with a simple 'bool grow'.

Change-Id: Ifddfef3ae860b11dda4c40854c71ef2aeb29df34
Reviewed-by: Andrei Golubev <andrei.golubev@qt.io>
Reviewed-by: Mårten Nordheim <marten.nordheim@qt.io>
Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
2020-11-04 11:21:41 +01:00
Lars Knoll
32a703e277 Don't move data in QArrayDataOps::reallocate()
reallocate() should only ever call realloc(), and only be used to
create more space at the end of the data.

Change-Id: I2ac4dbc90d2afaa571bb620108d7984356712cb2
Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
Reviewed-by: Andrei Golubev <andrei.golubev@qt.io>
2020-11-04 11:21:37 +01:00
Lars Knoll
50ec3252ac Do not move data around on insert neither
The while insertion logic will need further work to make it
more efficient. Currently it does use copy construction and
assignment for internal moving instead of move operations.

Change-Id: I7ae3094daa43a44629d8fa89ab6562c2a21b6cbd
Reviewed-by: Mårten Nordheim <marten.nordheim@qt.io>
Reviewed-by: Andrei Golubev <andrei.golubev@qt.io>
Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
2020-11-04 11:21:32 +01:00
Lars Knoll
90fadbb365 Remove the prepare call in QArrayData::appendInitialize()
It's causing a performance bottleneck and is not required anymore
after changing the allocation strategy.

Take the opportunity to change the signature from using size_t to
qsizetype.

Change-Id: I74ff1637007cf7072de80e7383a23fdfe1ccd986
Reviewed-by: Andrei Golubev <andrei.golubev@qt.io>
Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
2020-11-04 11:21:27 +01:00
Lars Knoll
b99271caa6 Avoid expensive iterator calculations in append()
Avoid moving data inside the array to create free
space at one end. This is a performance bottleneck,
as it required quite a lot of calculations for every
insert. Rather reallocate and grow in this case,
so we only need to do expensive work when we reallocate
the array.

Change-Id: Ifc955fbcf9967c3b66aa2600e0627aac15f0c917
Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
Reviewed-by: Andrei Golubev <andrei.golubev@qt.io>
2020-11-04 11:21:22 +01:00
Lars Knoll
e5f80c1b03 Remove unused parameter
Change-Id: Idceb7ee3ce752b62ed6800b0a1004832a4c48af7
Reviewed-by: Andrei Golubev <andrei.golubev@qt.io>
Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
2020-11-04 11:21:16 +01:00
Andrei Golubev
7eed57511a QArrayDataPointer: redesign (and simplify) growth policy
It looks like we can drastically simplify the way QADP grows without
sacrificing much:
1. append-only use cases should have the same performance as before
2. prepend-only use cases should (with the help of other commits) get
   additional performance speedup
3. mid-insertion is harder to reason about, but it is either unchanged
   or benefits a bit as there's some free space at both ends now
4. mixed prepend/append cases are weird and would keep excess free
   space around but this is less critical and overall less used AFAIK

Now, QList would actually start to feel like a double-ended container
instead of "it's QVector but with faster prepend". This commit should
help close the performance gap between 6.0 and 5.15 as well

As a drawback, we will most likely have more space allocated in mixed
and mid-insert cases. This needs to be checked

Task-number: QTBUG-86583
Change-Id: I7c6ede896144920fe01862b9fe789c8fdfc11f80
Reviewed-by: Lars Knoll <lars.knoll@qt.io>
Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
2020-11-04 11:21:12 +01:00
Andrei Golubev
12718e5ea2 Add QList::emplaceFront() that fixes huge performance issue in prepend
Prepend in QList was using insert() logic that always uses append-aware
functions. This results in the fact that freeSpaceAtBegin() is always 0
and forces us to actually allocate on *every* call (with the same
capacity!). Vicious cycle is hot-fixable with introduction of
emplaceFront (or anything prepend-aware, really)

This brings me from 632ms to 0.65ms for 100k iterations of
list.prepend(int(0)). Still ~3x worse than QList in 5.15 but much
faster than QVector, which takes 382ms in the same workload

Not addressed:
- QString/QBA
- Other prepend functions in QList e.g. prepend(it1, it2)
- Lower-level array operations that should just be extended

Task-number: QTBUG-86583
Change-Id: Ie82b07d81a67605cd308d9fabf9532d57935647f
Reviewed-by: Lars Knoll <lars.knoll@qt.io>
Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
2020-11-04 11:21:06 +01:00
Andrei Golubev
02a5928fa5 Add QList/QVector benchmark tests
Added some simple benchmarks for QList insertion of 1 element

Added same tests for QVector (within the same file) for 5.15

Task-number: QTBUG-87330
Task-number: QTBUG-86583
Pick-to: 5.15
Change-Id: I19a851c79cf5ce0329266883e99ecaf2d6b3df19
Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
2020-11-04 11:21:01 +01:00
Morten Johan Sørvig
4035fdd820 wasm: don’t deadlock on event processing
emscripten_async_run_in_main_runtime_thread_ schedules
an async call on the on the main thread. However, the
calls are ordered, also in respect to _synchronous_ calls
to the main thread (for example those made during file
write/flush).

Making a synchronous call from a secondary thread may
then cause Emscripten to service previously scheduled
async calls during the synchronous call. This can cause
a deadlock if:

- a secondary thread makes a sync call while holding a lock, and
- a previously scheduled async call attempt to acquire the same
  lock on the main thread.

(See https://github.com/emscripten-core/emscripten/issues/10155
for sample code)

Avoid this case by adding a second zero-timer async call;
this way Qt should process events when the main thread
becomes idle.

Change-Id: I221fe4e25bbb1a56627e63c3d1809e40ccefb030
Pick-to: 5.15
Reviewed-by: Lorn Potter <lorn.potter@gmail.com>
2020-11-04 10:17:09 +00:00
Yuhang Zhao
f9e45287d8 CMake: don't add the same parameter twice
Change-Id: Ic5001f296b56f1181f5e37718e090f931eca8b50
Reviewed-by: Alexandru Croitor <alexandru.croitor@qt.io>
2020-11-04 10:07:50 +00:00
Mårten Nordheim
319fa51fa4 QtNetwork: highlight DTLS client and server example
Change-Id: Ie6aaf0c15daaf63f9c7dd172c7a775d4076e4b16
Reviewed-by: Timur Pocheptsov <timur.pocheptsov@qt.io>
Reviewed-by: Alex Blasche <alexander.blasche@qt.io>
Reviewed-by: Topi Reiniö <topi.reinio@qt.io>
2020-11-04 09:59:09 +01:00
Sona Kurazyan
62a741cd2b Improve QtConcurrent::blockingMapped tests
QtConcurrent::blockingMapped was not able to determine the result
type in case of passing containers that have more than one template
argument. This should be fixed by the parrent commit.

Also fixed some unrelated compiler warnings.

Change-Id: I96618dc955c5e4c3792f28f6436d6851745dc01d
Reviewed-by: Lars Knoll <lars.knoll@qt.io>
Reviewed-by: Jarek Kobus <jaroslaw.kobus@qt.io>
Reviewed-by: Mårten Nordheim <marten.nordheim@qt.io>
2020-11-04 09:40:12 +01:00
Allan Sandfeld Jensen
b26fa9722f Add multi key bindings to QShortcut
This makes it feature comparable with QAction, and makes it possible
to use as a backend for QAction, and fixes a few missing alternative
keybindings in qtwidgets.

Change-Id: Iaefc630b96c4743fc5ef429dc841870ddd99fc64
Reviewed-by: Tor Arne Vestbø <tor.arne.vestbo@qt.io>
Reviewed-by: Volker Hilsheimer <volker.hilsheimer@qt.io>
Reviewed-by: Lars Knoll <lars.knoll@qt.io>
2020-11-04 10:32:38 +02:00
Kai Koehne
8fa93272f0 Doc: Fix mentioning of Qt5Core in overview page
Change-Id: If6ae12117c95a6c843dfd93735590e17b8d2d2a3
Reviewed-by: Paul Wicking <paul.wicking@qt.io>
2020-11-04 09:20:17 +01:00
Allan Sandfeld Jensen
02c2a58cdf Avoid allocation on char16_t* comparisons
Compare as QStringView

Change-Id: I151d17ac20da30266776ca369ca8221017174f84
Reviewed-by: Lars Knoll <lars.knoll@qt.io>
Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
2020-11-04 08:58:26 +01:00
David Skoland
e674ee5328 Add quotes to cmake_args in guess_compiler_from_mkspec function
These were omitted in the original change, which cause cmake builds to
fail configuring

Change-Id: I37996099aaa0d912ce06b1f06c175cc5cf159e33
Reviewed-by: Joerg Bornemann <joerg.bornemann@qt.io>
2020-11-04 08:08:19 +01:00
Volker Hilsheimer
255cc9abfb Initial porting guide for QtGui and QtPrintSupport
Additional porting documentation for QtWidgets.

Task-number: QTBUG-88149
Task-number: QTBUG-88151
Change-Id: Ia28f01a8d8d6eaee9d8f08af1a54b76e57620cab
Reviewed-by: Paul Wicking <paul.wicking@qt.io>
2020-11-04 06:57:29 +01:00
Martin Storsjö
317145af84 qglobal: Only define QT_ENSURE_STACK_ALIGNED_FOR_SSE for i386
This define is only supposed to be used for i386, but was set for
any 32 bit mingw architecture (which also covers armv7).

Change-Id: Iedc057dfc493015e8339db837dbe20a57c2b2367
Pick-to: 5.15
Reviewed-by: Friedemann Kleint <Friedemann.Kleint@qt.io>
Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
2020-11-04 06:39:03 +02:00
Martin Storsjö
3e13fd43df cmake: Always add -Wno-ignored-attributes for clang targeting windows
This matches how it is in the qmake mkspec, silencing a lot of
warnings - but contrary to when building with qmake, it's only
applied when building Qt itself. For external projects built with
cmake, the Qt headers are included with -isystem, which silences any
warnings from those headers.

Change-Id: I1a498d3c2715cb73e647668cb7226ceeffb7ff0b
Reviewed-by: Alexandru Croitor <alexandru.croitor@qt.io>
2020-11-04 06:38:35 +02:00
Friedemann Kleint
6f8df4dac0 Fix link error when comparing QSslPreSharedKeyAuthenticator
QSslPreSharedKeyAuthenticator::isEqual() as accessed
by inline operators is not exported.

Amends 57e57d9bcd.

Change-Id: Ia0f0de81a371a31422d07af5b11f0db03265504e
Reviewed-by: Mårten Nordheim <marten.nordheim@qt.io>
2020-11-04 05:16:48 +01:00
Allan Sandfeld Jensen
de2b221ce8 Add noexcept to slicing and indexing of QStringView
None of those paths should be able to cast.

Change-Id: I947f26c0aae134076499c9f80e910b0257d2bc62
Reviewed-by: Lars Knoll <lars.knoll@qt.io>
Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
2020-11-04 05:16:48 +01:00
Zhang Hao
bf5011815d InputMethod should call reset() function when proxywidget lost focus
fix When the preview of input Chinese appears,the proxyWidget
lose focus and does not call the reset method of inputMethod.

Fixes: QTBUG-88016
Pick-to: 5.15
Change-Id: I82a66207b0d2046d768430ac3e93df86c1ed3681
Reviewed-by: Volker Hilsheimer <volker.hilsheimer@qt.io>
2020-11-04 12:16:48 +08:00
Cristian Adam
68f3e37449 CMake Build: Enable separate debug info for all target types
Now all shared libraries and executables will get .debug files on
the platforms that support FEATURE_separate_debug_info

With the directory property _qt_skip_separate_debug_info certain
targets can retain the debug symbols in the binary e.g. lupdate with
MinGW 8.1.0 will cause objcopy / strip to fail.

Fixes: QTBUG-87015
Change-Id: I03b106e68ef0a42011d1ba641e6f686b2e7b7fb4
Reviewed-by: Alexandru Croitor <alexandru.croitor@qt.io>
2020-11-04 01:41:06 +01:00
Shawn Rutledge
f6418343f1 Add QEventPoint::normalizedPosition() to replace normalizedPos()
In 4e400369c0 we deprecated
normalizedPos() because we suspect it's a legacy feature that few
users will need.  However Qt developers keep bringing up the continued
usage in autotests over and over.  (It's IMO not wrong to keep testing
deprecated functions in autotests, but the warning keeps attracting
attention.)

Of course it will turn out that normalizedPos() has users; we just
don't know how many.  One way to look at it is: why should they copy
a snippet of code to calculate it, when it costs us so little to
continue to provide this accessor.

It might also turn out that some users will complain that in Qt 5
it was passed through from the device driver (or at least from the
window system API) to the application, and perhaps the replacement will
not always work, for example if availableVirtualGeometry() ends up
wrong, or there is some strange scenario that generates events that are
out-of-bounds for the device that the event professes to come from, so
that the "normalized" coordinates also go outside the [0..1] range.
We reserve the right to put back the storage in QEventPointPrivate if
the need arises; so that's why this function is not inline.

We continue to hope that startNormalizedPos() and lastNormalizedPos()
are used even less and won't be missed much, because it would be
wasteful to store them all the time if only a few users need them.

Change-Id: I23ed78843e3f9e16133c5b6f462884a3845f91b6
Reviewed-by: David Skoland <david.skoland@qt.io>
Reviewed-by: Volker Hilsheimer <volker.hilsheimer@qt.io>
2020-11-03 20:36:35 +01:00
Martin Storsjö
46dd4df4b9 cmake: Set a warning flag based on the target arch, not build host
Change-Id: I0b524d52286210b7782dd710467fbc3a742d0c08
Reviewed-by: Alexandru Croitor <alexandru.croitor@qt.io>
2020-11-03 21:36:35 +02:00
Fabian Kosmale
d3ed7dac8a moc: Handle include in enum, take 2
The existing logic broke down when we reentered the enumerator parsing
loop, and encountered a INCLUDE_MOC_END token in the first handleInclude
call. Fix this by restarting the loop in that case.
Amends d8a2456fbf.

Fixes: QTBUG-88125
Pick-to: 5.15
Change-Id: I87acaa986a81de53730eddc40bc7d48c15328aba
Reviewed-by: Lars Knoll <lars.knoll@qt.io>
2020-11-03 19:36:34 +00:00
Volker Hilsheimer
ca85d3370f Remove left-over and unnecessarily exported operator==
Amends a45a3b1ece

Change-Id: If481ec1818ec4cb263f271f0099f7452fbdce1a0
Reviewed-by: Allan Sandfeld Jensen <allan.jensen@qt.io>
2020-11-03 20:36:34 +01:00
Volker Hilsheimer
5ea1f40350 Deprecate QFontDatabase constructor
Move private methods into the private class.

Fixes: QTBUG-88114
Change-Id: I92fa52980ed5a0675eee310359d8875f614921e6
Reviewed-by: Eskil Abrahamsen Blomfeldt <eskil.abrahamsen-blomfeldt@qt.io>
2020-11-03 20:36:34 +01:00
Volker Hilsheimer
a50f0f045d Get rid of all instance usage of QFontDatabase
All QFontDatabase APIs are static, use them accordingly.

Task-number: QTBUG-88114
Change-Id: I0e4a7508646037e6e2812611262eed8b6d7ad3de
Reviewed-by: Eskil Abrahamsen Blomfeldt <eskil.abrahamsen-blomfeldt@qt.io>
2020-11-03 20:36:34 +01:00
Shawn Rutledge
488e72cce8 Update third-party md4c to version 0.4.6
If you try to parse markdown containing null characters, it should not
crash anymore.

[ChangeLog][Third-Party Code] md4c was updated to 0.4.6.

Pick-to: 5.15
Fixes: QTBUG-87965
Change-Id: I6e0ac6f4ecb41c0836f22c7a6a2d510102c933c0
Reviewed-by: Mårten Nordheim <marten.nordheim@qt.io>
2020-11-03 20:36:34 +01:00
Alexey Edelev
dc43061e9a CMake: Add handling of user-defined INPUT_foo cache variables
"configure" script translates feature-related parameters to INPUT_
variables instead of FEATURE_.

Both INPUT_ and FEATURE_ variables passed to cmake script are
equivalent. FEATURE_ has higher priority in case if both are defined.

Fixes: QTBUG-87755
Change-Id: If697a0d62ab839877a3196ea74e631582a570dda
Reviewed-by: Alexandru Croitor <alexandru.croitor@qt.io>
2020-11-03 16:28:14 +01:00