Commit Graph

42566 Commits

Author SHA1 Message Date
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
6074ebf728 Merge remote-tracking branch 'origin/5.15' into dev
Change-Id: I7be168303fc4fec5892f20f8dcbdf1bdfcd4986f
2020-01-09 01:00:26 +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
Karsten Heimrich
84bf4d90b7 Fix comile issues with VS 2017
'QTypedArrayData<T>::iterator QVector<T>::insert(int,QItemSelectionRange &&)': cannot convert argument 1 from 'QTypedArrayData<T>::iterator' to 'int'
'bool QVector<QItemSelectionRange>::isValidIterator(QTypedArrayData<T>::const_iterator) const': cannot convert argument 1 from 'QTypedArrayData<T>::iterator' to 'QTypedArrayData<T>::const_iterator'

Change-Id: Id43ca5a9cd7b5709d47515ffdab3896feb298087
Reviewed-by: Lars Knoll <lars.knoll@qt.io>
2020-01-08 09:47:59 +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
Christian Ehrlicher
8040f11f1d SQL: cleanup private classes
Cleanup private SQL classes:
 - use nullptr
 - use member initialization
 - adjust style
 - remove deprecated functions

Change-Id: I845f5b1081649fdd40f4f80e1052331806230cf7
Reviewed-by: Andy Shaw <andy.shaw@qt.io>
2020-01-07 21:54:14 +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
Friedemann Kleint
75391511ff Merge remote-tracking branch 'origin/5.15' into dev
Change-Id: Ia2ce994c42adc010c453edaeea57f672556958f6
2020-01-07 08:34:53 +01: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
Lars Knoll
fd9b0b86bb Don't mix QHash and QMultiHash
Change-Id: I8a6ec788f995ef2609e971e0a2f330973975657a
Reviewed-by: Mårten Nordheim <marten.nordheim@qt.io>
2020-01-06 18:49:13 +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
Paul Olav Tvete
908df199d0 Add environment variables for customizing Vulkan
QT_VULKAN_INSTANCE_EXTENSIONS to specify additional
instance extensions.
QT_VULKAN_INSTANCE_LAYERS to specify additional
instance layers.
QT_VULKAN_DEVICE_EXTENSIONS to specify additional
device extensions.

These will apply to all QVulkanWindows and everything
that uses RHI, including Qt Quick with the Vulkan RHI
backend.

Task-number: QTBUG-80499
Change-Id: I912495affa987d62a9823d55d06d6a8209f6adc6
Reviewed-by: Laszlo Agocs <laszlo.agocs@qt.io>
2020-01-06 18:13:01 +01:00
Kai Koehne
6005d1ca16 Document -schannel option in configure -help
Task-number: QTBUG-80928
Change-Id: I4c04d7411f96bddceda032dca85e82314c9565fd
Reviewed-by: Joerg Bornemann <joerg.bornemann@qt.io>
2020-01-06 14:14:41 +01:00
Kai Koehne
7c65527a02 qmake: Document QML_IMPORT_PATH
qmake itself does not use the variable, but Qt Creator does.

Fixes: QTBUG-77866
Change-Id: I313d1ebe32dbc1eeac8d2d79b519349c7097a5a6
Reviewed-by: Leena Miettinen <riitta-leena.miettinen@qt.io>
2020-01-06 13:10:57 +01:00
Kai Koehne
9b4ec1393f MinGW: Allow debug-and-release builds
Commit 4d289edb14 did disable debug-and-release
for MinGW completely. While it makes sense to change the
default, we should allow people to opt-in to old behavior
by explicitly setting '-debug-and-release'.

To allow differentiation between debug and release libraries
debug dll's (again) have a 'd' suffix.

Fixes: QTBUG-80792
Change-Id: I341b1a94788f490e975be6736159980cd9273f08
Reviewed-by: Joerg Bornemann <joerg.bornemann@qt.io>
2020-01-06 12:58:16 +01:00
Kai Koehne
935736b848 MinGW: Build in release mode by default
Qt 5.14.0 switched the default from -debug-and-release
to -debug only. Change this to -release, like on the
other platforms.

[ChangeLog][MinGW] Qt will by default be built in release
mode. Use -debug-or-release to force the pre 5.14.0
default.

Change-Id: I020268d0672c80cdc0259068c6dc2c743a794237
Reviewed-by: Joerg Bornemann <joerg.bornemann@qt.io>
2020-01-06 12:58:11 +01:00
Joerg Bornemann
cca279338c CMake: Fix usage requirements for static builds of Qt on macOS
When scanning the prl files to set up usage requirements for the Qt libraries
we omitted "-framework Foo" flags. Those were passed as linker flags, but not
as interface libraries. Consequently, the frameworks that are used by Qt
libraries were missing on the link line when building against a statically
built Qt.

Fix this issue by scanning the dependencies for "-framework Foo" just like we
do with "-lfoo" flags.

Fixes: QTBUG-80855
Change-Id: Ie7804304141c86207d143a6e1005e78bdc099113
Reviewed-by: Cristian Adam <cristian.adam@qt.io>
Reviewed-by: Kyle Edwards <kyle.edwards@kitware.com>
2020-01-06 12:48:40 +01:00
Giuseppe D'Angelo
6d201aa1bd QRegularExpression: make escape-like functions work on QStringView
They don't store the strings.

[ChangeLog][QtCore][QRegularExpression] The escape(),
wildcardToRegularExpression() and anchoredPattern() functions
now have overloads taking a QStringView parameter.

Change-Id: Icc66ba1201ef1f1064d9565900439e78912b675c
Reviewed-by: Samuel Gaist <samuel.gaist@idiap.ch>
2020-01-06 12:35:26 +01:00