Commit Graph

11713 Commits

Author SHA1 Message Date
Allan Sandfeld Jensen
c82f73666d Replace Q_DECL_UNUSED with [[maybe_unused]]
Use C++17 attribute directly

Change-Id: Id853e7a5117065e4adb549f81303c1820fe198ce
Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
2020-10-03 11:58:08 +02:00
Edward Welbourne
257d5888e8 QFlags: remove deprecated constructor
Fix remaining places that still exercised it.

Task-number: QTBUG-85700
Change-Id: I84562f53439197141343831c0b9f88983689e6bf
Reviewed-by: Allan Sandfeld Jensen <allan.jensen@qt.io>
2020-10-03 10:54:44 +02:00
Edward Welbourne
4e675cb85e Handle trailing cruft consistently in Qt::DateFormat parsing
Previously the ISO time format would tolerate trailing cruft at the
end in various cases even though there might be an offset specifier
after the time, which should *not* be separated from it by anything
(not even the spaces we originally planned to still tolerate).

The RFC date format is forgiving about space, as is suitable for
parsing of RFC-822 headers, but the other formats should match the
handling in QDateTimeParser, which rejects any dangling cruft.

At the same time, since this required a re-write of
fromIsoTimeString() in any case, add support for the ISO format that
gives the hour a fractional part and skips minutes and
seconds. Previously we only had support for fractional minutes (with
no seconds). The hour without even a fractional part is also valid.

Reworked the documentation of Qt::DateFormat as it was wrong in
places, inconsistent in its formatting and incomplete. Adjusted some
tests to match the new behavior. A fraction separator with no
following digits should have been recognized as an error previously
and now is.

[ChangeLog][QtCore][QDateTime] The ISODate and ISODateWithMs formats
now reject trailing cruft (including spaces) at the end of a time
string. They also gain support for parsing hour-only formats,
including the hour-with-fractional-part format.

Task-number: QTBUG-86133
Change-Id: I38ad1479ae033407f7df97ffbeb7c4bcd463d04a
Reviewed-by: Andrei Golubev <andrei.golubev@qt.io>
Reviewed-by: Paul Wicking <paul.wicking@qt.io>
Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
2020-10-03 07:09:57 +02:00
Allan Sandfeld Jensen
c3cd760303 Remove compiler test
Outdated test for old buggy compilers

Change-Id: I605a2318a21121bde9a80c046a7beb6edcd2d546
Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
2020-10-02 22:13:18 +00:00
Edward Welbourne
b1cf188e83 Rework a test, eliminating some needless conversion via strings
The name toSecsSinceEpoch() gave no hint to the fact that the test
was, in fact, *also* testing round-tripping of the ISODateFormat.
Since there are other tests for string conversion, make this a simple
test of toSecsSinceEpoch().

It did the round-tripping via two methods with overly-terse names that
might just as well be local lambdas - now redundant, so removed.

Change-Id: I1e4fb1cc90224312c995596a8f3fe2bc5d9dfa15
Reviewed-by: Mårten Nordheim <marten.nordheim@qt.io>
Reviewed-by: Andrei Golubev <andrei.golubev@qt.io>
2020-10-02 23:23:58 +02:00
Shawn Rutledge
f51e6552e3 End touch->mouse synthesis when the chosen touchpoint is released
During delivery of a TouchBegin event, if no widget accepts it,
we begin treating the first touchpoint as a synth-mouse, as before.
If a second touchpoint is pressed or released in any order, it's
irrelevant: the fake mouse button is released as soon as the first
touchpoint is released.  This fixes the bug that such a scenario
caused the mouse release not to be sent, so that a widget could get
"stuck" in pressed state.

Done-with: Tang Haixiang <tanghaixiang@uniontech.com>
Fixes: QTBUG-86253
Pick-to: 5.15
Change-Id: I7fbbe120539d8ded8ef5e7cf712a27bd69391e02
Reviewed-by: Volker Hilsheimer <volker.hilsheimer@qt.io>
2020-10-02 14:17:44 +02:00
Lars Schmertmann
8d057fea98 Add test case for QSslSocket to show the wrong behavior
Task-number: QTBUG-81661
Change-Id: I4ed2ad3a22bd5439751328d915e9984eb89397d1
Reviewed-by: Edward Welbourne <edward.welbourne@qt.io>
Reviewed-by: Timur Pocheptsov <timur.pocheptsov@qt.io>
2020-10-02 13:22:38 +02:00
Volker Hilsheimer
e74af68654 QTreeView: fetch as many nested entries as fit into the view
QAbstractItemModel::canFetchMore and fetchMore implementations might only
add a few rows to the model each time they are called. The item views don't
generally expect that, and don't call fetchMore repeatedly, even if there
would be room in the itemview for more data. This problem cannot be
generally solved for all item views, as it would require in repeated expensive
laying out of items.

For nested indexes in a treeview however, we can try to fetch enough child
rows to populate the screen when the item is laid out by repeatedly
calling canFetchMore and fetchMore. To calculate how many items have space,
apply the same heuristics as in the scrollContentsBy implementation to
guess the number of items that can fit into the viewport.

Created test case for the fix.

Done-with: Doris Verria <doris.verria@qt.io>
Fixes: QTBUG-85366
Pick-to: 5.15
Change-Id: I54f95552993873dd4cba80b0f70f4db9d98ddc1d
Reviewed-by: Volker Hilsheimer <volker.hilsheimer@qt.io>
Reviewed-by: Andy Shaw <andy.shaw@qt.io>
Reviewed-by: Richard Moe Gustavsen <richard.gustavsen@qt.io>
2020-10-02 13:16:12 +02:00
Laszlo Agocs
0b7aef08dc rhi: vk: Alter command buffer strategy
Reports on the Web have it that there's nothing guaranteeing a
driver does any actual freeing of resources then doing
vkFreeCommandBuffer for a command buffer from a command pool that
does not have VK_COMMAND_POOL_CREATE_RESET_COMMAND_BUFFER_BIT, thus
leading to continuously growing resource usage with our current
allocate/free pattern. It could be that this is the source of out
of memory problems we are seeing on some Android devices.

Instead of just going straight for said command pool flag and doing
ResetCommandBuffer for the command buffers individually, take one
step further and use per-slot (slot being 0 or 1 if QVK_FRAMES_IN_FLIGHT
is 2) command pools. The current pool is reset in each
beginFrame/beginOffscreenFrame, moving all allocated command buffers
to the initial state (while other command buffers with the other pool
are not affected).

This may be (while impossible to tell from just guessing based on the
spec) our best approach to command buffer allocation since a Vulkan
implementation can likely just use some simple per pool allocator,
knowing that we never want to free or reset individual command buffers,
but we rather only reset the whole pool at once.

The option of importing an existing VkCommandPool when creating the
QRhi instance is now gone, but there was probably no point in offering
that in the first place.

When it comes to VK_COMMAND_POOL_RESET_RELEASE_RESOURCES_BIT it will
not be set unless releaseCachedResources() (in Qt Quick this is hooked
into QQuickWindow::releaseResources()) was called. What this does in
practice is unknown, but have an option to set it now and then if the
application really wants.

While we are at it, rename secondaryCbs to activeSecondaryCbStack to
indicate what it really is. (it's a stack as each call to
beginExternal() pushes a new one, while each endExternal() pops)

Change-Id: I2e5c1fad26d794e1f56c778e38f750998d706d84
Reviewed-by: Andy Nichols <andy.nichols@qt.io>
2020-10-02 13:14:31 +02:00
Laszlo Agocs
d92b0e18c1 rhi: Make per-frame flags per-pass where appropriate
ExternalContentsInPass becomes a per-pass flag now. Why is this
beneficial? Because while Qt Quick has no choice for its render
pass, not being able to guess if the application wants to do some
native rendering in there, Quick 3D's render passes, all the ones
that are under Quick3D's control, do not have native rendering
from the application in them, and so using secondary command
buffers with Vulkan is not necessary.

Introduce something similar for compute and OpenGL. By knowing that
none of the resources used in a pass are used with a compute pass
(e.g. because we know that there are no compute passes at all) a small
amount of time can be saved by skipping tracking buffers and textures
because the only purpose of said tracking is to generate barriers that
are relevant only to compute.

Change-Id: I0eceb4774d87803c73a39db527f5707a9f4d75c1
Reviewed-by: Andy Nichols <andy.nichols@qt.io>
2020-10-02 13:14:08 +02:00
Edward Welbourne
a1dbdc666f Give some QTime test-cases more informative names
Also drop superfluous trailing 0s from QTime's constructor and add
space after commas.

Change-Id: Ie3ae87fd497456d6447c55e5d2c808ef59c9768d
Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
Reviewed-by: Andreas Buhr <andreas.buhr@qt.io>
2020-10-01 23:14:06 +02:00
Alexandru Croitor
081ec14b25 CMake: Clean up the public API a bit
Add some missing versionless functions.
Rename some functions that are not meant to be public API, and their
usages.

Task-number: QTBUG-86827
Change-Id: Ifb66c04cd7598d83fe80c01a92ab2d269ebaf396
Reviewed-by: Joerg Bornemann <joerg.bornemann@qt.io>
2020-10-01 14:57:12 +02:00
Allan Sandfeld Jensen
fe36d47b37 Fix race condition in QThreadPool::clear
Since we drop the lock while deleting threads, we need to handle
the queue possibly being accessed and changed by the pool threads
while clear() is running.

Pick-to: 5.15
Fixes: QTBUG-87092
Change-Id: I7611edab90520454278502a58621e299f9cd1f6e
Reviewed-by: Sona Kurazyan <sona.kurazyan@qt.io>
2020-10-01 12:15:22 +02:00
Volker Hilsheimer
3fb8f9e44e Properly deprecate QProcess::pid
Address an old ### Qt 5 comment. The method has been documented as deprecated
and replaced by QProcess::processId since at least Qt 5.9, so we can first
properly flag it as such for 5.15.2, and remove it from Qt 6 in a follow-up
commit.

Change-Id: Ic4e3351740617083b16723db8eef7a341bccfbf6
Pick-to: 5.15
Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
2020-10-01 04:55:47 +02:00
Shawn Rutledge
8f74f7d25b tst_qwindow: verify isBeginEvent(), isUpdateEvent() and isEndEvent()
It also demonstrated that the tests were out of sync with reality:
since a97759a336c597327cb82eebc9f45c793aec32c9 QMouseEvent::button()
and QWindowSystemInterfacePrivate::MouseEvent::button should be the
button that changes state of course; but when a button is pressed,
we are reacting to it after the fact, so QMouseEvent::buttons() and
QWindowSystemInterfacePrivate::MouseEvent::buttons should include the
new button that was just pressed.  Likewise when a button was released,
we send the event with buttons _omitting_ the button that was just
released.

Amends 147a8bc4c8 and
6d6ed64d6c

Change-Id: I670289019fcfa7de685ca38799804772dc0f1c8f
Reviewed-by: Volker Hilsheimer <volker.hilsheimer@qt.io>
2020-09-30 23:17:57 +02:00
Giuseppe D'Angelo
7ee682a1dd QREMatchIterator: add support for range-based for
Add begin()/end() on QRegularExpressionMatchIterator, making
iterators over an iterator (like directory_iterator).

[ChangeLog][QtCore][QRegularExpression] The iterator object
(QRegularExpressionMatchIterator) returned by a global match
is now usable in a range-based for loop.

Change-Id: If3d31bd2e84e7d1fb626a0b3d2745914dff03e39
Reviewed-by: Andrei Golubev <andrei.golubev@qt.io>
Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
2020-09-30 21:39:36 +02:00
Laszlo Agocs
a0195a5bea Fix rhi manual test build
Change-Id: Ib121a3a9871c29c10c1f3ae720c093444e076e8c
Reviewed-by: Andy Nichols <andy.nichols@qt.io>
2020-09-30 17:08:01 +02:00
Edward Welbourne
61bd6afe39 Re-enable a QDateTimeEdit right-to-left test of its sectionText()
Use a QScopeGuard to fix its restoration of left-to-right mode after completion.

Change-Id: I5ac1e44629e72d993f2d5ba6586b86508d57cdaf
Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
Reviewed-by: Andreas Buhr <andreas.buhr@qt.io>
Reviewed-by: Andrei Golubev <andrei.golubev@qt.io>
2020-09-30 16:40:43 +02:00
Edward Welbourne
1c591fd924 Deal with {und,ov}erflow issues in QLine's length handling
Use std::hypot() instead of sqrt() of a sum of squares.
This ensures length() can't be zero when isNull() is false.
Use length() in QLine::setLength() rather than duplicating that.

Clarify and expand some documentation; isNull() never said what
constituted validity, nor did unitVector() mention that is should not
be used on a line for which isNull() is true. Make clear that lines of
denormal length cannot be rescaled accurately.

Given that we use fuzzy comparison to determine equality of
end-points, isNull() can be false for a line with displacements less
than sqrt(numeric_limits<qreal>::denorm_min()) between the coordinates
of its end-points (as long as these are not much bigger); squaring
these would give zero, hence a zero length, where using hypot() avoids
the underflow and gives a non-zero length. Having a zero length for a
line with isNull() false would lead to problems in setLength(), which
uses an isNull() pre-test, protecting a call to unitVector().

(It was already possible for a null line to have non-zero length; this
now arises in more cases.)

Restored QLine::setLength() to the form it had before a recent change
to avoid division by zero (which resulted from underflow in computing
the length of a non-null line) but allow for the possibility that the
unit vector it computes as transient may not have length exactly one.

Add tests against {ov,und}erflow problems in QLine. Reworked the test
added during the divide-by-zero fix to make it part of the existing
test.

Pick-to: 5.15 5.12
Change-Id: I7b71d66b872ccc08a64e941acd36b45b0ea15fab
Reviewed-by: Sze Howe Koh <szehowe.koh@gmail.com>
2020-09-30 16:26:49 +02:00
Ulf Hermann
c25687fa0b QTestResult: Don't pass a nullptr file to addFailure()
addBFail() asserts on the file being non-null. The convention seems to
be "Unknown File" for cases where we cannot determine the file.

Change-Id: I3a4d0130352d77d75f264fad6f3bd47c6700ef4c
Reviewed-by: Fabian Kosmale <fabian.kosmale@qt.io>
2020-09-30 16:20:29 +02:00
Sona Kurazyan
2e27b98cff Use universal references in QtConcurrent
Changed QtConcurrent algorithms to take the passed sequences as
universal references, where it makes sense. In addition to avoiding
to create extra copies when passing rvalues, this change allows
passing temporary container adaptors to QtConcurrent::map (e.g. see
the example in the ticket and the new test-cases).

Task-number: QTBUG-83170
Change-Id: Ia7c0833f4ec1d860294fa5214cd53934b65ff084
Reviewed-by: Andrei Golubev <andrei.golubev@qt.io>
Reviewed-by: Jarek Kobus <jaroslaw.kobus@qt.io>
Reviewed-by: Mårten Nordheim <marten.nordheim@qt.io>
2020-09-30 15:28:01 +02:00
Andreas Buhr
5add30c8ca QPrinter: unit tests fail when default printer supports duplex
When the default printer supports a duplex mode other than DuplexAuto,
the unit tests change to QPrinter::PdfFormat and expect that
the pdf printer is in duplex mode then. However, the pdf printer
does not support duplex mode.
This patch removes this check.

Change-Id: If394f9f23fd244713bbb1ecce9d3802cbd281d90
Reviewed-by: Andy Shaw <andy.shaw@qt.io>
2020-09-30 11:02:36 +02:00
Mårten Nordheim
7bb17d185d QList: don't detach on squeeze when holding raw data
To match QString and QByteArray behavior

Change-Id: Ifce4a5dee6fc9077e855a24499f11f911e359cf5
Reviewed-by: Andrei Golubev <andrei.golubev@qt.io>
Reviewed-by: Oswald Buddenhagen <oswald.buddenhagen@gmx.de>
Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
2020-09-30 10:11:00 +02:00
Fabian Kosmale
8572f84467 Fix ChangeHandler notification for eager properties
ChangeHandler's evaluated the binding to detect if the value actually
changed. This is a valid strategy for lazy bindings, but eager bindings
were already evaluated at that point, and thus the change would not be
detected.
Change the binding loop test, so that there isn't a fixpoint in the
binding loop, and we can still detect it. Changing the binding loop
detection code to deal with this case is left as an exercise for the
future.

Change-Id: Ia5d9ce2cd98a5780e69c993b5824024eb186c154
Reviewed-by: Ulf Hermann <ulf.hermann@qt.io>
2020-09-30 09:27:50 +02:00
Allan Sandfeld Jensen
426308a93b Add logging categories to image handlers
Change-Id: Ia0c47826d08b3f641c17d8a585f62d008a8b095b
Reviewed-by: Eirik Aavitsland <eirik.aavitsland@qt.io>
2020-09-30 08:39:45 +02:00
Fabian Kosmale
6892300127 QVariant: Change metatype in convert() even on failure
The documentation of convert promised that “If the cast cannot be
done, the variant is still changed to the requested type”. This was not
the case so far, because we returned too early if canConvert returned
false.
This commit changes the behavior of the method to reflect its
documentation. The documented behavior seems more useful than the
alternative of not changing the metaType, at least for common use cases
inside qtdeclarative.

Change-Id: I09b5a5efb7344e76e93de278e35c7fb2b2f87dcd
Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
2020-09-30 06:31:36 +00:00
Liang Qi
be7d46f5e2 Revert "Blacklist tst_QWindow::exposeEventOnShrink_QTBUG54040"
This reverts commit b1ef104866.

This test is BPASS on openSUSE_42_3 for 5.12 and PASS on openSUSE_15_1
for 5.15.

Pick-to: 5.15
Pick-to: 5.12
Change-Id: Ia1d81ed38491c27c01f270623c5082663f4da699
Reviewed-by: Tony Sarajärvi <tony.sarajarvi@qt.io>
2020-09-30 06:18:49 +02:00
Thiago Macieira
f00d322f67 QJsonObject: fix sorting after parsing from JSON text
The logic was complex and missed the UTF-8 UTF-8 case. It ended up
calling the UTF-8 to Latin1, resulting in an improperly-sorted
container, which in turn meant keys were not found when searched.

Fixes: QTBUG-86873
Pick-to: 5.15
Change-Id: I0d3ff441bec041728945fffd16379dec418637ca
Reviewed-by: Ulf Hermann <ulf.hermann@qt.io>
2020-09-29 16:14:37 -07:00
Thiago Macieira
e4fece60aa Add {add,sub,mul}_overflow detection when one operand is a constant
We were missing 64-bit signed mul_overflow on 32-bit platforms and in
those where we did have it, the detection was awful (both for signed and
for unsigned). So if one of the parameters is a constant, we can
simplify the code generated.

Change-Id: Ia99afccf0c474e20b3ddfffd162a60d269eb1892
Reviewed-by: Andrei Golubev <andrei.golubev@qt.io>
Reviewed-by: Edward Welbourne <edward.welbourne@qt.io>
2020-09-29 14:55:48 -07:00
Tony Sarajärvi
8c5eb647cf Further blacklist network tests on Windows MinGW
Task-number: QTBUG-87009
Change-Id: Ic855ae87b69c02f76519a2957de05f4af7bf9a6d
Reviewed-by: Timur Pocheptsov <timur.pocheptsov@qt.io>
2020-09-29 19:56:45 +00:00
Laszlo Agocs
848ed9644c rhi: Drop QBitArray usage
Change-Id: I4ae92e6c8c91111a4593c51ee05443b3bc806c35
Reviewed-by: Andy Nichols <andy.nichols@qt.io>
2020-09-29 21:24:38 +02:00
Lars Knoll
04641454be Disable moving of QProperty
The semantics are not very intuitive, and it opens a can of worms
with regards to what should happen with observers that observe
that property.

Change-Id: I6fb00b7693904b968224cc87d098bbd0ea776ba3
Reviewed-by: Ulf Hermann <ulf.hermann@qt.io>
2020-09-29 20:32:42 +02:00
Fabian Kosmale
6b4e0c5803 QProperty: fix QBindingStoragePrivate::reallocate related code
In the internal hash map implementation, we have to ensure that the
index is in the interval [0, size - 1].
Moreover, in setBinding we have to refetch the binding storage in case a
reallocation happened.

Change-Id: I11c6264f16537699c8908b647e2355a39ce87648
Reviewed-by: Lars Knoll <lars.knoll@qt.io>
2020-09-29 20:32:32 +02:00
Andreas Buhr
f8474306e5 QPrinter: fix unit tests for special case when no printer is default
The unit tests of QPrinter assume that a printer which is default-
initialized is the same printer as the default printer. However, when
no printer is set to default, this is not the case. When no printer
is the default printer, a default-initialized QPrinter will be the
first printer found.
This patch adapts the unit tests to work also when no printer is the
default printer, even though printers are available.

Change-Id: I4967e5b1c4fb8a7c33c911184289ec5cd283fc58
Reviewed-by: Volker Hilsheimer <volker.hilsheimer@qt.io>
2020-09-29 09:59:02 +02:00
Liang Qi
b05e444a92 tests/xcb: fix tst_QWidget::updateWhileMinimized() - again
This amends 4403ec3bc1.

CentOS 8.1 uses GNOME in XDG_CURRENT_DESKTOP.

Pick-to: 5.15
Task-number: QTBUG-68862
Change-Id: Ia9a6f7f4c47853fc53d9860dad070109271a438e
Reviewed-by: Tony Sarajärvi <tony.sarajarvi@qt.io>
2020-09-29 07:28:58 +00:00
Tony Sarajärvi
036eb54e60 Blacklist QTcpSocket::connectToHostErrors in Windows 10 builds
Task-number: QTBUG-87009
Change-Id: I63c1bcb77a359cea82f2831b02f1e29b46060a66
Reviewed-by: Timur Pocheptsov <timur.pocheptsov@qt.io>
2020-09-29 07:13:46 +00:00
Allan Sandfeld Jensen
adc7e1af2a Add checks for new QBitArray version
Add a few checks for the new longer length.

Change-Id: I642a64b91361d236457e7a89a02feb812b4e1cf8
Reviewed-by: Lars Knoll <lars.knoll@qt.io>
2020-09-29 08:53:04 +02:00
Allan Sandfeld Jensen
a45920c86c Switch QBitArray to qsizetype
To make it consistent with other containers in Qt6.

Change-Id: I5578845390248baf80daa282237b706857e57661
Reviewed-by: Lars Knoll <lars.knoll@qt.io>
2020-09-29 08:53:00 +02:00
Heikki Halmet
cf0f1e0860 Blacklist tst_QUdpSocket::writeDatagramToNonExistingPeer
tst_QUdpSocket::writeDatagramToNonExistingPeer is also failing with
MinGW

Task-number: QTBUG-74542
Task-number: QTBUG-80328
Change-Id: I44b886a1fc1eac34deefc34690c6701063a49d8f
Reviewed-by: Friedemann Kleint <Friedemann.Kleint@qt.io>
Reviewed-by: Mårten Nordheim <marten.nordheim@qt.io>
2020-09-29 09:41:23 +03:00
Lars Knoll
0902508411 Fix compiler warnings from QKeyCombination
Change lots of code to avoid the deprecated operator+() or implicit
casts to int.

Change-Id: I0c343cd5b28603afdf1214eefb85e928313345e2
Reviewed-by: Volker Hilsheimer <volker.hilsheimer@qt.io>
2020-09-28 17:23:20 +02:00
Sona Kurazyan
a6e1f67937 Fix QtConcurrent algorithms to work with temporary sequences
QtConcurrent algorithms are making an internal copy of the passed
sequence, to make sure it won't be destroyed before the execution
is finished. However, they were using iterators of the originally
passed sequence. So, if the original sequence is deleted, QtConcurrent
algorithms would use invalid iterators to a deleted sequence. This
might work with Qt containers thanks to implicit-sharing, but with
other containers will lead to unexpected results. Fixed them to work
on the internal copy of the original sequence.

Change-Id: I1d68692ed9746223c85f51bb05977bc1443b681d
Reviewed-by: Andreas Buhr <andreas.buhr@qt.io>
Reviewed-by: Mårten Nordheim <marten.nordheim@qt.io>
Reviewed-by: Karsten Heimrich <karsten.heimrich@qt.io>
2020-09-28 15:48:17 +02:00
Fabian Kosmale
1e883cf9b5 Prevent endless markDirtyAndNotifyObservers <-> notify loop
Before we had the option of eager evaluation, we were able to use the
dirty flag to detect whether we are recursing. However, eager properties
will lead to a evaluateIfDirtyAndReturnTrueIfValueChanged call, and that
in turn will clear the dirty flag.
Introduce a new member to detect that situation, and set the bindings
error state to BindingLoop if we detect that kind of loop.

Change-Id: If40b93221848bd9e9422502318d992fad95b0b74
Reviewed-by: Lars Knoll <lars.knoll@qt.io>
2020-09-28 09:11:16 +02:00
Friedemann Kleint
38a5b6212d qtabletevent/regular_widget manual test: Add a toggle for WinTab
Task-number: QTBUG-83218
Change-Id: I179f53c051c92dbb86fbac710d4a514c4e5d3c49
Reviewed-by: Shawn Rutledge <shawn.rutledge@qt.io>
2020-09-27 12:25:54 +02:00
Friedemann Kleint
18bd226564 Fix compilation of some manual tests
- qtabletevent/device_information
- dialogs
- windowflags

Change-Id: Id3e4b2aec2a873b00dcda39fb1227b24832181ca
Reviewed-by: Shawn Rutledge <shawn.rutledge@qt.io>
2020-09-26 19:53:54 +02:00
Allan Sandfeld Jensen
b0b4fcd05c Preserve formats in QImage::scaled()
Do not always use the smoothScaled routine, the normal routines are
also optimized, and do not convert to alpha formats when not necessary.

Task-number: QTBUG-49719
Change-Id: I6ee9b620cc259472c419e7363357f41ce29b594a
Reviewed-by: Eirik Aavitsland <eirik.aavitsland@qt.io>
2020-09-26 18:49:10 +02:00
Volker Hilsheimer
d26fe3c5d6 Don't error out when configuring Qt on a headless system
Configuring and building Qt should not require a running dbus session bus.
However, when building the html_docs target on a headless system, qmake bails
out with error if dbus is linked in, while only showing a warning if it's not.

This is unnecessary. We can warn in both cases, build the tests with dbus
linked in. Running the tests will fail if there is no session bus, ie.
tst_QDBusConnection_Delayed::delayedMessages fails with

QVERIFY(session.isConnected);

Pick-to: 5.15
Change-Id: Ia6b6e226398e87880449b003d28dfd76553bee2c
Reviewed-by: Paul Wicking <paul.wicking@qt.io>
Reviewed-by: Topi Reiniö <topi.reinio@qt.io>
2020-09-26 14:36:13 +02:00
Laszlo Agocs
60871b4fdf rhi: vulkan: Fix mipmap generation for cubemaps
Change-Id: Ia1aab06214be802aaabc97ffefa28947e11148e3
Reviewed-by: Andy Nichols <andy.nichols@qt.io>
2020-09-25 09:24:25 +02:00
Ulf Hermann
6b8ee60d8a tst_qmetacontainer: Remove non-existing typeflags.bin from build system
Change-Id: Icb1668493447e478f539016f330fe58c79dde454
Reviewed-by: Fabian Kosmale <fabian.kosmale@qt.io>
Reviewed-by: Assam Boudjelthia <assam.boudjelthia@qt.io>
2020-09-25 08:50:11 +02:00
Allan Sandfeld Jensen
c2be9180b7 Replace Q_REQUIRED_RESULT with [[nodiscard]]
It was already used many places directly making the code inconsistent.

Change-Id: I3b14bc6c333640fb3ba33c71eba97e78c973e44b
Reviewed-by: Lars Knoll <lars.knoll@qt.io>
2020-09-25 07:10:45 +02:00
Wang ChunLin
789d487cb0 fix QComboBox currentText return placeholderText
If it does not add item,the currentText should return empty string

Fixes: QTBUG-86580
Pick-to: 5.15
Change-Id: I54c3a8b7ececfb1e62bcd7ac592feccaff3f8b48
Reviewed-by: Richard Moe Gustavsen <richard.gustavsen@qt.io>
2020-09-25 10:52:27 +08:00