Commit Graph

42314 Commits

Author SHA1 Message Date
Laszlo Agocs
0a78e5f117 xcb: Fix nullptr vs. VK_NULL_HANDLE error
Fallout from a recent 0 - nullptr fixup in 5.15.

Change-Id: I17adf742d4f65dc6a468fbe72d0f02d3efa276d7
Reviewed-by: Mårten Nordheim <marten.nordheim@qt.io>
2020-01-09 20:57:05 +01:00
Liang Qi
a59c768489 Merge remote-tracking branch 'origin/5.14' into 5.15
Conflicts:
	src/corelib/kernel/qobject.cpp

Change-Id: I4780b25665672692b086ee92092e506c814642f2
2020-01-09 20:30:39 +01:00
Andy Shaw
1c75f59588 iOS: Handle positionFromPosition out of bounds
Based on the documentation for positionFromPosition, if the resulting
position is less than 0 or longer than the text, then we should return
nil. This fixes problems with placement of the cursor and selection
rectangle when auto-completion is used.

Fixes: QTBUG-79445
Change-Id: I44a18881527a8a22012fe5fcbbc3216e60c48bc9
Reviewed-by: Tor Arne Vestbø <tor.arne.vestbo@qt.io>
2020-01-09 15:28:43 +01:00
Morten Johan Sørvig
5507d0f1b0 Make setReadOnly track ReadOnlyChange events only
The test was previously tracking all Change events,
which made it fragile.

Change-Id: I17872341237009a9a0a2ad2fd5482f917991d7b2
Reviewed-by: Tor Arne Vestbø <tor.arne.vestbo@qt.io>
2020-01-09 13:52:25 +01:00
Sona Kurazyan
89c4bb5f24 Deprecate QJsonDocument methods for converting to/from JSON binary
Also remove the example code for deprecated methods and use CBOR instead
where it makes sense.

Task-number: QTBUG-81068
Change-Id: Iffb7a4b3d7b16a1e485fc05b3ab2e2468e9e0718
Reviewed-by: Ulf Hermann <ulf.hermann@qt.io>
2020-01-09 13:52:25 +01:00
Friedemann Kleint
bfbf8ca453 Silence deprecation warning about QImage::alphaChannel() in qpixmap.h
Amends aa542be4e0.

Change-Id: Id1a256a101cc16fa36d1254d3523cf0732c24045
Reviewed-by: Allan Sandfeld Jensen <allan.jensen@qt.io>
2020-01-09 13:52:25 +01:00
Friedemann Kleint
7b0f341872 Add a widget gallery example
Since 072ca960f5 changed the default
of the styles example back to Norwegian Wood, it is no longer
suited as gallery example.

Extract the dialog from it and re-add it as a gallery example Add a
tooltip displaying the class name and a help shortcut opening the
documentation.

Restructure the group boxes to add more widgets.

Remove the gallery meta-tag from the styles example.

Task-number: PYSIDE-1112
Change-Id: Ie6f13084012771bd8f5bf9cad23b58d0720fdd92
Reviewed-by: Cristian Maureira-Fredes <cristian.maureira-fredes@qt.io>
2020-01-09 13:52:25 +01:00
Jani Heikkinen
1e42c97cf0 Bump copyright year
Change-Id: I9468ef21a2cf03cf07c38f012a2aa9bae6d02a03
Reviewed-by: Johanna Äijälä <johanna.aijala@qt.io>
Reviewed-by: Friedemann Kleint <Friedemann.Kleint@qt.io>
2020-01-09 14:41:53 +02:00
Joerg Bornemann
8bfdb25c1f Doc: Extend the documentation about qmake scopes
Fixes: QTBUG-18025
Change-Id: I2b587266cde2002d965dc824a869be255cf3522e
Reviewed-by: Paul Wicking <paul.wicking@qt.io>
2020-01-09 11:27:10 +01:00
Edward Welbourne
11c5c078c7 Eliminate QLocale's default_number_options global static
It had create()'s default number options when passed to create, so
wasn't useful then; and otherwise shadowed the value held by the
cached private for the default locale. Noticed in the course of adding
an analogous global for the system locale.

Drive-by - eliminated a redundant language != C check.

Change-Id: I5601dc09188804c11dede5be460bfdd12b8152ce
Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
2020-01-09 11:15:50 +01:00
Edward Welbourne
0f80452b92 Improve QLocale method documentation
Add missing \sa lines, clarify what the exponential character is and
mention that C is an exception to the "no number options set".

Change-Id: I13ca483a07738908640408e0ca512de31586cec9
Reviewed-by: Paul Wicking <paul.wicking@qt.io>
Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
2020-01-09 11:15:07 +01:00
Edward Welbourne
f91af791cc Add advance warning of change of return types coming in Qt6
The QLocale methods that report the fragments used in making up
numbers all return QChar. A note dating from before Qt5 times warned
that we need to change these to return QString (since we might need a
surrogate pair to represent the relevant characters). Give advance
warning in the documentation that this shall happen at Qt 6.

[ChangeLog][QtCore][QLocale] decimalPoint(), groupSeparator(),
percent(), zeroDigit(), negativeSign(), positiveSign() and
exponential() still return QChar but shall be changed to return
QString in Qt 6. Callers are encouraged to switch to QString early,
exploiting the QString(QChar) constructor.

Task-number: QTBUG-81053
Change-Id: Ia802c7665676ecf13669c6a6f173f2e70eac578e
Reviewed-by: Paul Wicking <paul.wicking@qt.io>
2020-01-09 11:13:59 +01:00
Pasi Petäjäjärvi
6224130cc8 Add touch input device mapping support via QT_QPA_EGLFS_KMS_CONFIG
To be feature parity with evdev touch which already supports this

Change-Id: Ie7f9c868ea888725b24c3855106e1c0c0ba943a9
Reviewed-by: Laszlo Agocs <laszlo.agocs@qt.io>
2020-01-09 12:06:33 +02:00
Edward Welbourne
70d484b5df Fix encoding expected by tst_qmessagehandler::qMessagePattern()
The actual logging code, qt_message_print(), uses toLocal8Bit(), so
testing by comaring with toUtf8() isn't robust.

Change-Id: I7d6614e4af8c679674dbbf4ff47a88b2b75fc2dc
Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
2020-01-09 10:58:25 +01:00
Edward Welbourne
bcc8cf5e3b Fix encoding inconsistency between tst_QNoDebug and QTestLog
Fix tst_QNoDebug::streaming() to use toLocal8Bit(), to match
QTestLog::ignoreMessage(), which uses fromLocal8Bit().

Change-Id: I65f7b995a582aeab7b7ba61781a229fecd1ed3c3
Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
Reviewed-by: David Faure <david.faure@kdab.com>
2020-01-09 10:57:49 +01:00
Edward Welbourne
6f1ae59ee6 Change getMacLocaleName() to return a QString
Returning a QByteArray required doing a toUtf8() to a QString on one
of its paths, which was promptly undone by its caller using
fromUTf8(), since a QString was needed anyway.

Drive-by - remove spurious default for parameter in method definition.

Change-Id: I45f553d74cd0ba9dab25c439ba8291c00b7ceb5b
Reviewed-by: Tor Arne Vestbø <tor.arne.vestbo@qt.io>
Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
2020-01-09 10:55:54 +01:00
Samuli Piippo
2385ab73be QInputDeviceManager: initialize device counts
The device counts were used before they were initialized, causing
problems e.g. with mouse cursor.

Fixes: QTBUG-81207
Change-Id: Ic9dadcaebeb4c4a64bb506e4236d5a9260e0fdbc
Reviewed-by: Paul Wicking <paul.wicking@qt.io>
2020-01-09 10:45:48 +02:00
Lars Schmertmann
34e467b481 Remove dead code to fix a lint warning
Obsolete SDK_INT Version Check
------------------------------
This check flags version checks that are not necessary,
because the minSdkVersion (or surrounding known API level)
is already at least as high as the version checked for.

The mindSdkVersion in templates/AndroidManifest.xml is 21 for Qt 5.14
and androiddeployqt also ensures that the minSdkVersion is not below 21.

Change-Id: I452de5b152f572efc69e6b292a8b15dbbfba639b
Reviewed-by: BogDan Vatra <bogdan@kdab.com>
(cherry picked from commit b8e404f6d0631e04d30a864dc68b0574bfca90f1)
2020-01-09 08:04:41 +01:00
BogDan Vatra
3b54009b13 AAB files can be signed only with jarsigner tool
Fixes: QTBUG-80406
Change-Id: I04b99477c744e7dd729a791c81194b90c4ec658a
Reviewed-by: Andy Shaw <andy.shaw@qt.io>
2020-01-09 08:26:50 +02:00
BogDan Vatra
ce04fa345d Android: make sure we don't add _$${QT_ARCH} twice
Fixes: QTBUG-80582
Change-Id: I2b3790bb18754e146db611d61c48a3b7a532575c
Reviewed-by: Andy Shaw <andy.shaw@qt.io>
2020-01-09 08:25:42 +02:00
Andre Hartmann
1edf8bc465 QObject: Replace more 0 and NULL with nullptr
... in docs, comments, and warnings. Also adopt
some occurrences around there and in the snippets.

Change-Id: Icc0aa0868cadd8ec2270dda794bf83cd7ab84160
Reviewed-by: Christian Ehrlicher <ch.ehrlicher@gmx.de>
2020-01-09 02:33:08 +01:00
Tor Arne Vestbø
7b092b3fe3 Remove clearWidgetPaletteHash argument from setPalette_helper
The argument is only used when the application palette is set,
(as opposed to setting the palette for a specific widget class),
and that code path is only triggered from QApplication::setPalette,
which passes 'true' for this argument.

Change-Id: I67a1cc3741f6f62653b0f95ff88d28228f9977d4
Reviewed-by: Timur Pocheptsov <timur.pocheptsov@qt.io>
2020-01-09 02:33:08 +01:00
Tor Arne Vestbø
2a02487ff0 Move tracking of widget specific app palettes to QApplicationPrivate
Change-Id: I43cc25207026f174e46534baedf08e0c300728d1
Reviewed-by: Timur Pocheptsov <timur.pocheptsov@qt.io>
2020-01-09 02:33:08 +01:00
Tor Arne Vestbø
0c37bc11b5 Share updates to QGuiApplicationPrivate::app_pal via helper function
Change-Id: I2f582358efaadcd33b39c52317222322c589423f
Reviewed-by: Simon Hausmann <simon.hausmann@qt.io>
2020-01-09 02:33:08 +01:00
Inho Lee
445c1a873f Resolve a build error for ICC 19
This argument name makes an error with "line 302:Type t = Undefined;"

Change-Id: I5488ff02ab7c9f9391c17361da5e2aac2727a6a0
Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
2020-01-09 01:33:08 +00:00
Thiago Macieira
64359ad710 ucstrncmp: Fix UBSan report of array overflowing
The expression "a + offset + N" will eventually calculate an address
past the end of a, since we are comparing to end. That's undefined
behavior. Instead, calculate end - a and compare that to offset + N.

This commit subtracts "a" from both sides of the inequalities and swaps
the two sides to make them obey Qt coding style. Testing with GCC 9
(which is the only one I care about) shows the compiler generates the
same code.

Fixes: QTBUG-81218
Change-Id: Id84da383373844f3a4b0fffd15e7c1ab904daccd
Reviewed-by: Olivier Goffart (Woboq GmbH) <ogoffart@woboq.com>
2020-01-09 01:33:08 +00:00
Giuseppe D'Angelo
c61cedcc54 GCC: revoke constexpr before 5.0
It's causing build failures on GCC 4.9 due to our code hitting

https://gcc.gnu.org/bugzilla/show_bug.cgi?id=57694

(at least since de82d239f8).

Task-number: QTBUG-80997
Change-Id: I80a9d1fcbf26d8c0bf514ddc7bdb86eb7173360f
Reviewed-by: Ville Voutilainen <ville.voutilainen@qt.io>
2020-01-09 02:33:08 +01:00
Nico Vertriest
22942058aa Doc: Correct qdoc compilation errors qtbase
Task-number: QTBUG-79824
Change-Id: I4be365d92b1adfde09efd04d088f75c506666a95
Reviewed-by: Topi Reiniö <topi.reinio@qt.io>
2020-01-09 02:33:08 +01:00
Jean-Michaël Celerier
c77efa6d38 Disable support for RasterOpModes in GL paint engine
This leads to crashes for instance when displaying a text cursor
in a graphics scene.

Change-Id: I1b5c884ddb8325a7f5bdbc6027f0fae13f139a1c
Reviewed-by: Eirik Aavitsland <eirik.aavitsland@qt.io>
2020-01-09 02:33:08 +01:00
Qt Forward Merge Bot
06b2d54e4b Merge "Merge remote-tracking branch 'origin/5.14' into 5.15" 2020-01-09 01:00:21 +01:00
Qt Forward Merge Bot
9bb9de461f Merge remote-tracking branch 'origin/5.14' into 5.15
Change-Id: I9b4816b4aa6f0c51a446742db58b9d0dcf69aa09
2020-01-09 01:00:08 +01:00
Lorn Potter
c2687d1e5d wasm: futureproof EmscriptenMouseEvent
Future versions of emscripten will remove the timestamp, so we need to
replace this with the current timestamp

See a7f058a1e6 (diff-9a5d68085dc7db2938b37a2b7b05c1f5)

Change-Id: Ieba323ad54933626d90ac7cbae5a2c471c52628e
Reviewed-by: Morten Johan Sørvig <morten.sorvig@qt.io>
2020-01-09 09:14:36 +10:00
Giuseppe D'Angelo
50f3ccd782 QStringView: add a test for overload resolution versus QString
In the presence of multiple overloads of a function taking either
QString or QStringView, QStringView should always be preferred.

The rationale is that the QStringView overload may have been
added "later" (read: the function was written when QStringView
was not available yet, so it took QString), and the fact that
a function with the _same name_ offers a QStringView overload
implies the function never needed to store/own the string in
the first place.

Add a (compile-time) test for this preference. This is in
preparation for a future QString(char16_t*) constructor
(in Qt 5.15 / Qt 6).

Change-Id: I60a435e494b653548f8f8d52c5d7e7cac2cc875a
Reviewed-by: Friedemann Kleint <Friedemann.Kleint@qt.io>
Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
2020-01-09 00:01:55 +01:00
Błażej Szczygieł
f2a61f2ce2 xcb: Propagate size hints when window changes its scaling factor
Properly scale size hints to the new scaling factor.

Fixes: QTBUG-80476
Change-Id: I1081c9b01560f7e434f0f1de0199ef3d3cae787c
Reviewed-by: Tor Arne Vestbø <tor.arne.vestbo@qt.io>
Reviewed-by: Friedemann Kleint <Friedemann.Kleint@qt.io>
Reviewed-by: Morten Johan Sørvig <morten.sorvig@qt.io>
2020-01-08 01:28:48 +01:00
Robert Loehning
5e66ea373a Fuzzing: Move fuzz target to match path of tested code
Change-Id: I3e96f5ba89e9126ff8626f0e98397ad996fb1cd3
Reviewed-by: Eirik Aavitsland <eirik.aavitsland@qt.io>
2020-01-07 21:15:09 +01:00
Nico Vertriest
f3b3c971cf Doc: Correct link errors
Task-number: QTBUG-79824
Change-Id: I05caaccab1efa16bc0a01ce3045a9377f9ef640e
Reviewed-by: Paul Wicking <paul.wicking@qt.io>
2020-01-07 18:22:12 +01:00
Tor Arne Vestbø
5af73cd9db Skip WA_DontShowOnScreen widgets when checking whether application can quit
QApplication tries to close all windows on quit using closeAllWindows,
but closeAllWindows skips some windows, in particular any widget with
WA_DontShowOnScreen set.

QApplication then tries to verify that all windows have been closed,
and that logic should skip the same kind of windows as closeAllWindows
does.

We include WA_DontShowOnScreen so that widgets that are proxied via
QGraphicProxyWidget will not prevent the application from quitting.

There's still some divergence between closeAllWindows and the logic
in QApplication::event's quit handling, but aligning that requires
more work than this particular fix, and should probably also be
based on using the return value of tryCloseAllWindows() directly.

Change-Id: I2555eeee0cb04b8e736109fed57f37150efd1964
Fixes: QTBUG-81107
Reviewed-by: Friedemann Kleint <Friedemann.Kleint@qt.io>
Reviewed-by: Paul Olav Tvete <paul.tvete@qt.io>
2020-01-07 15:16:13 +01:00
Friedemann Kleint
2421759458 Restore High DPI scale factors
Change the default rounding policy to "Round" so that 2 is used
for 150% (144DPI) on Windows, as it was in 5.13.

Fixes: QTBUG-80934
Change-Id: I0cba986ce6afc9e2737c656000ad854c07844360
Reviewed-by: Morten Johan Sørvig <morten.sorvig@qt.io>
2020-01-07 14:22:38 +01:00
Friedemann Kleint
c72322804d uic: Extend the baseline test for Python
Previously, there was only a Python compile test which triggers
only when PySide2 is found. Rename it to pythonCompile().

Extend the TestEntry structure by adding the base line file
and flags, which represent all special cases found in the code.
Check for the presence of a Python base line file in addition
to the C++ one.

Prototypically add one form. Further forms can be added
on the go.

Task-number: PYSIDE-797
Change-Id: Ic2983fa3cab2399a6809e244f93c663e0212f675
Reviewed-by: Cristian Maureira-Fredes <cristian.maureira-fredes@qt.io>
2020-01-07 13:33:14 +01:00
Friedemann Kleint
78d2a04a01 QSystemTrayIcon: Fix geometry() to work with scaling enabled
Add missing call to QHighDpi::fromNativePixels(), retrieving
the screen from the menu.

Task-number: QTBUG-79248
Change-Id: I9f358c8010615c3f96ed9dc3b6666013ae9a0ed9
Reviewed-by: Morten Johan Sørvig <morten.sorvig@qt.io>
2020-01-07 13:23:06 +01:00
BogDan Vatra
e52239f525 Use prefixed ssl libs when "-openssl-linked" configure params is used
As long as we do a multi abi build in one go there is no easy way for us to know
where the ssl libs are located for each ABI. The easiest way is to use libs
prefixed with the ABI.

For configure set we are using "_arm64-v8a" prefix as the configure script will
always use arm64-v8a to run the tests.

Don't show the OPENSSL_LIBS example as it won't work on Android.

Here https://github.com/KDAB/android_openssl/commit/ebb0b68be4 you can find
a script which builds these libs.

Fixes: QTBUG-80862
Change-Id: I019c2a208ae48a7356b8f3933d0f4aad5ac156a3
Reviewed-by: Andy Shaw <andy.shaw@qt.io>
2020-01-07 14:23:06 +02:00
Qt Forward Merge Bot
0b14e657f4 Merge "Merge remote-tracking branch 'origin/5.14' into 5.15" 2020-01-07 07:28:00 +01:00
Joerg Bornemann
9d7ed92f6e Fix dependency resolution for extra compilers in VS projects
De-duplicate the code that calls the extra compiler's depend_command by
using the central function callExtraCompilerDependCommand. This one
actually tries to resolve dependencies unlike the removed code that
blindly resolved relative paths to the build directory.

This fixes dependencies reported by uic which need to be resolved
against what is in DEPENDPATH.

Fixes: QTBUG-80579
Change-Id: If482e50ff3eff716fefffee82004acc076b3a547
Reviewed-by: Kai Koehne <kai.koehne@qt.io>
2020-01-07 07:16:59 +01:00
Eskil Abrahamsen Blomfeldt
42ecdfe6f3 Revert "Android: Implement MaximizeUsingFullscreenGeometryHint"
This reverts commit c17a5cec19.

The patch introduced a call to View.getRootViewInsets() which
was introduced in API level 23. We don't want to change the
minimum level for Qt 5.x series now, so we will revert the
change in 5.15 and reintroduce it in Qt 6, simultaneously
setting the minimum API level to 23.

Task-number: QTBUG-74202
Change-Id: Ia25bb2cd62287aa80a43bbd294fb757f3f79ff5e
Reviewed-by: BogDan Vatra <bogdan@kdab.com>
2020-01-07 07:10:44 +01:00
Qt Forward Merge Bot
c75e8a6618 Merge remote-tracking branch 'origin/5.14' into 5.15
Change-Id: I6c81e3cb6272adc5c3de2513792bd48604ff4dd0
2020-01-07 01:01:16 +01:00
Qt Forward Merge Bot
68c30e372b Merge "Merge remote-tracking branch 'origin/5.14' into 5.15" 2020-01-06 20:13:31 +00:00
Shawn Rutledge
1535fc9fb9 tablets on xcb: report correct local coordinates to nested windows
Change e453222414 tried to map global
position directly from the desktop to the window that should receive
the event.  That's fine for single-window applications; but media
players like OBS and VLC often use embedded windows to play video.
So the mapping needs to traverse the window parent hierarchy somehow.
In this patch it's done by calling QWindow::mapFromGlobal(), but that
only works with integer coordinates (QPoint).  To preserve the fix
for QTBUG-48151 (and other jitter bugs), we need sub-pixel accuracy;
so we have to add back the fractional part after mapping the int part.

Fixes: QTBUG-77826
Change-Id: Ib52ce14138e477182e0ef53b0ff30ce1eff40372
Reviewed-by: Gatis Paeglis <gatis.paeglis@qt.io>
2020-01-06 18:51:42 +01:00
Laszlo Agocs
bd4a1b98b8 eglfs: kms: Query the current mode correctly via the encoder
...not the connector. Passing the connector id to drmModeGetEncoder()
is clearly an oversight.

Task-number: QTBUG-80976
Change-Id: I80a6088fca558d1637bd01b0aca8c4a8ba3b25f5
Reviewed-by: Eirik Aavitsland <eirik.aavitsland@qt.io>
2020-01-06 18:14:26 +01:00
Sona Kurazyan
82d02b7b95 Deprecate SAX classes in Qt XML
Deprecated the SAX classes and disabled or replaced their uses in
tests if applicable.

Removed the saxbookmarks example, no point in keeping examples for
the deprecated code.

[ChangeLog][QtXml] SAX classes are now deprecated. Use QXmlStreamReader,
QXmlStreamWriter in QtCore instead.

Task-number: QTBUG-76177
Change-Id: Ic171d62fa0527b0f36f94cf09a69586092269957
Reviewed-by: Friedemann Kleint <Friedemann.Kleint@qt.io>
Reviewed-by: Paul Wicking <paul.wicking@qt.io>
Reviewed-by: Kai Koehne <kai.koehne@qt.io>
2020-01-06 18:13:01 +01:00
Paul Olav Tvete
844ef184e8 RHI: Remove old native texture API
Task-number: QTBUG-78570
Change-Id: I8c4850828ac03319ac923a26c2e985883956c286
Reviewed-by: Laszlo Agocs <laszlo.agocs@qt.io>
2020-01-06 18:13:01 +01:00