Commit Graph

49655 Commits

Author SHA1 Message Date
Thiago Macieira
c000143ee4 QDeadlineTimer: optimize when std::chrono::steady_clock is the same
Change-Id: Ib57b52598e2f452985e9fffd14583173716343b0
Reviewed-by: Lars Knoll <lars.knoll@qt.io>
Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
2020-12-09 12:54:59 -07:00
Thiago Macieira
8c8cbd1508 Simplify the detection for the monotonic clock in qelapsedtimer_unix.cpp
Unlike the previous code, we now entrust the compiler to properly
implement thread-safe statics for this code. That was the main reason
why the old code was confusing, trying to determine if the clock IDs
were positive or negative.

Instead, simply make a call to clock_getres(CLOCK_MONOTONIC) and that
will tell us if the monotonic clock is supported.

Change-Id: I0031aa609e714ae983c3fffd1469522a68fa3b66
Reviewed-by: Volker Hilsheimer <volker.hilsheimer@qt.io>
2020-12-09 21:54:15 +02:00
Giuseppe D'Angelo
7c3208c97d QString: fix count(QRegularExpression)
There is an off by one in the implementation of count(): a match
must be attempted even at the very end of the string, because
a 0-length match can happen there. While at it, improve
the documentation on the counter-intuitive behavior of count(),
which doesn't merely count how many times a regexp matches
into a string using ordinary global matching.

[ChangeLog][QtCore][QString] Fixed a corner case when using
QString::count(QRegularExpression), causing an empty in the
last position not to be accounted for in the returned result.

Change-Id: I064497839a96979abfbac2d0a96546ce160bbc46
Pick-to: 5.15 6.0
Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
2020-12-09 20:41:18 +01:00
Andreas Buhr
92c066b1e5 Modify test_QFINDTESTDATA to not leave files in source tree
test_QFINDTESTDATA is a test which is built and run in the source
tree. It tests usage of relative paths of the Ninja generator, which
only occurs when building in the source tree, so this test cannot
be done outside of the source tree.
Developer's expectation is, however, that an out-of-source build
does not change the source tree. Having "git status" showing
differences after running the tests is irritating. This patch removes
the in-source build files after executing the test.

Change-Id: Ia9fd368c9d54b97a415b63254b45e17bc95ecf45
Reviewed-by: Craig Scott <craig.scott@qt.io>
Reviewed-by: Alexandru Croitor <alexandru.croitor@qt.io>
2020-12-09 20:30:05 +01:00
Tor Arne Vestbø
7886fa8474 macOS: Fix crash when showing parent-less platform menus
Pick-to: 6.0
Pick-to: 5.15
Change-Id: I80f02da1621e4088eb040bb16a4db3867b6ad4d7
Reviewed-by: Alexandru Croitor <alexandru.croitor@qt.io>
2020-12-09 20:30:05 +01:00
Tor Arne Vestbø
b58d6831de macOS: Remove warning about KVO observers on QNSWindow/QNSPanel
NSTitleBarView in Big Sur will observe the window it is in, but makes
sure to remove these observers in viewWillMoveToWindow, as it should.
To avoid spamming user logs with this warning we remove it.

It was dubious what cases it would have caught anyways, as anyone
trying to KVO observe properties Z of a child object Y of X.Y would
need to track whether X changes its Y between adding and removing
the observer. There are no guarantees that Y is stable, and this
applies to an NSView's window property as well.

Pick-to: 6.0
Pick-to: 5.15
Pick-to: 5.12
Change-Id: I27a0d04625f96c4c5d382c39ac068721ce1e8f9d
Reviewed-by: Alexandru Croitor <alexandru.croitor@qt.io>
2020-12-09 20:30:04 +01:00
Christian Ehrlicher
ff8d757e22 QWidget: mark obsolete function isTopLevel() as deprecated
QWidget::isTopLevel() is deprecated and can be replaced 1:1 with
isWindow(). Sadly it's was not marked with Q_DECL_DEPRECATED in 5.15

Change-Id: I4508fbde41927f3b82e47a75011179548325029d
Reviewed-by: Friedemann Kleint <Friedemann.Kleint@qt.io>
2020-12-09 20:30:04 +01:00
Alexandru Croitor
ac09bd40fa CMake: pro2cmake: Add mapping for qmldom library
Change-Id: Ibd8dbec5fa04192fc57a233a18908cba290f986b
Reviewed-by: Joerg Bornemann <joerg.bornemann@qt.io>
2020-12-09 20:30:04 +01:00
Alex Trotsenko
5e72976237 QProcess: remove outdated references to QProcessManager
No such thing exists since Qt 5.5.

Change-Id: Ib3f83dbb1087db1880ef37438669430e0f076301
Reviewed-by: Oswald Buddenhagen <oswald.buddenhagen@gmx.de>
2020-12-09 19:30:04 +00:00
Liang Qi
472c8290af tests: blacklist two functions in tst_QDateTimeEdit on openSUSE
Task-number: QTBUG-89208
Change-Id: I0c0c14e3522a0c504241e178a058687ecfedf55d
Reviewed-by: Tony Sarajärvi <tony.sarajarvi@qt.io>
2020-12-09 20:30:04 +01:00
Volker Hilsheimer
4aa174ed86 Don't refer to "this" in QToolTip documentation
All APIs are static, so there is no "this" pointer.

Pick-to: 6.0
Task-number: QTBUG-89082
Change-Id: I4bfe6c14304d311b903878acd5b4c8169f4065c7
Reviewed-by: Paul Wicking <paul.wicking@qt.io>
2020-12-09 15:54:45 +01:00
Fabian Kosmale
894c2ec918 QMetaObjectBuilder: use constexpr if
Change-Id: I23319c263447714b280e9ba9da72162e19fe4e1b
Reviewed-by: Lars Knoll <lars.knoll@qt.io>
2020-12-09 15:54:18 +01:00
Alex Trotsenko
dccc2aff6c QProcess/Unix: unify waiting in 'Starting' state
It makes no sense to poll the I/O pipes if we didn't get a start-up
notification yet. And in fact, all waitFor...() functions except
waitForReadyRead() did already explicitly wait for process startup
completion. So fix that one up, and remove the handling of 'Starting'
state from the I/O loops.

Change-Id: Ibb7eb7c768bef3f9b6c54009c73b91775570102c
Reviewed-by: Oswald Buddenhagen <oswald.buddenhagen@gmx.de>
2020-12-09 11:48:36 +00:00
Fabian Kosmale
ddc585b7c7 QProperty: Handle eager binding calling setBinding
When an eager binding  triggers a setBinding call, we end up with a
special kind of binding loop:
setBinding() -> evaluate -> notifyObserver
      ^                           |
      |                           /
      ----------------------------
We now catch set condition, and set the binding status to BindingLoop
(with a distinct description).

Task-number: QTBUG-87153
Task-number: QTBUG-87733
Pick-to: 6.0
Change-Id: I9f9915797d82eab820fc279baceaf89d7e5a3f4a
Reviewed-by: Ulf Hermann <ulf.hermann@qt.io>
2020-12-09 12:48:36 +01:00
Alex Trotsenko
55245c769b QProcess: migrate to QDeadlineTimer
Replacing QElapsedTimer with QDeadlineTimer simplifies the code in
waiting functions, which also improves readability.

Change-Id: I56aedd356b547b6735ed0985dc81be706e292437
Reviewed-by: Oswald Buddenhagen <oswald.buddenhagen@gmx.de>
Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
2020-12-09 10:42:19 +02:00
Giuseppe D'Angelo
6f2dc8d7f2 QString: improve lastIndexOf(QRegularExpression) docs
Due to how regex matching works, lastIndexOf has to be implemented
by matching from the string's beginning until the from position
is reached. This might not be obvious for users, so document that.

Task-number: QTBUG-89050
Pick-to: 5.15 6.0
Change-Id: I4b69ea753e7d417d980031926f1e01d77e58720d
Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
2020-12-09 03:02:05 +01:00
Allan Sandfeld Jensen
35d62b6852 Get rid of QPenPrivate::defaultWidth
It is no longer used.

Change-Id: I834e0cbd6ef4fefb52d0864053e95e7dea19b389
Reviewed-by: Eirik Aavitsland <eirik.aavitsland@qt.io>
2020-12-08 22:59:08 +01:00
Weng Xuetian
5f43d665d8 Remove the deprecated m_logicalDpi declaration
Change-Id: I8d9d59f010874e5a45084afcf55640078d5eba24
Reviewed-by: Morten Johan Sørvig <morten.sorvig@qt.io>
2020-12-08 10:01:24 -08:00
Morten Johan Sørvig
fdc687913d QSplashScreen: draw pixmap with SmoothTransfrom
Use high-quality scaling to improve rendering in cases
where the pixmap has to be scaled down, such as when
drawing a @2x pixmap at 150%.

Change-Id: I216b03b61dfa2cc2cc8c573e24a576424f6f5d17
Fixes: QTBUG-88982
Pick-to: 6.0 5.15
Reviewed-by: Tor Arne Vestbø <tor.arne.vestbo@qt.io>
2020-12-08 19:00:42 +01:00
Morten Johan Sørvig
c2c163a7d8 macOS: Add missing QT_MANGLE_NAMESPACE
KeyValueObserver and RunLoopModeTracker were causing
“Class is implemented in both...” messages when loading
multiple namespaced Qt versions into the same process.

Change-Id: Idbd2229c61cde6fba2c12b35d045390a371dee68
Fixes: QTBUG-89059
Pick-to: 6.0 5.15
Reviewed-by: Tor Arne Vestbø <tor.arne.vestbo@qt.io>
2020-12-08 19:00:12 +01:00
Eirik Aavitsland
e26d2865a7 Fix autotest config in cross-compiled prefix build
qt-cmake-standalone-test would be looking for the config files under
the target machine install prefix instead of under the staging prefix
on the build host.

Change-Id: I29850af6d8fe502f4944f689ec10539d17ccdcb9
Pick-to: 6.0
Reviewed-by: Alexandru Croitor <alexandru.croitor@qt.io>
2020-12-08 16:36:50 +01:00
Alexey Edelev
c0ebfb81de CMake: Improve tests wrapper arguments handling
Use 'separate_arguments' to explicitly split arguments from environment
that form 'COMMAND' for execute_process. Enclose using bracket syntax
arguments, that propagated to wrapper script as pure strings.

Amends f19266bd02

Pick-to: 6.0
Change-Id: I858ddff7efa281f9cecfda656a02e1fd12361758
Reviewed-by: Alexandru Croitor <alexandru.croitor@qt.io>
2020-12-08 16:29:28 +01:00
Ivan Solovev
088c391386 QList: update docs
Update some wording to align with QString
and QByteArray documentation

Pick-to: 6.0
Task-number: QTBUG-87962
Change-Id: I8162769c1a5fc94fc8920ad0d4d91e95fe74825f
Reviewed-by: Andrei Golubev <andrei.golubev@qt.io>
Reviewed-by: Sona Kurazyan <sona.kurazyan@qt.io>
2020-12-08 16:27:25 +01:00
Li Xinwei
c9ac82f3b8 CMake: Document some missing configure cmake mappings
Pick-to: 6.0
Change-Id: I4b15dde581e28aece52d7f98cb3d94827e8bcc33
Reviewed-by: Alexandru Croitor <alexandru.croitor@qt.io>
2020-12-08 23:18:11 +08:00
Volker Hilsheimer
cd32e5d746 Fix qdoc warning from incorrectly named method parameter
Amends 2eb7d6073d.

Pick-to: 6.0
Task-number: QTBUG-87962
Change-Id: I55c9e8cf7db9e1e1644a76f29a9dc61b161ae551
Reviewed-by: Ivan Solovev <ivan.solovev@qt.io>
Reviewed-by: Andreas Buhr <andreas.buhr@qt.io>
Reviewed-by: Sona Kurazyan <sona.kurazyan@qt.io>
2020-12-08 16:00:54 +01:00
Edward Welbourne
d75dc06f6a Restore pass-by-ref to QRect QCalendarWidget::paintCell()
Accidentally changed to pass-by-value while doing that to QDate,
in commit af837734b2

Task-number: QTBUG-86400
Change-Id: I8d2db532f537e5f82a5f3b36e72fcf7fefdd2ee5
Reviewed-by: Lars Knoll <lars.knoll@qt.io>
(cherry picked from commit 8db0d701e8b1fe00cdd5d71c18afff84de606013)
Reviewed-by: Qt Cherry-pick Bot <cherrypick_bot@qt-project.org>
2020-12-08 14:49:05 +00:00
Andreas Buhr
aeb5165cb6 Fix tst_qlineedit for offscreen rendering and tiling window managers
tst_QLineEdit::QTBUG13520_textNotVisible checks that text is visible
if a QLineEdit is set to Qt::AlignRight. To do that, it writes
some text into a line edit and checks afterwards that the first
character is in the left half of the window. This fails if the window
is larger than twice the length of the text used and thus might fail
in multiple situations where Qt is not in full control over the size
of the windows created, as is the case with tiling window managers.
This patch changes the test to not check for the first character in
the left half of the window, but instead check for the first character
be approximately at the expected position.

Pick-to: 6.0
Change-Id: I18f6de356ea20f4744f3a58cd2b1d76f6a9545a4
Reviewed-by: Ivan Solovev <ivan.solovev@qt.io>
Reviewed-by: Sona Kurazyan <sona.kurazyan@qt.io>
2020-12-08 15:18:41 +01:00
Andreas Buhr
cd66112298 Fix links to OpenGL documentation
Some links were broken. Some stated to be pointing to OpenGL ES 2.0
documentation but pointed to OpenGL ES 3.2 documentation.

Task-number: QTBUG-88533
Pick-to: 6.0
Change-Id: Iad25d8f709b8fa9421039d5cb51cee21093e3191
Reviewed-by: Friedemann Kleint <Friedemann.Kleint@qt.io>
Reviewed-by: Laszlo Agocs <laszlo.agocs@qt.io>
2020-12-08 15:15:58 +01:00
Kai Koehne
189bc8dd15 Fix MSVC warning C4267 in qstring.cpp
Fix warnings

  qstring.cpp(9650): warning C4267: 'argument': conversion from 'size_t' to 'uint', possible loss of data
  qstring.cpp(9654): warning C4267: 'argument': conversion from 'size_t' to 'uint', possible loss of data

QDataStream::writeBytes expects an uint as second parameter, not size_t.

This reverts parts of 744e55b85a, where the explicit cast to size_t
was introduced.

Pick-to: 6.0
Change-Id: I2750a6f48fc09730aa9fa21dcc31f82e33b48b8b
Reviewed-by: Lars Knoll <lars.knoll@qt.io>
2020-12-08 15:15:58 +01:00
Kai Koehne
9198d7f044 Remove qlalr documentation stub
The documentation is only a stub, and hasn't been built since Qt 4 times.
qlalr is also first and foremost an internal tool nowadays, so it's very
unlikely we will fully document it.

Change-Id: I68821bf1f9ca3811ec8adda583f0c7326421c6b6
Reviewed-by: Paul Wicking <paul.wicking@qt.io>
2020-12-08 15:15:58 +01:00
Christian Ehrlicher
4d94384612 QHeaderView: respect the font role while calculating the elided text
The font role in the header view was not taken into account when the
text for an item should be elided. This leads to a wrongly elided text
esp. visible when the font size is different to the font of QHeaderView.
Fix it by passing the elide mode to the style since only the style knows
the used font (e.g. bold or not bold) and available rect. This is now in
sync with CE_ItemViewItem where the eliding is also done by the style
and not by the item view.

[ChangeLog][QtWidgets][QHeaderView] QStyleOptionHeader got a new member
textElideMode.

Fixes: QTBUG-86426
Change-Id: If6914fe5aaa5d285e6da55d2129f9249d90da3d7
Reviewed-by: Richard Moe Gustavsen <richard.gustavsen@qt.io>
2020-12-08 15:15:58 +01:00
Tuomas Vaarala
1051e23ce9 QSystemSemaphorePrivate: Fix a call to tr() to translate()
Calling QCoreApplication::tr() without #if QT_CONFIG(translation)
can cause the build to fail if configured without translation.
Changing the call to QCoreApplication::translate() fixes that.

Pick-to: 5.15 6.0
Change-Id: I48f0e1be14fc81360b8268620afc2f6c8f255819
Reviewed-by: Andy Shaw <andy.shaw@qt.io>
2020-12-08 14:15:58 +00:00
Joerg Bornemann
192d37099d CMake: Do not write Effective[Source]Paths to target_qt.conf
This was needed, when the mkspecs directory was not present in the
non-prefix build directory. That's not the case anymore.

Pick-to: 6.0
Fixes: QTBUG-89182
Change-Id: I2b04c2d857b0af324e1d7c41ed1934a62275d6f1
Reviewed-by: Alexandru Croitor <alexandru.croitor@qt.io>
2020-12-08 15:15:58 +01:00
Allan Sandfeld Jensen
cc81aae4b3 Shortcut QImage::convertTo when no conversion is necessary
Avoids a detach when converting to existing format.

Pick-to: 6.0
Change-Id: I9a4801878ddec295a02f2c88f4a40ec13d513a94
Reviewed-by: Eirik Aavitsland <eirik.aavitsland@qt.io>
2020-12-08 15:15:57 +01:00
Piotr Mikolajczyk
fd20bc2277 Android: Qml accessibility fixes
- Accessibility focus can follow the position of the widget
  (for example when swiping on a scrollview)

- controls are clickable directly after appearing on the screen after
  scroll (previously you had to click somewhere else on the screen,
  and after that you could focus the newly appeared control)

- checkbox and switch react correctly on click action

- fixed combobox behavior with accessibility enabled

Task-number: QTBUG-79611
Pick-to: 6.0 5.15
Change-Id: If36914ab0165f33593e68fd7ecf168693f8538a7
Reviewed-by: Assam Boudjelthia <assam.boudjelthia@qt.io>
2020-12-08 10:02:34 +01:00
Liang Qi
4a85160e0b tests: blacklist tst_QGlyphRun::drawRightToLeft() on openSUSE
Task-number: QTBUG-89169
Change-Id: I4dfd608e264c9503093cc9fe27e80c489efe7aaf
Reviewed-by: Tony Sarajärvi <tony.sarajarvi@qt.io>
2020-12-08 09:35:21 +01:00
Alexandru Croitor
b3576164f0 CMake: Disable static plugin imports for non-executable targets
There is no point in generating cpp files containing Q_IMPORT_PLUGIN()
macro calls for non-executable targets like modules, plugins and object
libraries in a static Qt build.
It causes unnecessary compiling of 10+ files for each of those targets.
In a static Qt build, plugin imports should only be done for executables,
tools and applications.

Pick-to: 6.0
Change-Id: Ied90ef2f6d77a61a093d393cfdf94c400284c4f0
Reviewed-by: Craig Scott <craig.scott@qt.io>
Reviewed-by: Joerg Bornemann <joerg.bornemann@qt.io>
2020-12-08 09:13:03 +01:00
Aleix Pol
9d83149133 Offer to build manual tests through QT_BUILD_MANUAL_TESTS
Disabled by default as they are currently not being built and many are
not working properly, this will allow us to start using them again.

Change-Id: I823368d04e9fde2beccabedc3ca15efd1f355bfb
Pick-to: 6.0
Reviewed-by: Alexandru Croitor <alexandru.croitor@qt.io>
2020-12-08 08:03:54 +00:00
Fabian Kosmale
c7443d2e11 QPropertyBindingPrivate: Enable QML engine error handling
The QPropertyBindingSourceLocation is only useful for C++ bindings; for
QML bindings we store the binding location in the V4 function. As the
QML binding needs to store some additional information for error
handling, we allow that memory to be reused by putting it into a union
with an array of byte.

Moreover, we use some of the space to store a callback pointer, which
gets called when an error occurs during binding evaluation. That
callback is only called when we know that the binding actually was set
up from the QML engine, in which case a bitflag is set.

Task-number: QTBUG-87733
Change-Id: I4387a4bd59d4d1ccfe75756ce81f4608319e0490
Reviewed-by: Ulf Hermann <ulf.hermann@qt.io>
2020-12-08 08:47:48 +01:00
Avindra Goolcharan
1ee2558b23 wasm/js: fix invalid restartCount reference
The `restartCount` variable on line 245 is mutating
global scope. The PR makes it consistent with the
rest ob the code (`self.restartCount`).

It was observed when importing the qtloader in a
typical Webpack/Babel build environment.

Change-Id: I338285f4f6bcb80df0c16d80cc3ebfec944a8be7
Reviewed-by: Morten Johan Sørvig <morten.sorvig@qt.io>
2020-12-08 01:56:22 -05:00
Shawn Rutledge
9d51fb579b Fix highdpi conversion of QTabletEvent coordinates on xcb
Amends 1535fc9fb9 : when high-dpi scaling
is enabled, there was an offset from the cursor position to the event
position, because QWindow::mapFromGlobal() works in device-independent
pixels, but we are using actual screen pixels here.

Pick-to: 6.0
Pick-to: 5.15
Pick-to: 5.12
Task-number: QTBUG-77826
Change-Id: Ic8743b9e5c4041065f530ed1d9d6c49337b0207a
Reviewed-by: Friedemann Kleint <Friedemann.Kleint@qt.io>
Reviewed-by: Morten Johan Sørvig <morten.sorvig@qt.io>
2020-12-08 07:03:12 +01:00
Tor Arne Vestbø
ae3594436b macOS: Always allow interacting with popup windows during modal session
f4889e63c7 changed the worksWhenModal logic for QNSWindow to
be based on the transient parent relationship of the child window
to the modal session window, to fix many issues where windows that
should be blocked were not.

Unfortunately, some window types do not maintain a transient parent
relationship (e.g. QCompleter, which is itself just a QObject), or
are not common for users to create with a QWidget parent (such as
a context QMenu).

This change restores part of the special-casing that was removed in
f4889e, so that all popup windows are always allowed to be interacted
with during modal sessions. This includes popup windows that were
opened as part of a parent modal session, which would normally be
fully blocked, but we assume that popup windows are intermittent
enough that this will not be a problem.

For now we leave out the other two special casings from f4889e,
namely tool windows and dialogs. The former should in most cases
be created with a parent window, while the latter definitely should.

Fixes: QTBUG-88188
Fixes: QTBUG-88985
Fixes: QTBUG-87849
Fixes: QTBUG-86845
Pick-to: 6.0
Pick-to: 5.15
Change-Id: I005a402b21e8dc16c3b18bcd7e67d12b94a66f44
Reviewed-by: Volker Hilsheimer <volker.hilsheimer@qt.io>
2020-12-08 03:27:06 +01:00
Thiago Macieira
017e41bb86 QCborValue & QCborStreamReader tests: fix warning about %llx on 32-bit
cborlargedatavalidation.cpp:93:60: warning: format ‘%llx’ expects argument of type ‘long long unsigned int’, but argument 2 has type ‘qsizetype’ {aka ‘int’} [-Wformat=]
   93 |         QTest::addRow("bytearray-too-big-for-qbytearray-%llx", v)
      |                                                         ~~~^   ~
      |                                                            |   |
      |                                                            |   qsizetype {aka int}
      |                                                            long long unsigned int
      |                                                         %x

The cast to size_t is required to make the 64-bit not complain due to
the long vs long long difference.

Pick-to: 5.15 6.0
Change-Id: I00b01c01a66748508ea1fffd164a9add2a2650cf
Reviewed-by: Allan Sandfeld Jensen <allan.jensen@qt.io>
2020-12-07 22:54:43 +00:00
Thiago Macieira
3c88728b53 tst_QCborValue: adjust the size of the minimum string that won't fit
I don't know which of the previous commits caused this: as far as I can
tell, this test should never have passed.

Pick-to: 5.15 6.0
Change-Id: I55083c2909f64a1f8868fffd164e7e8c24eec1f8
Reviewed-by: Volker Hilsheimer <volker.hilsheimer@qt.io>
2020-12-07 14:54:41 -08:00
Thiago Macieira
58bea7f3a2 QCborStreamReader::next: don't allocate too much memory in a QBA
Because CBOR strings are encoded in UTF-8, it's possible that the string
that won't fit a QString in UTF-16 would still fit QByteArray in UTF-8
(e.g., anything US-ASCII and most Latin text).

The previous solution was an improvement because we used to read into a
QByteArray then convert the QByteArray to QString, thus using 3x the
amount of memory (1x in QByteArray, 2x in QString). The previous commit
skipped the middle allocation and made the regular readString() function
do the decoding either directly on source memory or by reading in small
chunks (16 kB).

Future improvement for Qt 6.1: add readStringChunk(char16_t *, qsizetype)
so we can do the validation / skipping at O(1) memory.

Pick-to: 5.15 6.0
Change-Id: I7b9b97ae9b32412abdc6fffd1645458c655cc566
Reviewed-by: Allan Sandfeld Jensen <allan.jensen@qt.io>
2020-12-07 22:54:39 +00:00
Thiago Macieira
bab2cd1125 QCborStreamReader: move the UTF-8 decoding into readStringChunk
This allows us to decode long UTF-8 strings in chunks, instead of
allocating a big block of the size of the UTF-8 source and then another
for the full UTF-16 content.

Pick-to: 5.15 6.0
Task-number: QTBUG-88253
Change-Id: I7b9b97ae9b32412abdc6fffd16452a47b1036ef3
Reviewed-by: Allan Sandfeld Jensen <allan.jensen@qt.io>
2020-12-07 22:54:38 +00:00
Mårten Nordheim
b4d7908d5a Http2: set the reply's error code and string on error
If the error occurs during the call to
QHttpNetworkConnectionPrivate::queueRequest coming from the http thread
delegate then we will not yet have connected to the signal! But the http
thread delegate checks if the error code is not NoError, and handles
those situations. To let that work we must update the replies.

Pick-to: 6.0 5.15
Change-Id: I47188e9439920694aaad1765ab28add1e86ccdff
Reviewed-by: Timur Pocheptsov <timur.pocheptsov@qt.io>
2020-12-07 22:34:49 +00:00
Edward Welbourne
0e742c9add Inline QCollator's QString methods via QStringView
Can't be done before Qt 7 unless we do it now, as it'd be BiC.

Task-number: QTBUG-86400
Change-Id: Ib7b2e7b20b4a80b53dfc6535efe90d1674f38e81
Reviewed-by: Lars Knoll <lars.knoll@qt.io>
(cherry picked from commit 53a1e015fdb4082900f306b5e2cca7bd5df77d03)
Reviewed-by: Qt Cherry-pick Bot <cherrypick_bot@qt-project.org>
2020-12-07 22:10:25 +00:00
Allan Sandfeld Jensen
37bd7b5733 Add SameSite API to QNetworkCookie
Change-Id: I3f8b25418154f74bb55fa978b03465f75771d015
Reviewed-by: Mårten Nordheim <marten.nordheim@qt.io>
2020-12-07 22:38:37 +01:00
Timur Pocheptsov
c0a17ecfaf TLS utils - remove useless static_assert
Compiler (gcc) keeps nagging and complaining about an address of function
to be never nullptr in any particular instantiation, when argument is an
address of a function.

Change-Id: If67e80f2ff4d408608429d53814083777cc8441c
Reviewed-by: Mårten Nordheim <marten.nordheim@qt.io>
2020-12-07 19:27:16 +01:00