Commit Graph

45502 Commits

Author SHA1 Message Date
Lorn Potter
5e8bd204e2 wasm: fix network download crash
It seems it was defaulting to the indexdb filesystem, but it is not mounted.

Fixes: QTBUG-83827
Change-Id: I1f81d790e5786fe41b59c0f41ca7f6025732c9b2
Reviewed-by: Morten Johan Sørvig <morten.sorvig@qt.io>
2020-04-29 11:28:05 +10:00
Liang Qi
00edd2a7e7 Merge remote-tracking branch 'origin/5.15.0' into 5.15
Change-Id: I42afd73badf41ac990ff9cf8c6bc650850d2dacf
2020-04-28 23:00:20 +02:00
Paul Wicking
e6a39c13bf Doc: Remove manual duplicate alias descriptions
With the introduction of the \typealias command to QDoc, QDoc generates
a standardized line for aliased types.

This patch removes duplication caused by the change in QDoc.

Change-Id: I1a01c378f85b0decb7c0400a3b21146f0898c6ec
Reviewed-by: Topi Reiniö <topi.reinio@qt.io>
2020-04-28 20:04:54 +02:00
Oliver Wolff
85dab30b15 Fix building of autotests for certain configurations
When a configuration is static and has builtin_testdata defined, it was
possible that the "testdata" resource that is generated in testcase.prf was
used for a qmlimportscan directly. This generated test data resource  is no
file though. It's a "qmake struct" that contains files and a base folder
so that we should add every file from the "file list" of that struct.

It is possible, that the generated resource has a base, but no files. Thus
we need two loops or we can end up with a command line that ends with
"-qmldir". If qmlimportscanner decided to warn/error out in this case in
the future this feature could be broken and the point of breakage might
not be obvious.

Change-Id: I2111f594f7d5cf40521b8fe9236a8be9e2ed1b07
Reviewed-by: Edward Welbourne <edward.welbourne@qt.io>
Reviewed-by: Joerg Bornemann <joerg.bornemann@qt.io>
2020-04-28 20:04:42 +02:00
Kai Koehne
0303d8ddfa Android: Rename rs locale to se
rs is the country code for Republic of Serbia, but se is the Serbian
Language.

According to the  IANA  subtag registry that is referenced in the error
message, the language subtag for Serbian is se.

  https://www.iana.org/assignments/language-subtag-registry/language-subtag-registry

This fixes an error when uploading some apps to the Google Play Store.

Fixes: QTBUG-83780
Pick-to: 5.15
Change-Id: I532a3082ca954a78343c873246b09a14d7a80a0e
Reviewed-by: BogDan Vatra <bogdan@kdab.com>
2020-04-28 13:34:36 +02:00
Morten Johan Sørvig
562d7ded3b macOS: draw toolbar separator line in unfifed mode
Commit 836a2fb8 changed the contentBorderThickness
property to also include the title bar height, in
order to position sheets correctly when unified toolbar
mode is enabled. As an accidental side effect this made
Qt stop drawing the toolbar separator line.

Account for the added title bar height also in
testContentBorderAreaPosition().

Task-number: QTBUG-78110
Change-Id: I4ecfd010a6784bbb592646affc676d8cbfd9b6da
Reviewed-by: Tor Arne Vestbø <tor.arne.vestbo@qt.io>
2020-04-28 11:32:14 +02:00
Mårten Nordheim
084525a034 QNAM/QNetConMon: emit networkAccessibleChanged on changes
For compatibility with the bearer functionality.

Change-Id: I26ba6bad046b3f99c8ee13e709a26ddcbd868e25
Reviewed-by: Timur Pocheptsov <timur.pocheptsov@qt.io>
2020-04-28 11:28:58 +02:00
Andy Shaw
85c09f3c51 Use QMAKE_TARGET for the name of the object script file
Since TARGET at this point contains the path to where the target will
be then it can include ".." as part of it which will cause problems when
building for Android on Windows. Therefore, QMAKE_TARGET should be used
as an identifier here as the path is not needed.

Change-Id: Idb8babd0459c65cbcfd64fe47baeac4303a3fd87
Reviewed-by: Joerg Bornemann <joerg.bornemann@qt.io>
2020-04-28 06:32:59 +00:00
Marc Mutz
bfde4f4a96 torrent example: fix stripping of file extension
Due to QChar being convertible from almost any integral type,
the old code actually called QString::remove(QChar).

Fix by using QString::chop() instead.

Change-Id: I345b018aa137ecff608a130e69ade5d37ef0805c
Reviewed-by: Edward Welbourne <edward.welbourne@qt.io>
Reviewed-by: Paul Wicking <paul.wicking@qt.io>
2020-04-27 18:11:13 +00:00
Antti Kokko
f58c8fb453 Add changes file for Qt 5.15.0
Change-Id: I28732113bcfd65e983dff6746f6787a266211c8c
Reviewed-by: Eskil Abrahamsen Blomfeldt <eskil.abrahamsen-blomfeldt@qt.io>
Reviewed-by: Edward Welbourne <edward.welbourne@qt.io>
2020-04-27 20:11:04 +02:00
Joerg Bornemann
8e63725f40 CMake: Honor INSTALL_MKSPECSDIR when generating qmodule.pri
Change-Id: I3e0cdee30590d6979658ef81978513dd20455516
Reviewed-by: Alexandru Croitor <alexandru.croitor@qt.io>
2020-04-27 16:55:38 +02:00
Shawn Rutledge
c068edcecf Always open a submenu on the same screen where the parent menu is
We've seen submenus opening on different screens in different scenarios,
but probably there's never a sensible reason to do that.
QWidgetPrivate::setScreenForPoint() can often give incorrect results
in multi-screen desktop configurations; this is a way of avoiding that.

Task-number: QTBUG-76162
Change-Id: I895696c6858ad953258c84b21117beea4c4fc01d
Reviewed-by: Andy Shaw <andy.shaw@qt.io>
2020-04-27 16:37:30 +02:00
Allan Sandfeld Jensen
a1f9729b74 Fix 32bit int overflow
Do not continue if the conversion to 32bit int would cause an overflow.

Change-Id: I8a198dce5962e7ebd248b9baa92aba8730bfd3b0
Reviewed-by: Edward Welbourne <edward.welbourne@qt.io>
2020-04-27 15:25:32 +02:00
Allan Sandfeld Jensen
41387bb330 Fix 8bit image conversions with non-default bytes_per_line
Copy line by line when bytes per line doesn't match between input and
output.

Fixes: QTBUG-83777
Change-Id: I44ca75963df6188c1de76196d9c12fd8bb081688
Reviewed-by: Eirik Aavitsland <eirik.aavitsland@qt.io>
2020-04-27 15:24:36 +02:00
Sona Kurazyan
469e044f06 Port qtbase/tests/auto/gui/painting to CMake
Task-number: QTBUG-78225
Change-Id: Idc1333b119939e65da8f47d8de5333a38701bcb4
Reviewed-by: Alexandru Croitor <alexandru.croitor@qt.io>
2020-04-27 14:34:56 +02:00
Sona Kurazyan
7e1dacc27a Port qtbase/tests/auto/corelib/text tests to CMake
Task-number: QTBUG-78220
Change-Id: I497da6ed489854bdee5a1ead9a3f34118c78d001
Reviewed-by: Alexandru Croitor <alexandru.croitor@qt.io>
2020-04-27 14:34:51 +02:00
Qt Forward Merge Bot
ceaf23b361 Merge "Merge remote-tracking branch 'origin/5.15' into dev" 2020-04-27 13:56:59 +02:00
Qt Forward Merge Bot
00ee368813 Merge remote-tracking branch 'origin/5.15' into dev
Conflicts:
	src/corelib/text/qstringliteral.h

Change-Id: I1665af3ce537471b249def5e080b39bd4105189e
2020-04-27 13:50:33 +02:00
Jarek Kobus
31ec0c8e71 Fix doc
Change-Id: I0df2a430b451718e2fefdaa1632b81e2d16107cc
Reviewed-by: Leena Miettinen <riitta-leena.miettinen@qt.io>
2020-04-27 13:16:48 +02:00
Marc Mutz
50b3097683 Remove unused qTopLevelDomain()
The last (and only) user was removed in 4f076db3d2.

Change-Id: I59b155017bfd00bbcbfe72dc0e535c92c0384dad
Reviewed-by: Mårten Nordheim <marten.nordheim@qt.io>
2020-04-27 13:08:45 +02:00
Marc Mutz
7b04e0012b QUnicodeTables: port to charNN_t
This makes existing calls passing uint or ushort ambiguous, so
fix all the callers. There do not appear to be callers outside
QtBase. In fact, the ...BreakClass() functions appear to be
utterly unused.

Change-Id: I1c2251920beba48d4909650bc1d501375c6a3ecf
Reviewed-by: Lars Knoll <lars.knoll@qt.io>
Reviewed-by: Konstantin Ritt <ritt.ks@gmail.com>
2020-04-27 13:08:41 +02:00
Volker Hilsheimer
1a342b2db1 Remove deprecated QComboBox::SizeAdjustPolicy enum value
Change-Id: Ia8ae2eb11b86bc615e1297d7fabd1afcb821557c
Reviewed-by: Shawn Rutledge <shawn.rutledge@qt.io>
2020-04-27 12:22:33 +02:00
Leander Beernaert
6dd90afb76 CMake: Regenerate projects to match updated plugin API
Change-Id: Iafe0a953e74d7f36ec48fa075b3725dd6466c5e3
Reviewed-by: Alexandru Croitor <alexandru.croitor@qt.io>
2020-04-27 12:21:29 +02:00
Leander Beernaert
bd24bf740c CMake: Fix wrong arm64 architecture
Due to the wrong string comparison, we were writing out the wrong
architecture for the arm64 builds to the deployment settings json file.
This leads to androiddeployqt tool not being able to locate the
stdlibc++.

Change-Id: I3d13b14c27f043445bf46aaca0e9f862f6ca84e5
Reviewed-by: Alexandru Croitor <alexandru.croitor@qt.io>
2020-04-27 12:21:29 +02:00
Volker Hilsheimer
dccf28b7c3 Remove deprecated members from several QtGui classes
Those can be trivially removed as they have direct replacements, or
are completely unused.

The migration path for QCursor::bitmap and QCursor::mask is

QBitmap *pb = c.bitmap(); // up to 5.15, warns in 5.15
QBitmap vb = c.bitmap(Qt::ReturnByValue); // from 5.15, works in 6
QBitmap b = c.bitmap(); // from 6.0 on

Change-Id: I3b3acd1c7f09c4c8414e98b3ce11986f1ecd5eda
Reviewed-by: Shawn Rutledge <shawn.rutledge@qt.io>
2020-04-27 12:21:29 +02:00
Paul Wicking
d433d0e089 Doc: add since for QWheelEvent::position
Fixes: QTBUG-83779
Change-Id: Icd39c6e3b65e17a51d04ea3c0718f2957948aaa4
Reviewed-by: Nico Vertriest <nico.vertriest@qt.io>
2020-04-27 09:37:07 +02:00
Qt Forward Merge Bot
c6d6348fdf Merge remote-tracking branch 'origin/5.14' into 5.15.0
Change-Id: I889c639db2fe24d17d535a2c4f52d72ea32491f8
2020-04-27 09:25:10 +02:00
Tor Arne Vestbø
6fa50601ab Don't warn when loading icons via the image loaders
9d5ae9f26c98 introduced a warning when a matching icon engine was not
found for a given file suffix, under the assumption that all formats
would go through icon engine plugins. Unfortunately QIcon itself falls
back to a direct use of QPixmapIconEngine when no icon engine plugin
is found, which would lead to the warning being emitted for built in
formats such as PNG.

Until this code can be moved properly into QPixmapIconEngine we'll
remove it.

Change-Id: I14d1d33a0f0c29e4b4604ef3b53c05cb8e02f867
Reviewed-by: Tor Arne Vestbø <tor.arne.vestbo@qt.io>
Reviewed-by: Simon Hausmann <simon.hausmann@qt.io>
2020-04-26 20:10:08 +02:00
Tor Arne Vestbø
d5f759cf66 iOS: Use storyboard instead of .xib file for launch screen
Apps on the iOS app store are required to use storyboards for their
launch screens from June 30th 2020.

Change-Id: Iae34042294fb167a2c893542c57dfaacaf1e929c
Fixes: QTBUG-83512
Reviewed-by: Joerg Bornemann <joerg.bornemann@qt.io>
2020-04-26 20:09:58 +02:00
Andy Shaw
7c7b09dbac Cocoa: If the grabRect is null then add in a null image for the area
If it is null then it has nothing to grab, so a null QImage and QRect
is added to the lists so that there is still a representation in some
form for that display. This additionally ensures that it does take
up space for the display in the final image too.

Fixes: QTBUG-63086
Change-Id: I6e80ecc1170642025f6930e2211017c114e25c16
Reviewed-by: Tor Arne Vestbø <tor.arne.vestbo@qt.io>
2020-04-26 20:09:51 +02:00
Marc Mutz
4ba25a0920 QStringIterator: port from uint to char32_t
Change-Id: I0ca47b87216478b28e29b0fa1a118ef13b6d7c84
Reviewed-by: Lars Knoll <lars.knoll@qt.io>
Reviewed-by: Konstantin Ritt <ritt.ks@gmail.com>
2020-04-26 13:46:18 +02:00
Marc Mutz
19bfcdaa43 Port qIsEffectiveTLD() to QStringView
Also add a piece of documentation that the input needs to be
in lower-case (the implementation uses qt_hash to index into
a table of TLDs, and qt_hash is case-sensitive).

Change-Id: I911c0e2bb0826fc1b0fc01ed60bdfd6e4c0298f2
Reviewed-by: Mårten Nordheim <marten.nordheim@qt.io>
2020-04-26 11:46:16 +00:00
Volker Hilsheimer
bc205d81e7 QApplication: deliver all wheel events to widget that accepts the first
For kinetic wheel events, Qt tries to make sure that all events in the
stream go to the widget that accepted the first wheel event.

It did so by directing all events from the stream to the widget from
which the spontaneous event was returned as accepted.
However, that widget might have passed the event on to some other
widgets; e.g QScrollArea forwards wheel events from the viewport to the
relevant scroll bar. The event might then have come back accepted only
because parent propagation kicked in (the scrollbar might not accept
the event, so the parents get a chance, and some parent's scrollbar
ultimately accepts the event).

In this scenario, the wheel widget would be the viewport under the
mouse, when it should have been the scrollbar of the parent. The
next events from the stream were then delivered to a widget that didn't
scroll; and parent propagation is not (and should not be) implemented
for the case where Qt has a wheel widget.

Instead, make the first widget that accepts any initial wheel event
the wheel widget, even if the event was not spontaneous. With this
change, all events from the stream are delivered to the widget that
actually handled the event. That has the effect that ie. a viewport
of a scroll area only gets the first event; all following events are
delivered directly to the scrollbar.

The test case added simulates the different scenarios - nesting of
scroll areas, classic wheel events and a stream of kinetic wheel
events.

[ChangeLog][QtWidgets][QApplication] Wheel events from a device that
creates an event stream are correctly delivered to the widget that
accepts the first wheel event in the stream.

Change-Id: I5ebfc7789b5c32ebc8d881686f450fa05ec92cfe
Fixes: QTBUG-79102
Pick-to: 5.15
Reviewed-by: Tor Arne Vestbø <tor.arne.vestbo@qt.io>
Reviewed-by: Shawn Rutledge <shawn.rutledge@qt.io>
2020-04-25 01:34:04 +02:00
Lars Knoll
f6bd056803 Remove the QTextCodec dependency from the xcb plugin
Change-Id: Ic9f4cec4aa7270b8d9e16c345d060d7d820319d3
Reviewed-by: Simon Hausmann <simon.hausmann@qt.io>
2020-04-24 23:44:51 +02:00
Lars Knoll
5f013bc10f Move Qt::codecForHtml() to qtextcodec.*
The method should move out of Qt together with QTextCodec in Qt 6.
Qt 6 will in any case always assume utf8 for 8bit encoded HTML.

Change-Id: I68adbc1f0df7e36a82ef6b434ee3771f23e3b790
Reviewed-by: Simon Hausmann <simon.hausmann@qt.io>
2020-04-24 23:44:50 +02:00
Marc Mutz
26a38db8a2 QUrlIdna: port qt_is_idn_enabed() to QStringView
Change-Id: I3cd8a1da47f660f79760bbde88560693ab505823
Reviewed-by: Lars Knoll <lars.knoll@qt.io>
Reviewed-by: Mårten Nordheim <marten.nordheim@qt.io>
2020-04-24 23:44:50 +02:00
Volker Hilsheimer
70ad404203 QMainWindow: don't grow memory when modifying tabbed docks while hidden
QMainWindow tries to avoid memory allocations by caching tab bars that
are no longer used. That cache is populated when the layout is
activated.

The layout might never be activated when the main window is never shown,
in which case adding and removing dock widgets at runtime will
continuously allocate more memory for tab bars that are created.

A workaround is to call QMainWindow::layout()->activate() explicitly in
application code, once all dock widgets have been removed. This change
avoids that applications have to do that.

Change-Id: I70eb585d2120f0b7b73f59c3ee65d7242c12ec59
Fixes: QTBUG-83135
Pick-to: 5.15
Reviewed-by: Richard Moe Gustavsen <richard.gustavsen@qt.io>
2020-04-24 17:41:02 +02:00
Volker Hilsheimer
ed86a4f253 Don't send QEvent::Hide to an already hidden top level widget
When hiding a popup by clicking outside of its area, a window is closed.
Depending on the platform specific implementation details, this can
result in multiple calls to QWidgetPrivate::setVisible(false). The first
one from the handling of the close event in QWidgetWindow::event; the
second from the destruction of the window in QWindow::event.

Since the first call already sets the Qt::WA_WState_Hidden flag before
calling QWidgetPrivate::hide_helper, we can test if the flag is set
and skip the second call if it is.

The included test does not reproduce the issue, as that issue only
reproduces if the close event is generated by the mouse event handling
in the Cocoa platform plugin (which doesn't call QWidget::close, but
rather sends a native close event to the platform window). However, it
verifies that the fix doesn't introduce any regressions.

Change-Id: Id0eda9326a8adf0cc1f6a3840f9ac0b635ab39a1
Fixes: QTBUG-79134
Pick-to: 5.15
Reviewed-by: Qt CI Bot <qt_ci_bot@qt-project.org>
Reviewed-by: Tor Arne Vestbø <tor.arne.vestbo@qt.io>
2020-04-24 17:40:36 +02:00
Volker Hilsheimer
cc54685b8d Remove deprecated ApplicationAttribute enum values
In the declaration, leave them in as comments so that the gaps in the
numbering of the values doesn't create confusion.

Change-Id: I92ff299416896c471e7c7d80b988cd4642b6b756
Reviewed-by: Tor Arne Vestbø <tor.arne.vestbo@qt.io>
2020-04-24 17:40:17 +02:00
Volker Hilsheimer
5d32552cf4 Move QMargins operator| into qmargins.h, add equivalent for QMarginsF
Addresses FIXME comment in qwidget.cpp, where the operator is being
used.

Add documentation, make constexpr and add noexcept as for the other
operators.

As a drive-by, remove invalid const from return type in the
documentation of the other operators. They all return a non-const
QMargins object.

Change-Id: I5a9ca82978d38acd02e03ec00ca202fe1b8cf6c1
Reviewed-by: Tor Arne Vestbø <tor.arne.vestbo@qt.io>
2020-04-24 17:40:09 +02:00
Volker Hilsheimer
fd894fd68e QListWidget/View: Update the selection when moving items within the view
The code for doing that existed in the QListWidget::dropEvent override,
and was only using standard itemview APIs to adjust the selection model.
There is no reason why dropping items internally in a QListView
should not do the exact same thing.

As part of moving the code from QListWidget to QListView, replace QList
with QVector, and other minor optimizations.

[ChangeLog][QtWidgets][QListView] Moving selected items within a list
view by drag'n'drop will maintain the selection of those items.

Change-Id: Ie24bec38234839dcb2f0b0ee0302cc59ca101631
Fixes: QTBUG-83084
Pick-to: 5.15
Reviewed-by: Jan Arve Sæther <jan-arve.saether@qt.io>
2020-04-24 17:40:01 +02:00
Marc Mutz
20cdf807b1 QChar: port low-level functions from uint/ushort to char32/16_t
Now that the standard gives us proper types for UTF-16 and UTF-32
characters, use them. Will eventually make the code much easier to
read than today, where uint could be an index as well as a char32_t.

It also ensures that the result of e.g. QChar::highSurrogate() can
still be implicitly converted to a QChar now that the
QChar(non-characater-integral-types) ctors are being made explicit.

[ChangeLog][QtCore][QChar] All low-level functions
(e.g. highSurrogate()) now take and return char16_t instead of ushort
and char32_t instead of uint.

Change-Id: I9cd8ebf6fb998fe1075dae96c7c4484a057f0b91
Reviewed-by: Lars Knoll <lars.knoll@qt.io>
Reviewed-by: Konstantin Ritt <ritt.ks@gmail.com>
2020-04-24 12:45:53 +02:00
Marc Mutz
3238445b27 QString: add append, op+=, prepend, insert taking QStringView
[ChangeLog][QtCore][QString] Now supports appending, prepending
and inserting QStringViews.

Change-Id: I7538c050c67590f27d91443eda0b94a4b80b62f2
Reviewed-by: Anton Kudryavtsev <antkudr@mail.ru>
Reviewed-by: Lars Knoll <lars.knoll@qt.io>
2020-04-24 10:45:09 +00:00
Laszlo Agocs
d737db8734 Clarify ResetNotification in QSurfaceFormat a bit
Add some more details to make it a bit easier for advanced users
to grasp what this is about.

Task-number: QTBUG-80257
Pick-to: 5.15
Change-Id: I9969b5b62384a25d5e90b57ef25c83a8a2a6c9c7
Reviewed-by: Andy Nichols <andy.nichols@qt.io>
2020-04-24 10:46:52 +02:00
Marc Mutz
b32fc18381 QUrlIdna: re-enable NRVO
Change-Id: Id4f9b14f4255c661a0313ca18b0c5af5c55880e7
Reviewed-by: Mårten Nordheim <marten.nordheim@qt.io>
2020-04-24 10:41:59 +02:00
Andy Shaw
dddd197d42 Deprecate QGuiApplication::fontChanged() signal
Rather than have a fontChanged() signal which can be connected to for
tracking when the application font has changed, then it is better to
use the event that is sent to all windows and the application itself.
That way it is easy for a window/widget or item that cares about the
change to the application font to catch it in the event() function.

[ChangeLog][QtGui][QGuiApplication] Deprecated fontChanged() signal in
favor of QEvent::ApplicationFontChanged.

Change-Id: Iae8e832238fc85e385a52305bc04f16e597454b0
Reviewed-by: Volker Hilsheimer <volker.hilsheimer@qt.io>
2020-04-24 10:10:55 +02:00
Kai Koehne
44e8c90ad4 Do not mention Qt XML's SAX API anymore in examples/xml/README
The SAX API in in Qt XML got deprecated, and examples using it
removed in commit 82d02b7b95.

Pick-to: 5.15
Change-Id: I39b71378c0f797e82431c8a0e12255626ed145ed
Reviewed-by: Sona Kurazyan <sona.kurazyan@qt.io>
2020-04-24 09:47:41 +02:00
Kai Koehne
40001d4a53 Doc: Remove mentioning of QXmlSimpleReader from QXmlStreamReader
Pick-to: 5.15
Change-Id: Ieba073c21f666421ab519089e0976880e67ad0b1
Reviewed-by: Leena Miettinen <riitta-leena.miettinen@qt.io>
2020-04-24 09:47:26 +02:00
Leena Miettinen
37bd3fbccd Doc: Describe updating fonts with substitutes
Fixes: QTBUG-82577
Change-Id: I40662240da69c0d93d0386172c10f375fbb5fefc
Reviewed-by: Paul Wicking <paul.wicking@qt.io>
2020-04-24 07:27:27 +00:00
Lars Knoll
9260662cb1 Fix compilation of thee OCI driver
Amends change befd198c15

Change-Id: I11cc116d31fa1f71acd9579e60a6b265811def1e
Reviewed-by: Samuel Gaist <samuel.gaist@idiap.ch>
2020-04-24 08:42:12 +02:00