Commit Graph

42847 Commits

Author SHA1 Message Date
Timur Pocheptsov
4561370661 More qOverload cleanups in qtbase
Task-number: QTBUG-82605
Change-Id: I1c3c14ed82911ed5483258c11e76f5dd7744fa12
Reviewed-by: Mårten Nordheim <marten.nordheim@qt.io>
2020-03-24 20:58:13 +01:00
Allan Sandfeld Jensen
28a0f1ba79 Fix use of deprecated ::forcesign
Change-Id: I39322bcc0e24d0bfccf43c8700a166ce350208ea
Reviewed-by: Friedemann Kleint <Friedemann.Kleint@qt.io>
2020-03-24 17:41:30 +01:00
Mårten Nordheim
fc1b5eac1a QAbstractSocket: Fix usage of deprecated error signal in example
Task-number: QTBUG-82605
Change-Id: I83a8777d32302607d48dd670b6c787ac05db88d2
Reviewed-by: Timur Pocheptsov <timur.pocheptsov@qt.io>
2020-03-24 17:40:40 +01:00
Kai Koehne
45a131d465 Fix whitespace in Qt5XXConfig files
Remove some unneeded empty lines, and fix indentation.

Change-Id: Ie35e95f35f9625cc75070074be96bdeb62d5fd4c
Reviewed-by: Alexandru Croitor <alexandru.croitor@qt.io>
2020-03-24 17:40:40 +01:00
Kai Koehne
99ace38d22 CMake: Also import Qt plugins that are not literally named *Plugin
There are some plugins in qtlocation, qtdeclarative whose names are not
suffixed with 'Plugin', so the current logic fails to load the
corresponding QtModule_XXX.cmake file.

Work around this by just searching for

  Qt5$${CMAKE_MODULE_NAME}}_*.cmake.

Users can define QT5_STRICT_PLUGIN_GLOB
or Qt5$${CMAKE_MODULE_NAME}_STRICT_PLUGIN_GLOB
to change back to the old behavior.

[ChangeLog][cmake] Fixed an issue where some Qt location and
declarative plugins whose name did not end with "Plugin"
where not imported by the corresponding Qt component package.

You can force the old behavior by setting QT5_STRICT_PLUGIN_GLOB or
Qt5ModuleName_STRICT_PLUGIN_GLOB before the find_package(Qt5 ...)
call.

Fixes: QTBUG-58812
Change-Id: Ic8adf9562841ed49eabc4f7fb2b5ae257ca606cd
Reviewed-by: Alexandru Croitor <alexandru.croitor@qt.io>
2020-03-24 17:40:40 +01:00
Sze Howe Koh
6a972f44f3 QXcbCursor: Replace deprecated QCursor API
Align with e79a625381 in qtbase.

Task-number: QTBUG-48701
Change-Id: Ia3ca2de6bbf4e9c1738f77193351dd95a14dd2dc
Reviewed-by: Liang Qi <liang.qi@qt.io>
2020-03-24 06:26:33 +00:00
Volker Hilsheimer
34fe5f75bc Deprecation warnings: replace qrand with QRandomGenerator
Change-Id: I80fe6f611b367c6c8a1b77e82dc791493f88929b
Reviewed-by: Timur Pocheptsov <timur.pocheptsov@qt.io>
2020-03-23 20:24:58 +01:00
Mitch Curtis
3f744be923 Merge "Merge remote-tracking branch 'origin/5.14' into 5.15" 2020-03-23 13:55:35 +01:00
Timur Pocheptsov
da1d6bccd2 Fix the name in invokeMethod
Task-number: QTBUG-82605
Change-Id: If21d9c25d607e8a363fe703b4ffa1e2d207eef39
Reviewed-by: Mårten Nordheim <marten.nordheim@qt.io>
2020-03-23 12:58:06 +01:00
Ulf Hermann
94c564a082 Fusion Style: Use qobject_cast rather than dynamic_cast
We want to avoid RTTI.

Fixes: QTBUG-82287
Change-Id: Ib034094d4035d6dfa99d00ac198c93cc9572755b
Reviewed-by: Christian Ehrlicher <ch.ehrlicher@gmx.de>
Reviewed-by: Friedemann Kleint <Friedemann.Kleint@qt.io>
2020-03-23 12:00:46 +01:00
Jean-Michaël Celerier
b4b8ffb233 rhi: gles2: fix uniform gathering after struct-type member in UBOs
Given:

    struct Light { vec4 foo; };
    layout(std140, binding = 2) uniform material {
      Light light;
      int lightCount;
    };

the previous code would keep "light" appended for the prefix and look for
`light.lightCount`.

Change-Id: Ia8deacd0cb4833f45151e922fa7b5970169332eb
Reviewed-by: Laszlo Agocs <laszlo.agocs@qt.io>
2020-03-23 10:59:30 +01:00
Lorn Potter
50c6882e9f wasm: Boost emscripten 1.39.8 as recommended
[ChangeLog][WebAssembly] Updated emscripten to version 1.39.8

Change-Id: I8d19f851eb0c0dd912792cee0db69e61cf4fd5f6
Reviewed-by: Morten Johan Sørvig <morten.sorvig@qt.io>
2020-03-23 03:29:41 +00:00
Christian Ehrlicher
1e03015d55 QTableView: Make sure to repaint all needed cells during resizing
Don't try to update the scrollarea geometry while resizing a row or
column since this may lead in flickering and artifacts, esp when the
scroll mode is scrollPerItems. Instead do the calculation only when the
resize is finished.

Fixes: QTBUG-72870
Fixes: QTBUG-82595
Change-Id: Id6903c00485b3be6ed54bd5f9bcafdda6da21598
Reviewed-by: Friedemann Kleint <Friedemann.Kleint@qt.io>
Reviewed-by: Samuel Gaist <samuel.gaist@idiap.ch>
Reviewed-by: Shawn Rutledge <shawn.rutledge@qt.io>
2020-03-21 07:05:27 +01:00
Thiago Macieira
d55dad94f9 64-bit atomics: fix bad copy/paste in macro definitions
Fixes: QTBUG-82864
Change-Id: I35d5bcc92b2e4bddaacbfffd15fc42d054fcb2b1
Reviewed-by: Mitch Curtis <mitch.curtis@qt.io>
2020-03-20 17:12:58 -05:00
Christian Ehrlicher
bd75c87e0e Doc: replace deprecated references to QGLWidget
Remove references to the deprecated QGLWidget and replace it with
QOpenGLWidget.

Change-Id: Ia31df42ab61c25e9ce46f4491267d2c64910f55c
Reviewed-by: Paul Wicking <paul.wicking@qt.io>
2020-03-20 22:27:29 +01:00
Volker Hilsheimer
580e9eedf7 QDateTimeEdit: with keyboardTracking off, allow values outside the range
QDateTimeEdit very aggressively prevents user input that would result in
values that are outside the dateTimeRange. While keyboardTracking is on
this makes sense, as otherwise the dateTimeChanged signal would be
emitted after each section, with a value that is outside the range.

However, this prevented users from entering a date that is allowed, but
where sections of the date are above or below the respective section in
the maximum or minimum value.

If keyboardTracking is off, QDateTimeEdit only emits the dateTimeChanged
signal at the end of editing, when focus is lost or the return key is
pressed, and then it enforces that the value is within the range anyway.
This change makes the parser ignore the range during editing if
keyboardTracking is off, thus allowing the user to enter a date where
temporary values are outside the range.

The test makes sure that we don't get signals emitted with out-of-range
values, testing both with and without keyboard tracking.

Change-Id: I00fb9f1b328a3477163f890c4618b40878657816
Fixes: QTBUG-65
Reviewed-by: Andy Shaw <andy.shaw@qt.io>
Reviewed-by: Lars Knoll <lars.knoll@qt.io>
2020-03-20 22:18:00 +01:00
Thiago Macieira
30a0787907 Fix binary compatibility issue in QJson{Array,Object} initializer_list
The rewrite using CBOR internals replaced one of the two naked pointers
that were members of QJsonArray and QJsonObject with a
QExplicitlySharedDataPointer. The problem is that its operator= will
read the current value to decrement the refcount and possibly delete the
pointed object.

But QJson{Array,Object}::initialize() are called from inlined code,
without initialization. So we can't call operator=. We need to memcpy to
write a nullptr.

This is not unit-testable because it requires compiling against 5.14 or
earlier, then running against 5.15.

Fixes: QTBUG-82700
Change-Id: Iaa63461109844e978376fffd15f98c62656d197c
Reviewed-by: Ulf Hermann <ulf.hermann@qt.io>
2020-03-20 13:18:00 -08:00
Thiago Macieira
c798b286bd Doc: update QJsonObject::operator[] non-const to say it creates key
the non-const QJsonArray::operator[] requires a valid index and all the
const operator[] say that it returns Undefined if the key or index
doesn't exist. This is the exception.

Task-number: QTBUG-39864
Change-Id: Iaa63461109844e978376fffd15f9716f0cc66cca
Reviewed-by: Lars Knoll <lars.knoll@qt.io>
2020-03-20 21:18:00 +00:00
Giuseppe D'Angelo
d41d8297c8 OpenSSL: bump the minimum supported version to 1.1.1
We don't support 1.0 any more, and 1.1.0 has reached EOL.
Bump to 1.1.1 so we can freely use its APIs.

[ChangeLog][QtNetwork][SSL] The minimum required version
of OpenSSL is now 1.1.1.

Change-Id: I5cfb6672fadfa48aedaefbcd6a954aa9eb85bfa5
Reviewed-by: Timur Pocheptsov <timur.pocheptsov@qt.io>
Reviewed-by: Lars Knoll <lars.knoll@qt.io>
2020-03-20 18:23:55 +01:00
Mitch Curtis
69a5be7ef0 Merge remote-tracking branch 'origin/5.14' into 5.15
Change-Id: Ib2a2e3a292af43be3a980c2ccc943c08f4bbf72f
2020-03-20 11:28:14 +01:00
Allan Sandfeld Jensen
aa5855847c Add SSE2 optimized solid source composition
Very similar to source-over, but have traditionally been inlined.

Change-Id: I211f0b1c91c1a00c4769fbbfe2e3d0c7b22d7048
Reviewed-by: Eirik Aavitsland <eirik.aavitsland@qt.io>
2020-03-20 09:56:15 +01:00
Laszlo Agocs
6c5b42b678 rhi: gl: Reduce state changes
...between setGraphicsPipeline() calls with different
QRhiGraphicsPipeline instances within the same pass.

Also adds similar logic for the GL_ARRAY_BUFFER (vertex buffers)
as that is a hotspot as well.

This is not intended to be a 100% avoiding any redundant call solution,
but rather to take care of the most common hotspots, so that bad OpenGL
implementations with a larger API call overhead will not cause us to
regress compared to the direct OpenGL rendering path in Quick and
Quick3D.

What we have here reduces the number of GL calls in the view3d example
by ~200 within one frame, which is a pretty good start.

Task-number: QTBUG-78603
Change-Id: I6aeab9c1c43b148ea6ef05d0284990a996c7ba28
Reviewed-by: Andy Nichols <andy.nichols@qt.io>
2020-03-20 09:43:04 +01:00
Volker Hilsheimer
e7cff5bca7 Fix keypad navigation within a button group for push buttons
Keypad navigation within a group should work for auto-exclusive buttons,
or for checkable buttons that are in a button group. Since the code
already tests whether the button should be treated like an exclusive
(which implies checkable) button, use the result of that test when
finding the candidate button to move focus to, and not only when
actually changing the checked button and the focus.

Change-Id: I4dc41a90d51a8304483046252ceff0ebfe2a2e52
Fixes: QTBUG-27151
Done-with: david.faure@kdab.com
Reviewed-by: Volker Hilsheimer <volker.hilsheimer@qt.io>
2020-03-20 08:20:00 +01:00
Cristian Adam
40f4b3de1a qeasingcurve/tst_qeasingcurve: Fix for MinGW 8.1 x86
Test fails on MinGW 8.1 x86, but not on MinGW 8.1 x86_64.

Task-number: QTQAINFRA-3304
Task-number: QTBUG-69947
Change-Id: Ie9a35bd6d5a8481028cd0ea426d1cf00bd7cf093
Reviewed-by: Tony Sarajärvi <tony.sarajarvi@qt.io>
Reviewed-by: Friedemann Kleint <Friedemann.Kleint@qt.io>
2020-03-20 07:56:53 +01:00
Nico Vertriest
0359a82e6e Doc: make Qt Sql snippets compilable
Task-number: QTBUG-81496
Change-Id: Id6206e9179c2e8157c99e777a3de35bd83d49e34
Reviewed-by: Topi Reiniö <topi.reinio@qt.io>
Reviewed-by: Paul Wicking <paul.wicking@qt.io>
2020-03-20 06:53:59 +01:00
Mitch Curtis
fcbbe7ff21 Merge "Merge remote-tracking branch 'origin/5.14.2' into 5.14" 2020-03-19 16:14:25 +01:00
Mitch Curtis
1480922511 Merge remote-tracking branch 'origin/5.14.2' into 5.14
Change-Id: I34ca28c75b88e882c3f35f182bf01acb22b77637
2020-03-19 16:10:31 +01:00
Mårten Nordheim
b77e239c5e Fix perl script warning
The apache logs are filled with warnings about this when it's used.

https://blog.gerv.net/2014/10/new-class-of-vulnerability-in-perl-web-applications/

Change-Id: I977d2b022d706d9587c033fd8e80f129e60c439c
Reviewed-by: Timur Pocheptsov <timur.pocheptsov@qt.io>
Reviewed-by: Edward Welbourne <edward.welbourne@qt.io>
2020-03-19 14:15:04 +00:00
Tor Arne Vestbø
45fe7adcb8 widgets: Clarify backingstore resize logic by removing cruft
Change-Id: I0a449068a0d4557b7bd6581ddf71c590b72d76a1
Reviewed-by: Paul Olav Tvete <paul.tvete@qt.io>
2020-03-19 15:14:29 +01:00
Tor Arne Vestbø
5f3c071ee3 widgets: Remove unused member QTLWExtra::inTopLevelResize
It was introduced in Qt 4.4 (e150f6a6e619) to work around slow resizes
on Windows and X11 due to excessive painting, but has since been removed
when old dead code never ported to QPA was removed in a2337f79ff.

Change-Id: Ic14e714a02edb4194a445a6bb0759b601799fdc6
Reviewed-by: Paul Olav Tvete <paul.tvete@qt.io>
2020-03-19 15:14:29 +01:00
Allan Sandfeld Jensen
cfbe481838 QDrawHelper cleanups
We don't need to handle solid SourceOver logic directly, this was
already handled by getOperator and changed composition to Source.

Also removes some dead code and changes an assert in unreachable
code to Q_UNREACHABLE.

Change-Id: I66a6c1248bd34e31096023f1acb20385099932c9
Reviewed-by: Eirik Aavitsland <eirik.aavitsland@qt.io>
2020-03-19 15:14:29 +01:00
Timur Pocheptsov
ad68ecf1d9 q_getTimeFromASN1: fix invalid access
No sanitizer is needed, just looking at the code is enough.
It was wrong.

Change-Id: I9df417c137d6b3361c3161865e099a8be40860de
Reviewed-by: Lars Knoll <lars.knoll@qt.io>
Reviewed-by: Mårten Nordheim <marten.nordheim@qt.io>
2020-03-19 14:48:08 +01:00
Eskil Abrahamsen Blomfeldt
1a18e138f4 Android: Fix deployment on Windows host
The paths in the build properties require forward slashes
apparently. On Windows, we would default to native backslashes
and they would be stripped from the path. Converting to forward
slashes fixes the problem.

Issue was introduced by dd04fb639b,
since before that, the NDK path was retrieved from the environment.

Fixes: QTBUG-82944
Change-Id: I6c51113efcf671461a5871991b3225a52b95266c
Reviewed-by: BogDan Vatra <bogdan@kdab.com>
2020-03-19 10:23:07 +01:00
Lars Knoll
5eb492fb95 Move the default arguments of fromPath away from the deprecated overload
Move the default arguments to the overload that is not deprecated. This
is fully source and binary compatible.

Change-Id: I0d2eb491faf8c2164b80c33c4c4f749173b690f5
Reviewed-by: Mårten Nordheim <marten.nordheim@qt.io>
2020-03-19 09:27:18 +01:00
Fabian Kosmale
fd72ed794d Consider qml dependencies from qrc files in static builds
qmlimportscanner already has support for qrc files, however the rule in
qt.prf did not pass the required arguments to it so far. In combination
with the declarative registration of types, this broke static linking.

Fixes: QTBUG-82873
Change-Id: I4462645e0b353265f9953807dee73f94923dab9f
Reviewed-by: Ulf Hermann <ulf.hermann@qt.io>
Reviewed-by: Andy Shaw <andy.shaw@qt.io>
2020-03-18 13:23:24 +01:00
Qt Forward Merge Bot
2329580411 Merge "Merge remote-tracking branch 'origin/5.14' into 5.15" 2020-03-18 11:45:01 +01:00
Qt Forward Merge Bot
22daba4ff9 Merge remote-tracking branch 'origin/5.14' into 5.15
Change-Id: Iaab37b633a8286c2c21425aaac34d30529a3ea82
2020-03-18 11:44:49 +01:00
Timur Pocheptsov
05dd80871c tst_QMenu: make QSKIP message truthful
Since the test was refactored and QCursor::setPosition() replaced
with QTest::mouseMove(), the test is completely crippled on macOS,
since it relies on the parts in widget's code, ifdefed with condition
!Q_OS_OSX and commented as "Cocoa tracks popups". Yes it does,
but not for "fake" events generated by QTest. The original test
was introduced when fixing different problems on non-Apple platform(s)
anyway. Let's make QSKIP message saying the truth.

Task-number: QTBUG-63031
Change-Id: If54f195ccc0d4409cc2e7f4ae0b0fbf43989b286
Reviewed-by: Tor Arne Vestbø <tor.arne.vestbo@qt.io>
2020-03-18 10:02:29 +00:00
Fabian Kosmale
6db55e3451 QSequentialIterable: Treat sets as appendable
QSet and std::(unordered_)set were so far not treated as appendable, as
they lack a push_back method. We do however need support for this in
declarative to enable converting back from QJSValue arrays to sets.
We achieve this by testing for and using the insert method. While vector
has also such a method, it doesn't take a single value, but rather a
position or iterator + value, so the template specialization is not
ambiguous.

Task-number: QTBUG-82743
Change-Id: I74fc7b1b856d9bcd38100b274ba2b69578ea8bbb
Reviewed-by: Ulf Hermann <ulf.hermann@qt.io>
2020-03-18 09:54:19 +01:00
Volker Hilsheimer
943cb0999d Header-review: add Q_DECL_DEPRECATED_X macro to deprecated method
Change-Id: I486d479b2e07042b397869aab117f44e65539f1e
Reviewed-by: Lars Knoll <lars.knoll@qt.io>
2020-03-17 18:20:04 +01:00
Simon Hausmann
8337684b04 Fix docs suggesting that it's possible to draw to the X11 screen
It's not possible anymore, since many years. The desktop's don't use the
X11 root window anymore :)

Fixes: QTBUG-82880
Change-Id: I923f29f23e61d93640cacb2ac20620c5ddc480b9
Reviewed-by: Tor Arne Vestbø <tor.arne.vestbo@qt.io>
2020-03-17 17:19:44 +01:00
Edward Welbourne
0677525f2e Update Unicode license for CLDR and UCD
Task-number: QTBUG-82747
Change-Id: I6bbecaf3f0a8f8e7e0ad31074d88dea7ec98dff2
Reviewed-by: Paul Wicking <paul.wicking@qt.io>
2020-03-17 16:17:49 +01:00
Allan Sandfeld Jensen
b430826501 Fix memory leak on new QThreadPool::tryStart version
Also documents the ownership of the traditional tryStart better, and
remove a redundant check.

Change-Id: I06202465b782926724fa33a901d08c1626f87373
Reviewed-by: Sona Kurazyan <sona.kurazyan@qt.io>
2020-03-17 16:13:48 +01:00
Volker Hilsheimer
1b4d01d163 Add 'since' tag to documentation of new enum value
Change-Id: I400dc1f2d3dba0fa50b2bcb5e4efbcfc0ad912fd
Reviewed-by: Paul Wicking <paul.wicking@qt.io>
2020-03-17 15:37:44 +01:00
Cristian Adam
7150b07041 QLocale: Fix test on MinGW 8.1.0 32 bit
The call of _control87 would crash because of the previous test.

Change-Id: I254efe9c2e9892a473a02663e5ff7016791d5d6d
Reviewed-by: Tony Sarajärvi <tony.sarajarvi@qt.io>
2020-03-17 15:35:34 +01:00
Sona Kurazyan
b345087dde Log the possible socket error code for the flaky test
tst_QSocks5SocketEngine::simpleConnectToIMAP() is flaky. It may be
useful to log the socket error, to provide more info in case the
test fails again.

Change-Id: Ia5518dce13fd9da1fa5bfb3d5cf3a52a908b8698
Reviewed-by: Timur Pocheptsov <timur.pocheptsov@qt.io>
Reviewed-by: Mårten Nordheim <marten.nordheim@qt.io>
2020-03-17 11:22:59 +01:00
Volker Krause
c53cccc171 Fix JNI signature for the timezone getDisplayName call
Due to the changes in 5.14.1 this code now actually seems to be hit here,
throwing NoSuchMethodError exceptions all over the place and breaking
date/time handling quite spectacularly.

Change-Id: I9bee3de39ec98f86d7944b94e89119505f62dc6c
Reviewed-by: BogDan Vatra <bogdan@kdab.com>
2020-03-17 08:30:32 +01:00
Antti Kokko
3d25bbcdf1 Add changes file for Qt 5.14.2
Change-Id: I804e2f07ccbf077c443aef627854c6c411014269
Reviewed-by: Friedemann Kleint <Friedemann.Kleint@qt.io>
Reviewed-by: Alexandru Croitor <alexandru.croitor@qt.io>
Reviewed-by: Shawn Rutledge <shawn.rutledge@qt.io>
Reviewed-by: Edward Welbourne <edward.welbourne@qt.io>
2020-03-17 06:16:25 +01:00
Volker Hilsheimer
ffbf5ae11d Fix potential out-of-bounds or nullptr access
This ammends change baed8534bc, which
might have introduced a hard to reproduce segmentation fault when the
screen number is out of bounds, or when the QScreen object doesn't
return a valid pointer for QScreen::handle.

As the issue doesn't reliably reproduce, this is a speculative fix that
adds bounds and nullptr checking.

Change-Id: I0cec0a344e80159ee1723d840f207267a608cef4
Fixes: QTBUG-82807
Reviewed-by: Tor Arne Vestbø <tor.arne.vestbo@qt.io>
Reviewed-by: Volker Hilsheimer <volker.hilsheimer@qt.io>
2020-03-17 06:15:55 +01:00
Mårten Nordheim
3e9014ed61 QNetworkReply: stabilize sslSessionSharing test
Sometimes this test would fail due to the session not actually being
reused. The cause of this was that the requests were sometimes being
completed 1-by-1, enabling the individual requests to re-use the
already-connected socket completely because it stayed connected.

Setting the Connection-header to close lets us be sure that
the socket cannot be re-used when the request is finished.

Fixes: QTBUG-82846
Change-Id: I5da8baa50a3a45fb60f1e1613e500e3e9c034fb0
Reviewed-by: Timur Pocheptsov <timur.pocheptsov@qt.io>
2020-03-16 12:12:29 +01:00