Commit Graph

50528 Commits

Author SHA1 Message Date
Øystein Heskestad
de658d8ca5 Merge "Make qdecompresshelper archive bomb check only trigger for large files" 2021-03-05 16:32:49 +00:00
Wang Yicun
89e9164abb Merge "Simplify code, remove redundant condition" 2021-03-05 15:35:26 +00:00
Zhang Hao
f13451539f Merge "Code tidies" 2021-03-05 15:14:28 +00:00
Giuseppe D'Angelo
bcedeb6d3d Merge "QPoint(F): declare as PRIMITIVE, not RELOCATABLE" 2021-03-05 14:38:41 +00:00
Øystein Heskestad
be73ca7eb1 Make qdecompresshelper archive bomb check only trigger for large files
This is to avoid false positives.
By default files are large if uncompressed size > 10 MB. Only configurable internally.
Also add auto tests.

Task-number: QTBUG-91392
Pick-to: 6.0 6.1
Change-Id: I32258cb7c957f2a23a05157ba4ed5c0af2ba585e
Reviewed-by: Mårten Nordheim <marten.nordheim@qt.io>
Reviewed-by: Edward Welbourne <edward.welbourne@qt.io>
2021-03-05 15:13:53 +01:00
Timur Pocheptsov
684d44024f Merge "tst_qdtlscookie: use a proper 'enterLoopMSecs' instead of 'enterLoop'" 2021-03-05 13:00:56 +00:00
Wang Yicun
a913002f13 Simplify code, remove redundant condition
'clazz || (!clazz && isCached)' is equivalent to
'clazz || isCached'

Done-with: Tang Peng <tangpeng@uniontech.com>
Pick-to: 6.1
Change-Id: Ie9eab4a94a61be2b360f64980c4666a622f3a209
Reviewed-by: Volker Hilsheimer <volker.hilsheimer@qt.io>
2021-03-05 13:52:31 +01:00
Paul Wicking
c1c61c3bb4 Doc: Fix section titles that confuse QDoc's autolinker
Fixes: QTBUG-91620
Pick-to: 6.1 6.0
Change-Id: I7c407c7158324d1fbbeb78e47d2198e8ddf5daa0
Reviewed-by: Fabian Kosmale <fabian.kosmale@qt.io>
2021-03-05 13:47:53 +01:00
Zhang Hao
2801dc7f04 Code tidies
The return type goes on the same line of the rest of the signature.

Change-Id: Icacf2e00ed2876c4c9b72b8f6c428c2e37ee42a7
Reviewed-by: Giuseppe D'Angelo <giuseppe.dangelo@kdab.com>
2021-03-05 12:26:47 +00:00
Toni Saario
90371e9250 Merge "Skip globalstatic threadStressTest on QEMU" 2021-03-05 11:02:17 +00:00
Giuseppe D'Angelo
48f685f5e5 QPoint(F): declare as PRIMITIVE, not RELOCATABLE
These types can be copied via memcpy, so use the correct tag.

Change-Id: Icba37d42dd8658225ce4889284661d108122d489
Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
Reviewed-by: Lars Knoll <lars.knoll@qt.io>
Reviewed-by: Andrei Golubev <andrei.golubev@qt.io>
2021-03-05 11:19:46 +01:00
Fabian Kosmale
23636d4281 tst_qmetatype: RELOCATABLE -> PRIMITIVE is binary compatible
Based on the discussion in https://codereview.qt-project.org/c/qt/qtbase/+/336742
changing our types from RELOCATABLE to PRIMITVE is fine.

Change-Id: Ica867203aa813d19fdfd3753fc4ff36ef4332fc3
Reviewed-by: Lars Knoll <lars.knoll@qt.io>
2021-03-05 10:19:45 +00:00
Giuseppe D'Angelo
5f501b0e97 QQuaternion: mark as PRIMITIVE type
Change-Id: I043fef8bfc66875b72f34e7939e78c7d1c7f5381
Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
2021-03-05 11:19:44 +01:00
Timur Pocheptsov
b262007929 tst_qdtlscookie: use a proper 'enterLoopMSecs' instead of 'enterLoop'
It's a bit weird to calculate timeout in milliseconds and then pass
it as number of seconds ...

Pick-to: 6.1 5.15
Change-Id: I1127163ea06e49ac1b53eea6f60ee8590319bfa1
Reviewed-by: Mårten Nordheim <marten.nordheim@qt.io>
2021-03-05 10:34:54 +01:00
Toni Saario
49e93b6e39 Skip globalstatic threadStressTest on QEMU
The test causes frequent failures in the CI. This is the most
subtle fix until it is properly fixed.

Pick-to: 6.1
Task-number: QTBUG-91423
Change-Id: I6499378dcd3ed1c31275db38d83b572e764366cc
Reviewed-by: Friedemann Kleint <Friedemann.Kleint@qt.io>
Reviewed-by: Edward Welbourne <edward.welbourne@qt.io>
Reviewed-by: Samuli Piippo <samuli.piippo@qt.io>
2021-03-05 08:09:59 +00:00
Piotr Mikolajczyk
5c6b10c3ce Android: Place cursor correctly on screen when editing
When editing text the cursor is not placed correctly. So this
has been achieved by tricking Android into thinking that the
input area is only the line where the cursor is, so it is
forced to keep it on screen.

Fixes: QTBUG-91073
Pick-to: 5.15
Change-Id: Icc2e8315deb76ca1a84819d3fdceaa7b027b1174
Reviewed-by: Ville Voutilainen <ville.voutilainen@qt.io>
2021-03-05 07:57:14 +00:00
Wang Yu
852b070529 QContiguousCache: Remove redundant condition
The reverse condition was already checked three lines before.

Pick-to: 6.1
Change-Id: I2f78262004871ec2f3730e2a25f26fe22636cde7
Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
2021-03-05 07:27:14 +00:00
Allan Sandfeld Jensen
9fb81fc287 Merge "Add QColorSpace::description" 2021-03-05 00:04:34 +00:00
Volker Hilsheimer
26b53173d6 Merge "QMenu test: turn tooltip animations off" 2021-03-05 00:02:41 +00:00
Volker Hilsheimer
a60f763f25 Merge "Protect against self-assignment, plug potential memory leak" 2021-03-04 22:24:48 +00:00
Volker Hilsheimer
d76d8571e2 QMenu test: turn tooltip animations off
QTBUG_89082_actionTipsHide() is very flaky if tooltips fade in, as the
mouse move might happen while the tooltip is still appearing.

Fixes: QTBUG-91532
Pick-to: 6.1 6.0 5.15
Change-Id: I55305927fcf143d99dfff28d0bc70b2e831a139a
Reviewed-by: Oliver Wolff <oliver.wolff@qt.io>
2021-03-04 22:49:47 +01:00
Joerg Bornemann
48488b810f Fix Android build
The Android build failed, because the namespace QNativeInterface could
not be found. Include the header file where it's defined.

Change-Id: If53eda4d4d4e6d5e66787d74c714215721ba0b60
Reviewed-by: Assam Boudjelthia <assam.boudjelthia@qt.io>
2021-03-04 22:39:21 +01:00
Allan Sandfeld Jensen
01c55405fa Add QColorSpace::description
A way to read the description of the profile from ICC, or set one
yourself.

Change-Id: I68622e30ee209cac99c41f3df934712c3548c0de
Reviewed-by: Friedemann Kleint <Friedemann.Kleint@qt.io>
Reviewed-by: Eirik Aavitsland <eirik.aavitsland@qt.io>
2021-03-04 22:37:08 +01:00
Paul Wicking
3ae67b4434 Merge "Doc: Use correct include for QWGLContext" 2021-03-04 21:24:32 +00:00
Volker Hilsheimer
3ae09debab Protect against self-assignment, plug potential memory leak
Fixes static analyzer warning f03d95823e9f1395d64501cc111f0f63

As a drive-by, plug the potential memory leak if the assigned-to
QDockAreaLayoutItem already holds a QDockAreaLayoutInfo object.
The subinfo is deleted in the destructor, QDockAreaLayoutItem
has ownership for the subinfo.

Pick-to: 6.1
Change-Id: I8546adc6fb0537078eea9dfb45d1bd9967d8d149
Reviewed-by: Allan Sandfeld Jensen <allan.jensen@qt.io>
2021-03-04 19:58:44 +01:00
Paul Wicking
15f934dcea Doc: Use correct include for QWGLContext
Pick-to: 6.1 6.0
Task-number: QTBUG-91500
Change-Id: If487a2d14dd61d127dc35aa039f9b71915128da1
Reviewed-by: Tor Arne Vestbø <tor.arne.vestbo@qt.io>
2021-03-04 18:32:32 +01:00
Thiago Macieira
224c638f78 QProcess/Unix: use a common function to find the target executable
This harmonizes the execution between start() and startDetached(). Both
did QStandardDirs::findExecutable(), but duplicated code. However, only
start() supported launching .app bundles on Mac.

[ChangeLog][QtCore][QProcess] startDetached() now supports launching
.app executable bundles on macOS / iOS systems, like start() already
did.

Change-Id: Ic90d8429a0eb4837971dfffd1664f776b2c0edfd
Reviewed-by: Oswald Buddenhagen <oswald.buddenhagen@gmx.de>
2021-03-04 09:14:04 -08:00
Alexey Edelev
3875575ab6 Merge "Fix build of Core module without regularexpression feature" 2021-03-04 13:32:07 +00:00
Joerg Bornemann
94d5c1bfe0 Merge "Remove win32_system_libs feature from src/corelib/configure.json" 2021-03-04 11:26:42 +00:00
Kai Köhne
52f99ff3d2 Merge "headersclean: Compile with -std=c++latest, -Zc:__cplusplus on MSVC" 2021-03-04 11:11:36 +00:00
Alexey Edelev
6e5e8016dd Fix build of Core module without regularexpression feature
qregularexpression.h requires FEATURE_regularexpression to be enabled.
Add a condition to the 'qt_pch.h' header to fix the build when PCH
are enabled and FEATURE_regularexpression is disabled.

It seems that the filter implementation of QSortFilterProxyModel
has QRegularExpression as its base. It's necessary to make
sortfilterproxymodel dependent on the regularexpression feature.

Fix the precompiler condition for the extractSections function in
the QString implementation. Use the same precompiler condition for
the QString::section and extractSections functions, since
QString::section depends on extractSections.

Change-Id: I5b775e0842a0aa1a8d47f8dded376bdfcf63b5bf
Reviewed-by: Joerg Bornemann <joerg.bornemann@qt.io>
2021-03-04 11:31:36 +01:00
Joerg Bornemann
4b9173e354 Fix QT_HOST_LIBEXECS for cross-builds on Windows
Like for LibraryExecutables, we must default to "bin" on Windows for
HostLibraryExecutables in our generated qconfig.cpp.

Pick-to: 6.1
Fixes: QTBUG-91496
Change-Id: Ib5a4b3b3fd6192bd953e615058b482e67ad19462
Reviewed-by: Cristian Adam <cristian.adam@qt.io>
2021-03-04 10:31:31 +00:00
Joerg Bornemann
728baba70a Complete the renaming of qt_add_tool to qt_internal_add_tool
Fix the name in the function's doc comment and error messages.

Pick-to: 6.1
Change-Id: I918db802a0dbb0508f65d227f7c896d2ad0beeae
Reviewed-by: Alexey Edelev <alexey.edelev@qt.io>
Reviewed-by: Craig Scott <craig.scott@qt.io>
Reviewed-by: Cristian Adam <cristian.adam@qt.io>
2021-03-04 11:31:21 +01:00
Joerg Bornemann
7b6c526ef1 Fix double inclusion of QtAutoDetect.cmake in top-level build
The variable we need to check is called QT_SUPERBUILD, not
QT_SUPER_BUILD.

Pick-to: 6.1 6.0
Change-Id: I8487f491a0a4cebdf08f579519e99e6afe3db8c2
Reviewed-by: Alexey Edelev <alexey.edelev@qt.io>
Reviewed-by: Cristian Adam <cristian.adam@qt.io>
2021-03-04 11:31:14 +01:00
Albert Astals Cid
eeb4c0a1c9 Merge "Fix signature of canDropMimeData used in code snippet" 2021-03-04 10:22:45 +00:00
Andrei Golubev
70bd6bf1e3 Merge "Fix compilation error in QDateTime" 2021-03-04 09:40:01 +00:00
Joerg Bornemann
00b75e86f3 Remove win32_system_libs feature from src/corelib/configure.json
This feature only existed to trigger the evaluation of the libs gdi32,
kernel32 and friends. Those libs only were relevant for the qmake build
of Qt and can be removed now.

Task-number: QTBUG-83932
Change-Id: Idfd4d8f70b6dbd1067412fecc1115b504b1ad347
Reviewed-by: Alexey Edelev <alexey.edelev@qt.io>
Reviewed-by: Qt CI Bot <qt_ci_bot@qt-project.org>
Reviewed-by: Kai Koehne <kai.koehne@qt.io>
2021-03-04 09:56:09 +01:00
Joerg Bornemann
800f745140 Move syncqt.pl to libexec
To not disturb the qmake build we kept syncqt.pl in <src>/bin but
installed it to libexec. This is not necessary anymore.

This also removes the need for having syncqt.pl in both, bin and libexec
in the build dir of qtbase.

Pick-to: 6.1
Fixes: QTBUG-91076
Change-Id: I44b014ea41e3f00c420e02fd5c76f11169340b8c
Reviewed-by: Kai Koehne <kai.koehne@qt.io>
2021-03-04 09:56:07 +01:00
Joerg Bornemann
e01add5cdb Remove fixqt4headers.pl
This script was aiding users to port from Qt 4 to 5 and is considered
to be of little value for Qt 6.

Pick-to: 6.1
Change-Id: I26fb97d32969463d94e38222e32f241f86ad9193
Reviewed-by: Samuel Gaist <samuel.gaist@idiap.ch>
Reviewed-by: Kai Koehne <kai.koehne@qt.io>
Reviewed-by: Edward Welbourne <edward.welbourne@qt.io>
Reviewed-by: Lars Knoll <lars.knoll@qt.io>
2021-03-04 09:56:06 +01:00
Joerg Bornemann
7c62caa355 Make toolchain inspection more robust
QtAutoDetect.cmake did read the (possibly detected) toolchain file and
looked for the string "The Android Open Source Project" to deduce that
we want to build for Android. This has been done, because we're
autodetecting the platform before the first project comment, i.e. before
the toolchain file is loaded.

This magic string detection is a bit fragile, and we need a similar
approach for WebAssembly. A more robust approach would be to fetch the
value of CMAKE_SYSTEM_NAME from the toolchain file without actually
loading it.

Now, we run a CMake script that includes the toolchain file and prints
variables were interested in. The calling code reads these variables and
stores them in prefixed variables in the current scope.

Change-Id: Ide9ea3054e1453d17129523e1ec86ecaed55af2a
Reviewed-by: Craig Scott <craig.scott@qt.io>
Reviewed-by: Cristian Adam <cristian.adam@qt.io>
2021-03-04 09:55:41 +01:00
Alexey Edelev
1f8f13cbe7 Add the 'FEATURE_qmake' feature
Add a conditional build of the qmake.

Task-number: QTBUG-89369
Change-Id: I8d7968ffb20ea31df2f85fff055e0d131ed06a36
Reviewed-by: Joerg Bornemann <joerg.bornemann@qt.io>
2021-03-04 09:49:44 +01:00
Sona Kurazyan
fcc453df5c Improve docs for Qt Concurrent run with promise mode
For the readers that are new to QtConcurrent, it may be confusing that
unlike the normal usage of QPromise, they don't have to call start() or
finish() when using Qt Concurrent run with promise mode. Be more
explicit about that.

Pick-to: 6.1
Change-Id: I08df6c4ca41bec4120e208a6643ee20c7adf265c
Reviewed-by: Jarek Kobus <jaroslaw.kobus@qt.io>
Reviewed-by: Leena Miettinen <riitta-leena.miettinen@qt.io>
2021-03-04 09:45:31 +01:00
Friedemann Kleint
b62725608b Blacklist test QMenu::QTBUG_89082_actionTipsHide() for Windows
Apparently, ba13960392 is not
sufficient.
Amends 3f3d5e6716.

Pick-to: 6.0 6.1 5.15
Task-number: QTBUG-89082
Change-Id: I80a00abb330bebd3be8667762c279c2eef595c7f
Reviewed-by: Oliver Wolff <oliver.wolff@qt.io>
2021-03-04 08:43:33 +00:00
Kai Köhne
b58ca067da headersclean: Compile with -std=c++latest, -Zc:__cplusplus on MSVC
c++latest does check that our headers also work with upcoming C++20
support in MSVC. It also implicitly sets -permissive-, which checks for
stricter standards compliance.

Pick-to: 6.1
Task-number: QTBUG-91117
Change-Id: Iaf1547191969213d570a1b2f59888ad04a7977ab
Reviewed-by: Joerg Bornemann <joerg.bornemann@qt.io>
2021-03-04 09:40:56 +01:00
Timur Pocheptsov
7c1aa0c48c Convert QDtls classes to the new plugin-based design
Essentially, the same code re-shuffled and placed behind
the new interfaces.

Fixes: QTBUG-91174
Task-number: QTBUG-65922
Change-Id: I8f14697f10713f9738c5c7805aed0150c084850c
Reviewed-by: Edward Welbourne <edward.welbourne@qt.io>
Reviewed-by: Mårten Nordheim <marten.nordheim@qt.io>
(cherry picked from commit 6c835796c8ea2590008900ffb5f4bf0d902ee73d)
Reviewed-by: Qt Cherry-pick Bot <cherrypick_bot@qt-project.org>
2021-03-04 08:40:07 +00:00
Albert Astals Cid
b22fe78d85 Fix signature of canDropMimeData used in code snippet
Change-Id: I9026e11630651e740282466551ad78883a0421ec
Reviewed-by: Fabian Kosmale <fabian.kosmale@qt.io>
2021-03-04 09:04:17 +01:00
Eirik Aavitsland
ede0082f86 Update bundled libjpeg-turbo to version 2.0.6
[ChangeLog][Third-Party Code] libjpeg-turbo was updated to version 2.0.6

Pick-to: 6.1 6.0 5.15 5.12
Change-Id: I3e308d241853edf3c1d616955cda203220a258d8
Reviewed-by: Liang Qi <liang.qi@qt.io>
2021-03-04 09:04:02 +01:00
Andrei Golubev
538e9fa568 Fix compilation error in QDateTime
One of the changes done in 902505a058
results in a compilation error: somehow an expression
"int * enum value (with underlying type qint64)" has result type
"long int" and thus the compiler cannot find matching add_overflow

Return the qint64 cast back to overcome this
Compiler: gcc 7.5.0-3ubuntu1~18.04

Change-Id: Iaca882762e812bef69ec325df5f59e02082a0130
Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
2021-03-04 08:26:30 +01:00
Giuseppe D'Angelo
fe9d7bf759 QScopedPointer: deprecate swap
Follow up of 612a01be65
(deprecating QSP::take()): for the same reasons, swap()
functions do not belong to QScopedPointer, or they would
allow the pointer to escape:

  QScopedPointer a;
  {
    QScopedPointer b = ~~~;
    qSwap(a, b);
  }
  // b's pointer escaped its scope

Deprecate them as well.

[ChangeLog][QtCore][QScopedPointer] QScopedPointer swapping
functions have been deprecated, as they would allow the
managed pointer to escape the scope. If you need those semantics,
use std::unique_ptr instead.

Change-Id: I2b0938b62f2ef5a3561f61f595a3fb4c505a8f08
Reviewed-by: Allan Sandfeld Jensen <allan.jensen@qt.io>
Reviewed-by: Volker Hilsheimer <volker.hilsheimer@qt.io>
2021-03-04 06:49:02 +01:00
Zou Ya
712117f8b8 Redundant condition: tornoff
Redundant condition: tornoff.
'!tornoff || (tornoff && scroll)' is equivalent to
'!tornoff || scroll'

Pick-to: 6.1
Change-Id: I8339faa4d53360db280173ee489e48eba4883b70
Reviewed-by: Edward Welbourne <edward.welbourne@qt.io>
2021-03-04 10:34:43 +08:00