Commit Graph

47932 Commits

Author SHA1 Message Date
Assam Boudjelthia
675805e9eb Android: allow setting javac build version from the configure script
The configure options -android-javac-source and -android-javac-target
can be used to set the version numbers.

Fixes: QTBUG-86282
Pick-to: 5.15
Change-Id: I36b0665de2c31e16bf6d138859b5503455eb8e66
Reviewed-by: Alexandru Croitor <alexandru.croitor@qt.io>
Reviewed-by: Andy Shaw <andy.shaw@qt.io>
2020-09-16 20:55:08 +03:00
Ulf Hermann
5ce24fab73 Rename size parameter to QCommonArrayOps::sizeToInsertAtBegin()
... in order to avoid a bogus compiler warning.

Change-Id: I25eb435d6d57bdd5ef5c05ccacb0e6413631f6c9
Reviewed-by: Andrei Golubev <andrei.golubev@qt.io>
Reviewed-by: Volker Hilsheimer <volker.hilsheimer@qt.io>
Reviewed-by: Mårten Nordheim <marten.nordheim@qt.io>
2020-09-16 19:20:30 +02:00
Mårten Nordheim
bf4f6fa230 QFile: for filesystem::path, use iterators
Change-Id: I06477d48191e5c02ebf362ee31d8db5b1f76247a
Reviewed-by: Volker Hilsheimer <volker.hilsheimer@qt.io>
2020-09-16 19:03:01 +02:00
Allan Sandfeld Jensen
8c8b9a4173 Normalize rounding
Change the rounding of negative half values to match standard C++
round, this will also allow future optimizations.

Change-Id: I8f8c71bed1f05891e82ea787c6bc284297de9c5c
Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
2020-09-16 18:33:58 +02:00
Paul Wicking
c5f611c084 Doc: Add porting guide documents
Also add existing such docs to the new document group

Task-number: QTBUG-84051
Change-Id: I76f033f0846e09943f249d2beeb1606869eef382
Reviewed-by: Topi Reiniö <topi.reinio@qt.io>
2020-09-16 18:32:09 +02:00
Paul Wicking
227e364c22 Doc: Remove unused porting guide document
This lives in qtdoc anyway, let's not confuse ourselves.

Task-number: QTBUG-84051
Change-Id: Iaf84ecf49cda848ef88aadf108b52713356f1ff8
Reviewed-by: Topi Reiniö <topi.reinio@qt.io>
2020-09-16 18:32:05 +02:00
Alex Trotsenko
2180b4c84a QEventDispatcherWin32: create internal window on construction
When QCoreApplication object is instantiated, creation of the internal
message window is delayed until QEventDispatcherWin32::processEvents()
is called or socket/event notifier is registered. But, if the user uses
a native event loop, posted events are not delivered and timers do not
work.

This problem was fixed in a4ac4b3263 for
QWindowsGuiEventDispatcher in the same way. So, the risk of regression
is minimal.

Change-Id: I7bbb721d96046f64d21a7b0e553e46798b37189c
Reviewed-by: Oswald Buddenhagen <oswald.buddenhagen@gmx.de>
Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
Reviewed-by: Friedemann Kleint <Friedemann.Kleint@qt.io>
2020-09-16 19:26:02 +03:00
Friedemann Kleint
ada01394dd Windows QPA: Remove unused function
Amends 983132212c.

Pick-to: 5.15
Task-number: QTBUG-86575
Task-number: QTBUG-85676
Change-Id: Id2ea85738a2565ec0d9f33ccb264c11754e1e5ff
Reviewed-by: Oliver Wolff <oliver.wolff@qt.io>
2020-09-16 14:49:58 +02:00
Julien Schueller
a16803d3e4 CMake: Fix FindWrapRt
Actually link to librt to fix detection

Change-Id: I819d9b57212fef7f539ef807846e06beb7bd617b
Reviewed-by: Alexandru Croitor <alexandru.croitor@qt.io>
2020-09-16 14:49:00 +02:00
Julien Schueller
cf33d64528 CMake: Fix FindGLESv2
Avoids a linking error when the library is not found as
find_library sets GLESv2_LIBRARY to GLESv2-NOTFOUND

Change-Id: I7ddc15483276e0be0c78b67b760c4d9188758270
Reviewed-by: Alexandru Croitor <alexandru.croitor@qt.io>
Reviewed-by: Cristian Adam <cristian.adam@qt.io>
2020-09-16 14:48:46 +02:00
Shawn Rutledge
a54988c822 Mouse->touch synthesis: send touch event with mouse device
In 4e400369c0 we began to send synth-mouse
events from the touch device, but in the opposite direction it was not
consistent.

Add autotests to prove that it's consistent both ways now.

Change-Id: I7df2328fef224dc1529ca5d27411cd8a5a9c8df9
Reviewed-by: Volker Hilsheimer <volker.hilsheimer@qt.io>
2020-09-16 14:47:45 +02:00
Shawn Rutledge
1fdbbb49d9 Calculate velocity in QMutEventPoint::setTimestamp() with Kalman filter
This functionality was only in Qt Quick in Qt 5.  Now we move it up to QtGui
so that every QEventPoint will have a valid velocity() before being delivered
anywhere.

[ChangeLog][QtGui][QPointerEvent] Every QEventPoint should now carry a valid
velocity(): if the operating system doesn't provide it, Qt will calculate it,
using a simple Kalman filter to provide a weighted average over time.

Fixes: QTBUG-33891
Change-Id: I40352f717f0ad6edd87cf71ef55e955a591eeea1
Reviewed-by: Volker Hilsheimer <volker.hilsheimer@qt.io>
2020-09-16 14:47:36 +02:00
Shawn Rutledge
2692237bb1 Track grab state in QPointingDevicePrivate::activePoints
QQuickEventPoint instances were very long-lived and got reused from one
event to the next.  That was initially done because they were "heavy"
QObjects; but it also became useful to store state in them between
events. But this is in conflict with the ubiquitous event replay
code that assumes it's OK to hold an event instance (especially
a QMouseEvent) for any length of time, and then send it to some widget,
item or window. Clearly QEventPoints must be stored in the QPointerEvent,
if we are to avoid the need for workarounds to keep such old code working.
And now they have d-pointers, so copying is cheap. But replay code
will need to detach() their QEventPoints now.

QEventPoint is useful as an object to hold state, but we now store
the truly persistent state separately in an EventPointData struct,
in QPointingDevicePrivate::activePoints. Incoming events merely
update the persistent points, then we deliver those instead.
Thus when event handler code modifies state, it will be remembered
even when the delivery is done and the QPA event is destroyed.

This gets us a step closer to supporting multiple simultaneous mice.

Within pointer events, the points are moved up to QPointerEvent itself:
 QList<QEventPoint> m_points;
This means pointCount(), point(int i) and points() can be non-virtual.
However in any QSinglePointEvent, the list only contains one point.
We hope that pessimization is worthwhile for the sake of removing
virtual functions, simplifying code in event classes themselves, and
enabling the use of the range-for loop over points() with any kind of
QPointerEvent, not just QTouchEvent. points() is a nicer API for the
sake of range-for looping; but point() is more suited to being
non-const.

In QML it's expected to be OK to emit a signal with a QPointerEvent
by value: that will involve copying the event.  But QEventPoint
instances are explicitly shared, so calling setAccepted() modifies
the instance in activePoints (EventPointData.eventPoint.d->accept);
and the grabbers are stored separately and thus preserved between events.
In code such as MouseArea { onPressed: mouse.accepted = false }
we can either continue to emit the QQuickMouseEvent wrapper
or perhaps QEvent::setAccepted() could become virtual and set
the eventpoint's accepted flag instead, so that it will survive
after the event copy that QML sees is discarded.

The grabChanged() signal is useful to keep QQuickWindow informed
when items or handlers change exclusive or passive grabbers.

When a release happens at a different location than the last move event,
Qt synthesizes an additional move.  But it would be "boring" if
QEventPoint::lastXPosition() accessors in any released eventpoint always
returned the same as the current QEventPoint::xPosition()s just because
of that; and it would mean that the velocity() must always be zero on
release, which would make it hard to use the final velocity to drive an
animation.  So now we expect the lastPositions to be different than
current positions in a released eventpoint.

De-inline some functions whose implementations might be subject to
change later on.  Improve documentation.

Since we have an accessor for pressTimestamp(), we might as well add one for
timestamp() too.  That way users get enough information to calculate
instantaneous velocity, since the plan is for velocity() to be somewhat
smoothed.

Change-Id: I2733d847139a1b1bea33c00275459dcd2a145ffc
Reviewed-by: Volker Hilsheimer <volker.hilsheimer@qt.io>
2020-09-16 11:33:03 +02:00
Joerg Bornemann
4ceef8a3a6 Make xkb a private dependency of QtGui
It should not be necessary to have the xkb dev package installed for
users of QtGui.

Task-number: QTBUG-86421
Change-Id: I4a4102d578df504d23f504a97704fcab4a39023b
Reviewed-by: Qt CI Bot <qt_ci_bot@qt-project.org>
Reviewed-by: Alexandru Croitor <alexandru.croitor@qt.io>
2020-09-16 08:22:38 +02:00
Edward Welbourne
7a67c01a49 Use qint64 for value of that type in tst_QDateTime millisecond tests
The test was previously using int; I shall be wanting to add tests
that exercise the bounds of qint64. Clean up the layout of the
test-row additions in the process of making a trivial change to them
all. Also const the QFETCH() types so we catch any use of non-const
methods on the values fetched.

Change-Id: I4b0187de71f5f14b39b4eabe8afd12a196f73d23
Reviewed-by: Volker Hilsheimer <volker.hilsheimer@qt.io>
Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
2020-09-15 21:53:34 +02:00
Volker Hilsheimer
d6f612cffb Remove dead code
And remove another ### Qt comment, this time ### Qt 5.

Change-Id: I1d5cef47ddd81b6a27f870599128c8f16846c350
Reviewed-by: Gatis Paeglis <gatis.paeglis@qt.io>
2020-09-15 21:53:17 +02:00
Friedemann Kleint
978a43ad4d Fix conversion warnings when setting alpha to QColor
Adapt to 5bb4baae03.

Change-Id: Id65f87740f9de8e0d3624ff63c431dcad642f3a5
Reviewed-by: Allan Sandfeld Jensen <allan.jensen@qt.io>
2020-09-15 21:26:11 +02:00
Jarek Kobus
6ca50b79bc Fix tst_QElapsedTimer::elapsed() flaky test
Instead of using imprecise QTest::qSleep() to estimate the
elapsed time, we trigger a single shot PreciseTimer and
gather all the data in lambda. We wait for lambda to be
executed - we give it twice as much time as is in theory
needed. Afterwards we verify all the data collected in lambda.

Task-number: QTBUG-82903
Change-Id: I0147b7cd2aaf4bf58a216caff167d2db8712541a
Reviewed-by: Andrei Golubev <andrei.golubev@qt.io>
Reviewed-by: Mårten Nordheim <marten.nordheim@qt.io>
Reviewed-by: Edward Welbourne <edward.welbourne@qt.io>
Reviewed-by: Qt CI Bot <qt_ci_bot@qt-project.org>
2020-09-15 21:07:00 +02:00
Alex Richardson
44920e7fb2 CMake: Fix building with -DQT_FEATURE_gui=OFF
Some CMake files currently assume that QtGui is always enabled and we
get a configure-time failure without these changes.

Task-number: QTBUG-86053
Change-Id: I28e32c180c32221f32519017bac6b518a19d5983
Reviewed-by: Tor Arne Vestbø <tor.arne.vestbo@qt.io>
Reviewed-by: Qt CI Bot <qt_ci_bot@qt-project.org>
2020-09-15 20:05:32 +02:00
Alexandru Croitor
93fc3afe71 CMake: Check that QT_HOST_PATH is set when using the Qt toolchain
If a consumer wants to cross-compile a Qt app, they need to provide
the host Qt path location.

When building Qt in the CI we embed the Qt host path into the
generated CMake toolchain file for convenient building of other Qt
modules.

But once Qt is built, packaged and installed on a user's machine, most
likely the Qt host path will not be the same. In such a case, if the
user wants to use the convenience toolchain, they should explicitly
provide the Qt host path via the QT_HOST_PATH and
QT_HOST_PATH_CMAKE_DIR variables.

Show an error message if the values are not provided or don't exist
on the file system.

It's possible that in the future the Qt installer will patch the
toolchain file, or provide additional info, to point to the host
Qt installation so that the user doesn't have to do it manually.

But until that's done, a friendly error message is a good way to
inform the user what they should do.

Task-number: QTBUG-83999
Change-Id: I26291e3c47bb77375f8a5ce7b848c0382a660ca9
Reviewed-by: Joerg Bornemann <joerg.bornemann@qt.io>
Reviewed-by: Qt CI Bot <qt_ci_bot@qt-project.org>
2020-09-15 20:05:28 +02:00
Alexandru Croitor
67567b8e0d CMake: Conditionally set compiler in generated toolchain file
Public consumers of the qt toolchain file will most likely not have
their compilers in the same location where they were on the Qt build
machine.

Only set the compiler paths if none was set already, and the paths
actually exist.

This seems to become a trend in the generated toolchain file, and is
only a stop-gap solution.

A proper solution (two different toolchain files) may follow.

Task-number: QTBUG-83999
Change-Id: I7a603af447333a45c65b98e299ee109932d16517
Reviewed-by: Qt CI Bot <qt_ci_bot@qt-project.org>
Reviewed-by: Joerg Bornemann <joerg.bornemann@qt.io>
2020-09-15 20:05:25 +02:00
Alexandru Croitor
75c4fd52d1 CMake: Regenerate configure.cmake files
Change-Id: I844e82b4655cf1967b16a7785b4e1ef777e61c22
Reviewed-by: Simon Hausmann <hausmann@gmail.com>
Reviewed-by: Qt CI Bot <qt_ci_bot@qt-project.org>
2020-09-15 15:55:47 +02:00
Kai Koehne
61a9038877 Windows: Fix linker warning about missing WinMain.pdb
Do follow the example of winmain.pro and replace /Zi with /Z7.

Manipulating CMAKE_CXX_FLAGS_DEBUG is not particularly elegant,
but CMake seems not to offer a more modern way yet:

https://gitlab.kitware.com/cmake/cmake/-/issues/19084

Fixes: QTBUG-86423
Change-Id: I280d06ad52b79d4be04052ab4e0d2113ef08414c
Reviewed-by: Alexandru Croitor <alexandru.croitor@qt.io>
2020-09-15 15:55:47 +02:00
Alexandru Croitor
e957e9c28f CMake: Fix incorrect host path used in generated toolchain file
A previous change accidentally broke what we we set for
QT_HOST_PATH and QT_HOST_PATH_CMAKE_DIR.

The QT_HOST_PATH variable should use an absolute path as it was
done before.

The QT_HOST_PATH_CMAKE_DIR variable incorrectly used the value of
"${QT_HOST_PATH}" instead of "${QT_HOST_PATH_CMAKE_DIR}".

Fix both of these, and change the names of intermediate variables
to be consistent.

Amends a6a3b82ffb

Task-number: QTBUG-85240
Change-Id: I328a7edee12a13ff793684e8a0a4c2e03204eca4
Reviewed-by: Qt CI Bot <qt_ci_bot@qt-project.org>
Reviewed-by: Joerg Bornemann <joerg.bornemann@qt.io>
2020-09-15 15:55:47 +02:00
Alexandru Croitor
9ce8281417 Fix tests to build in a no-widgets configuration
The qfilesystemmodel.pro was recently moved to the gui tests subfolder,
but it uses widgets inside. Skip it in a no-widgets build.

Amends fb9ec8ad44

Task-number: QTBUG-86187
Change-Id: I955556ffddad483d4c25602ae126b8c2433091b2
Reviewed-by: Volker Hilsheimer <volker.hilsheimer@qt.io>
Reviewed-by: Qt CI Bot <qt_ci_bot@qt-project.org>
2020-09-15 15:55:47 +02:00
Ulf Hermann
1162b4bfc9 Add a QMetaAssociation
This requires refactoring of QMetaSequence, as they share a lot of
common functionality. QMetaAssociation provides a low level interface to
an associative container.

Task-number: QTBUG-81716
Change-Id: I273e00abd82f1549ba8803c323d82aa3a2d12ded
Reviewed-by: Lars Knoll <lars.knoll@qt.io>
2020-09-15 15:55:46 +02:00
Andrei Golubev
d423fe9851 QIcc: fix alignment concerns in ICC profile parsing
Updated QIcc::fromIccProfile() and friends to not rely on
QByteArray pointer alignment. Used qFromUnaligned() instead

Task-number: QTBUG-84267
Pick-to: 5.15
Change-Id: I69ef7e011707bec27cd84693e7f0e92d79a577d1
Reviewed-by: Qt CI Bot <qt_ci_bot@qt-project.org>
Reviewed-by: Allan Sandfeld Jensen <allan.jensen@qt.io>
2020-09-15 15:55:46 +02:00
Andrei Golubev
ecf4f8fc64 Update QString documentation relevant to prepend optimization
[ChangeLog][QtCore][QString] QString is a prepend optimized
container similar to QList.

Task-number: QTBUG-84320
Change-Id: Id035aac859a6f404e389f2eeaf20f9eee5bff20c
Reviewed-by: Paul Wicking <paul.wicking@qt.io>
2020-09-15 15:55:46 +02:00
Volker Hilsheimer
757a9c21c1 QStyleSheetStyle: Fix push button hit testing with padding
Amends f9940b15f7, which
amended 6e1d70ae12.

The bevel of the button is not defined by the contentsRect, but by the
borderRect that the stylesheet style calculates.

Change-Id: I9a0d5bf29a06ce2270014f0d144e33cc3a1a7473
Pick-to: 5.15
Fixes: QTBUG-86587
Reviewed-by: Richard Moe Gustavsen <richard.gustavsen@qt.io>
2020-09-15 11:32:09 +02:00
Allan Sandfeld Jensen
aaa7ab5222 Only include <bit> if using post C++17
Otherwise we hit an #error statement in MSVC standard library.

Change-Id: Ib029edf0be8513a80f2640fd9ca75541615a0448
Reviewed-by: Giuseppe D'Angelo <giuseppe.dangelo@kdab.com>
2020-09-15 11:32:09 +02:00
Assam Boudjelthia
588cbca5b7 Tests: fix json test for Android
test.bjon file doesn't exist, however, it's still included in json.qrc.
That causes the test to fail on Android because it's using that resource
file.

Change-Id: I1e93076069073a1a621459a7d90aec5c0c03f768
Reviewed-by: Alexandru Croitor <alexandru.croitor@qt.io>
2020-09-15 09:32:09 +00:00
Assam Boudjelthia
3bab2d234e Tests: fix qlogging build fail for Android
The macro BACKTRACE_HELPER_NAME is defined inside a block with
#ifdef __GLIBC__ which is not defined on Android, thus causing the test
to fail on Android.

Change-Id: I55e9b3e3bae2da182481239ad88107c36e3bd438
Reviewed-by: Alexandru Croitor <alexandru.croitor@qt.io>
2020-09-15 09:32:08 +00:00
Topi Reinio
6b9a2937d6 QObjectBindableProperty: Fix QDoc-specific typo in header
This prevented QDoc from parsing the properties correctly.

Change-Id: Ib3e02eb29a5c35034c30a3dd9fdf797d4c7e1550
Reviewed-by: Paul Wicking <paul.wicking@qt.io>
2020-09-15 11:32:08 +02:00
Mitch Curtis
d12a5da678 Blacklist tst_QTimeLine::interpolation on Windows in general
Task-number: QTBUG-61037
Change-Id: Ie44c7355e2aefbbd16cef95f1a093302bd789e45
Reviewed-by: Richard Moe Gustavsen <richard.gustavsen@qt.io>
2020-09-15 11:32:08 +02:00
Friedemann Kleint
983132212c Windows QPA: Fix build with mingw64/Win32 threading
For this build, cxx11_future is not available and thus
QThread::create() as introduced by
ed114b728d does not work.
Revert back to implementing a QThread.

Pick-to: 5.15
Fixes: QTBUG-86575
Task-number: QTBUG-85676
Change-Id: I86a91f6bcdfc88804b35bf617362d92f37e51dea
Reviewed-by: Kai Koehne <kai.koehne@qt.io>
2020-09-15 11:32:08 +02:00
Lars Knoll
e96a311334 Use UTF-8 when converting 8 bit data in QTextStream
This was overlooked when doing the conversion to use UTF-8 as the
standard 8 bit encoding for text.

Fixes: QTBUG-54942
Change-Id: Ib7b1b75b4d694648ab7143f6930b6bb1dcad19c9
Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
2020-09-15 08:13:27 +02:00
Lars Knoll
cb78972e37 Remove deprecated API
And replace it's few remaining usages

Change-Id: I2dfbbaa5259acfece028606bef1e872c5692f9fe
Reviewed-by: Mårten Nordheim <marten.nordheim@qt.io>
2020-09-15 08:12:39 +02:00
Lars Knoll
79e0374143 Remove the SAX parser from QtXml
It has been deprecated and will live in qt5compat from now on.

Fixes: QTBUG-86480
Change-Id: I3744c7cee058d51d0fce633a174ab1a0f9235d2c
Reviewed-by: Karsten Heimrich <karsten.heimrich@qt.io>
2020-09-15 08:12:20 +02:00
Edward Welbourne
0aaebc3378 Trim trailing 0s from QTime construction, where neither use nor ornament
The seconds and milliseconds default to 0; so omit them when they're
zero, unless there's nearby code that contrasts nicely with them.

Change-Id: Iea049015e976f5a5209fe87a2cbfdae9de49a559
Reviewed-by: Volker Hilsheimer <volker.hilsheimer@qt.io>
2020-09-15 02:47:28 +02:00
Friedemann Kleint
366564056d QLayout: Make contentsMargins a Q_PROPERTY
It replaces the deprecated int margins property, which was a Q_PROPERTY.
This enables Qt for Python users to use property syntax for it.

Task-number: PYSIDE-1019
Change-Id: I958d2ef7f8e2afcc2be490e29d4b11c070569fbd
Reviewed-by: Christian Tismer <tismer@stackless.com>
Reviewed-by: Volker Hilsheimer <volker.hilsheimer@qt.io>
2020-09-15 00:46:49 +00:00
Mitch Curtis
fb65b32d76 Add qHash implementation for QPoint
[ChangeLog][QtCore][QPoint] Added qHash() implementation.

Change-Id: I65332e7aafab53af40a6e11457b9b457196d584c
Fixes: QTBUG-86457
Reviewed-by: Thorbjørn Lindeijer <bjorn@lindeijer.nl>
Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
2020-09-15 02:46:40 +02:00
Allan Sandfeld Jensen
9815ebf24b Switch QSurfaceFormat::colorSpace to a QColorSpace
Allows more flexibility in the future.

Change-Id: Idcf2d8ddaee268a7b5d55379ccb42dd9b3c33abf
Reviewed-by: Tor Arne Vestbø <tor.arne.vestbo@qt.io>
2020-09-15 01:41:13 +02:00
Allan Sandfeld Jensen
fce84f76f0 Get rid of Qt4 virtual hooks
They have existed throughout Qt5, and no longer used by any
QIconEngine I am aware of.

Change-Id: Iab0a978be808a60fb82379467e294e2457056bae
Reviewed-by: Morten Johan Sørvig <morten.sorvig@qt.io>
2020-09-15 01:40:43 +02:00
André Klitzing
b79b75adf9 Fix -Wunguarded-availability-new for userInterfaceStyle
'userInterfaceStyle' is only available on iOS 12.0 or newer [-Werror,-Wunguarded-availability-new]
       if (previousTraitCollection.userInterfaceStyle != self.traitCollection.userInterfaceStyle) {

Pick-to: 5.15
Change-Id: Id6340f70019d55ab2a0707b1aebd6d333e9544cb
Reviewed-by: Tor Arne Vestbø <tor.arne.vestbo@qt.io>
2020-09-14 22:25:48 +00:00
Adriaan de Groot
07044d70e9 Add missing #includes for FreeBSD build
QFile is no longer included implicitly via other headers,
so include it explicitly in the FreeBSD framebuffer code.
This is needed to make it compile (at all, although there
are also API changes to chase and general bitrot).

Change-Id: I3801a39503f545a24a3b2c58122774b5697358e9
Reviewed-by: David Edmundson <davidedmundson@kde.org>
Reviewed-by: Laszlo Agocs <laszlo.agocs@qt.io>
2020-09-14 20:41:42 +02:00
Laszlo Agocs
d7d0f4d5a0 rhi: gl: Eliminate duplicate glUniform calls
This can happen when there is a uniform block in the Vulkan
shader with an instance name, both in the vertex and fragment
shader. The members are mapped to members of a struct uniform
in GLSL since we do not use uniform buffers there.

Now if there is, for example, "ubuf.opacity" both in the vertex and
fragment shader reflection info, then it's still just one single
uniform in the GL program, using one location. Registering it twice
in our 'uniforms' list is harmless, but wasteful, since it means the
uniform value will be set twice upon each setShaderResources().

Change-Id: Ib646eaec333522560d631b3b81800ef610f09319
Reviewed-by: Andy Nichols <andy.nichols@qt.io>
2020-09-14 20:41:42 +02:00
Inho Lee
02d5566d68 QRhi: support matrix array types of the uniform in GLES2 backend
Task-number: QTBUG-83173
Change-Id: Ieda8948820a9470e3b0bc420ec7b1af09395d568
Reviewed-by: Laszlo Agocs <laszlo.agocs@qt.io>
2020-09-14 20:41:42 +02:00
Shawn Rutledge
db07a20355 Remove QPointerEvent::isPointAccepted() and setPointAccepted()
They are redundant, not in use, and got added without implementation in
a81859a3c8.

Change-Id: Ifed1fbf97a8158c2801df09dac47bf1fc90795d4
Reviewed-by: Volker Hilsheimer <volker.hilsheimer@qt.io>
2020-09-14 17:14:52 +02:00
Mårten Nordheim
2253d5eca6 Schannel: Properly handle request for certificate
Certain servers, like smtp.live.com, will send a request for a
certificate even though they don't require one. In Schannel this
manifests as a warning/info status (SEC_I_INCOMPLETE_CREDENTIALS).
In the cases where it's not needed we should suppress the warning and
try to connect anyway, which is done by calling
InitializeSecurityContext again when we get the status.

Pick-to: 5.15
Change-Id: I3c48140f2949d8557251a49a2b66946da9395736
Reviewed-by: Joshua GPBeta <studiocghibli@gmail.com>
Reviewed-by: Timur Pocheptsov <timur.pocheptsov@qt.io>
2020-09-14 17:14:00 +02:00
Joerg Bornemann
6718dea390 Revert "Revert "CMake: Add facility to mark package dependencies as optional""
This reverts commit b0c51f86f4.
The build failure caused by 58c1c6ee5c has
been fixed.

Change-Id: Ic7458d54c7a874588e8b1bfeca61df1842763656
Reviewed-by: Alexandru Croitor <alexandru.croitor@qt.io>
2020-09-14 15:03:14 +02:00