Commit Graph

58582 Commits

Author SHA1 Message Date
Tor Arne Vestbø
dd40306968 Make qt_mac_ensureResponsible QT_BUILD_INTERNAL and Q_AUTOTEST_EXPORT
Its primary purpose was to be used by permission auto tests, so to
avoid App Store compatibility issues we disable it in non-dev builds.

Task-number: QTBUG-107167
Change-Id: Iaacec807808cfe52df0cf850b287e50da1bd59e5
Reviewed-by: Doris Verria <doris.verria@qt.io>
Reviewed-by: Alexandru Croitor <alexandru.croitor@qt.io>
2022-10-19 15:56:42 +03:00
Fabian Kosmale
7502e57ca8 Apply Q_FLAG to flag type instead of enum type
Change-Id: I05cebef521a532654ae8fa306eed9c8db5a0db69
Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
2022-10-19 13:54:07 +02:00
Tor Arne Vestbø
87f8159c6a QCoreTextFontEngine: Mark CGAffineTransformConcat as unused
We don't know at this point why the result isn't assigned back to
cgMatrix, but for now mark it as unused to fix warnings-are-errors
builds.

Pick-to: 6.2 6.4 5.15
Change-Id: I6b32bbc42b2147b5304e1c72026e39d3e1eb8a4d
Reviewed-by: Timur Pocheptsov <timur.pocheptsov@qt.io>
2022-10-19 13:44:47 +02:00
Maximilian Blochberger
bbad6440ae Ensure proper format of Info.plist
The Information Property List (Info.plist) is a property list that
contains information about macOS and iOS application and framework
bundles. There are multiple supported formats, those property lists can
be stored in, most notably XML and binary.

Problem
If the Info.plist file is edited with an external editor, such as Xcode,
it is possible that it is stored in binary format. A Makefile generated
by the qmake tool contains a call to sed, which works on text but not
binary files. Consequently, this call would fail.

Solution
Since Mac OS X 10.2, the plutil tool is available. It can be used to
convert the property lists into a specific format. The plutil tool is
now used to convert the plist to XML, so that the sed invocation
succeeds.

[ChangeLog][qmake] Fixed handling binary Info.plist files in generated
Makefiles by always converting them to XML before substituting
placeholders.

Fixes: QTBUG-45357
Change-Id: I066039301c391a5034710458500a096f09e5ca24
Pick-to: 6.2 6.4
Reviewed-by: Jörg Bornemann <joerg.bornemann@qt.io>
Reviewed-by: Tor Arne Vestbø <tor.arne.vestbo@qt.io>
2022-10-19 12:06:09 +02:00
Topi Reinio
665d727a28 Add license text file for Creative Commons Zero (CC0) 1.0
Since I38b281c97e039a8158e143ffa16ba1966713d030, qtattributionsscanner
fails the documentation build on missing license file(s).

Pick-to: 6.4
Task-number: QTBUG-104126
Change-Id: Ia0efcfa44fc26ebcd86d98263bc33336d486d064
Reviewed-by: Kai Koehne <kai.koehne@qt.io>
2022-10-19 12:06:09 +02:00
Eirik Aavitsland
7988cf25a5 Avoid warning from QPrinter::setFromTo() in the documented 0,0 case
The doc says the setFromTo(0, 0) will print the whole document,
i.e. clear the page ranges. Although this works, it creates a runtime
warning.

Fixes: QTBUG-105292
Pick-to: 6.4
Change-Id: Ic5de5be71ffc91762c8a4a44875ba133831d981f
Reviewed-by: Eskil Abrahamsen Blomfeldt <eskil.abrahamsen-blomfeldt@qt.io>
2022-10-19 11:27:35 +02:00
Doris Verria
0709af1c02 QMacStyle: Set NSControlStateValueOn for selected tabs
We draw tab buttons as NSButtons of type PushOnPushOff. To draw a
selected tab, we used state ON (NSControlStateValueOn), which gives it
the accent color, and state OFF for non-selected tabs. To draw a
selected and pressed tab, we use state OFF and set highlight:
depending on isPressed.
This worked fine up until macOS 11 because when setting highlight to
true the push button would draw the accent color no matter the state.

In macOS 12, things are different. A highlighted NSButton doesn't draw
the accent color anymore, but rather a gray background.
So when we draw a selected tab using NSControlStateValueOn (blue/accent
color) and then press it (state changes to NSControlStateValueOff), the
tab will change color from accent/blue to gray. The text remains white,
so it's not clearly visible.

To fix, set the NSControlStateValueOn for selected, pressed tabs on
macOS 12, so the background color doesn't change when pressing on a
selected tab.

Fixes: QTBUG-101000
Pick-to: 6.2 6.4
Change-Id: Iaf48a7e2ae536c7c591578bb3c1065bd0e29b2e1
Reviewed-by: Tor Arne Vestbø <tor.arne.vestbo@qt.io>
2022-10-19 06:07:15 +02:00
Lorn Potter
9a5a31268e wasm: fix crash when network reply is closed
We do not need to call QNetworkReply::close as that closes the
QIODevice that we do not use (or have)

Pick-to: 6.4
Fixes: QTBUG-77210
Change-Id: I812bc324f49ae28b8c622cfa89f9690e012bf216
Reviewed-by: Morten Johan Sørvig <morten.sorvig@qt.io>
2022-10-19 12:14:43 +10:00
Thiago Macieira
823b7c7bce QLibrary: fix load() after a failed load()
Regression introduced by commit 8d4eb292b2
in 6.0, when QTaggedPointer was introduced. We set the tag even when the
loading failed and failed to reset it because d = {} retains the tag.

Pick-to: 6.2 6.4
Fixes: QTBUG-103387
Change-Id: Ie4bb662dcb274440ab8bfffd170a07aa9c9ecfca
Reviewed-by: Marc Mutz <marc.mutz@qt.io>
2022-10-18 17:10:42 -07:00
Thiago Macieira
636dbe6045 tst_QLibrary: add a cleanup() method to unload left-overs
QLibrary intentionally does not unload on destruction, so failing tests
may leave libraries already loaded and cause further tests to fail
because of that. So add a cleanup() method to unload everything we may
have loaded.

Note that QLibrary::unload() sets its state to NotLoaded after one
successful call, so we must recreate the object in case it had been
load()ed multiple times.

Pick-to: 6.2 6.4
Change-Id: I12a088d1ae424825abd3fffd171d133c678f910a
Reviewed-by: Marc Mutz <marc.mutz@qt.io>
2022-10-19 00:10:42 +00:00
Mikolaj Boc
9c6b8ea290 Add the toDOMRect/fromDOMRect functions to QRectF
These are very helpful when converting to and from DOMRect.

Change-Id: I4a7fc6318f45bed8e2b82fd5d6ec174dc1762326
Fixes: QTBUG-107740
Reviewed-by: Paul Wicking <paul.wicking@qt.io>
2022-10-19 00:19:11 +02:00
Ben Fletcher
fda5061abd RHI: Align setViewport behavior on Metal/Vulkan with OpenGL/D3D
Fixes to prevent crash on Metal/Vulkan when setViewport is called with no current graphics pipeline is set. This normalizes behavior across Metal/Vulkan/OpenGL/D3D.

Change-Id: I8057e01005cfe89ea02a8415f06eaee0f27865fc
Reviewed-by: Laszlo Agocs <laszlo.agocs@qt.io>
2022-10-18 22:17:15 +00:00
Timur Pocheptsov
f50f6a456a QIOSMessageDialog::exec - work around 'windowsless' exec
While the need for such scenario is arguable, we can imagine that some app
first shows some message box (by calling QDialog::exec()), and then creates and shows
the main UI/window/widget. Without such a widget, app's keyWindow is nil,
its rootViewController is also nil and no alert is presented at all.
To save the situation, we try hard and check the primary screen's uiWindow
(using QIOSScreen::uiWindow) searching for any window and using its root
view controller.

Pick-to: 6.4 6.2 5.15
Fixes: QTBUG-79977
Change-Id: I9bf38bdf540f1f1dbe42b86df94d6a1b4694e9f2
Reviewed-by: Tor Arne Vestbø <tor.arne.vestbo@qt.io>
2022-10-19 00:10:09 +02:00
Shawn Rutledge
bb1f616ff1 Add flicking behavior hints to platform integration and theme
These will be used in QtQuick Flickable.

Flickable.flickDeceleration is a sort of friction, the rate at which a
flick will decelerate when the user is flicking on a touchscreen or
rolling a clicky mouse wheel, and then flicking stops. So far, the
default has always been 1500 (defined in qtdeclarative), which (everyone
seems to agree) prevents Flickable from slowing down reasonably fast
when scrolling stops. So let's try 5000 logical pixels / sec² as a
default, and each platform will be able to customize it. The docs
already say "The default value is platform dependent"; now it can come
from StyleHint::FlickDeceleration.

FlickMaximumVelocity: the units are in logical pixels / sec. The default
has always been 2500 in qtdeclarative, but there were some early
complaints that Flickable was too slow on Android, for example (which
were somewhat mitigated by DPI conversions). So now that also becomes
adjustable on each platform (although really, it should be mainly the
DPI that matters, because the user's perception is in actual distance
moved per second).

FlickStartDistance is how many logical pixels the Flickable must be
dragged by a finger before it begins the animation to keep moving when
the finger is lifted. (Analogous to StartDragDistance for mouse-drags)

[ChangeLog][QPA] Added platform FlickStartDistance, FlickMaximumVelocity
and FlickDeceleration hints for the benefit of QtQuick Flickable

Task-number: QTBUG-35608
Task-number: QTBUG-35609
Task-number: QTBUG-52643
Task-number: QTBUG-97055
Change-Id: If50c1de895c127f4b0ab0634c865f469a38e08ba
Reviewed-by: Richard Moe Gustavsen <richard.gustavsen@qt.io>
2022-10-18 20:22:32 +02:00
Timur Pocheptsov
942abaae59 QMacStyle: restore control size after re-initialization
We had to re-initialize NSSlider, due to some hidden problem with
stale geometry, when just setting properties of a cached control
(the remains of another previous QSlider render, using the same NSSlider).
But -initWithFrame: also resets the control size we set earlier,
thus 'small'/'mini' becoming 'normal'.

Fixes: QTBUG-107450
Pick-to: 6.4 6.2
Change-Id: Ice42c787ec65d89c1c15f9c89462b7804aafe51c
Reviewed-by: Tor Arne Vestbø <tor.arne.vestbo@qt.io>
2022-10-18 18:55:32 +02:00
Thibaut Cuvelier
e8d6accb93 Fix a typo in a comment
Change-Id: I3ff1bd0d00fd56fa980bc86f71c557f8f833cb45
Reviewed-by: Luca Di Sera <luca.disera@qt.io>
Reviewed-by: Paul Wicking <paul.wicking@qt.io>
2022-10-18 18:09:55 +02:00
Ievgenii Meshcheriakov
dd0eb89d2e QNetworkReply: Fix typos in the documentation
Fixes: QTBUG-107719
Pick-to: 5.15 6.2 6.4
Change-Id: Ic5bbc59aebeb44595cfde000bfd1cfb28991d311
Reviewed-by: Mårten Nordheim <marten.nordheim@qt.io>
2022-10-18 18:09:55 +02:00
Timur Pocheptsov
9e5e330a09 QIosScreen: retain the right window
When initializing m_uiWindow (instead of trying to retain this window
itself, which is harmless, since it's nil, but useless, since it's
not the right window).

Pick-to: 6.4 6.2 5.15
Change-Id: I7855fd7c24ebfc28fbb912966f8010caba914fe7
Reviewed-by: Tor Arne Vestbø <tor.arne.vestbo@qt.io>
2022-10-18 16:15:51 +02:00
Thiago Macieira
d9280bb63b tst_QSet: fix flakiness after we removed the fixed, non-zero seed
The "qhash" test relied on the fact that those four elements would
produce a different order with a zero and a non-zero seed. But since
commit b057e32dc4 removed the setting of a
deterministic non-zero seed, this test had a 1 in 4! chance of failing.
Since 4! = 24, 128 retries should be more than enough to ensure we do
find at least hash seed that provokes a different order.

Fixes: QTBUG-107725
Change-Id: I3c79b7e08fa346988dfefffd171ee61b79ca5489
Reviewed-by: Marc Mutz <marc.mutz@qt.io>
Reviewed-by: Ivan Solovev <ivan.solovev@qt.io>
2022-10-18 14:15:51 +00:00
Eskil Abrahamsen Blomfeldt
6ba003f732 Freetype: Fix transforming bitmap fonts
Freetype itself does not support transforming bitmap fonts, so
FT_Set_Transform() is just ignored in this case. This causes
problems in particular for fonts rotated at 90 degree multiples
when used as tab labels. So we need to rotate the actual glyph
images after they have been rasterized instead.

Since we do have most of the mechanisms in place for this when
using the regular glyph cache, we set cacheEnabled to false
for all non-scalable fonts to ensure we take the correct code
path.

In addition, we need to transform the alpha maps before
returning them.

Note: This changes the glyph format to alpha8 for the glyphs
when they are transformed. This is a simplification because
the mono code path requires that glyph widths are aligned
to 8, so there would be more adaptation needed if we wanted
to use this code path. This will only affect non-antialiased
fonts that are drawn with a transform.

[ChangeLog][QtGui][Text] Fixed an issue with the Freetype
backend where rotations would not be applied correctly to
bitmap fonts.

Fixes: QTBUG-81540
Change-Id: Ia68815b425ca1776a5ff81d26d227569467095cf
Reviewed-by: Lars Knoll <lars@knoll.priv.no>
2022-10-18 16:15:51 +02:00
Mårten Nordheim
30077d462d tst_QSql*/sqlite: Don't use random output in the datatags
It makes it impossible to rerun it, bad for both CI and local test runs.

As a drive-by name the database file sqlite.db instead of foo.db

Pick-to: 6.2 6.4
Fixes: QTBUG-100245
Change-Id: I2e4ee01189ccbad2a6add5db7771d35fd7248da8
Reviewed-by: Dimitrios Apostolou <jimis@qt.io>
Reviewed-by: Qt CI Bot <qt_ci_bot@qt-project.org>
Reviewed-by: Andy Shaw <andy.shaw@qt.io>
2022-10-18 16:15:50 +02:00
Edward Welbourne
1bf3faa54b Correct handling of month-lengths in QDateTimeParser
Use calendar's month length upper bound instead of hard-coding 31.
When year isn't specified, QCalendar can still tell us a month's
"usual" number of days, so use that rather than giving up on getting
the day of month within that bound. Still don't try to fix the day of
the week when we don't know the year.

Change-Id: I90fbe02b180fc4c88b809d2ca71c075ff4dfd473
Reviewed-by: Mårten Nordheim <marten.nordheim@qt.io>
2022-10-18 14:13:28 +02:00
Edward Welbourne
743035b76a QDateTimeEdit: check setDigit()'s return value
This way we only apply a spring-forward fix when it's relevant.

Change-Id: I5fbbb68b6e474566e0497c6ae89d74097570dccc
Reviewed-by: Mårten Nordheim <marten.nordheim@qt.io>
Reviewed-by: Mate Barany <mate.barany@qt.io>
2022-10-18 14:13:28 +02:00
Edward Welbourne
01b1155ac6 Anticipate various warnings in tst_QVariant
Various places were knowingly provoking warnings without telling QTest
to check for and suppress those warnings. Some others did check for
this warning, so let's consistently suppress the noise.

Change-Id: I71b9829680c7a513f4d8fbb3c57442875a6c2dc4
Reviewed-by: Fabian Kosmale <fabian.kosmale@qt.io>
2022-10-18 14:13:28 +02:00
Edward Welbourne
b9b516f42e Ignore the warning for all types in tst_QCborValue's mapFromArray*()
For some reason the QTest::ignoreMessage() was conditioned on the type
being tested being Array; however, the warning is in fact produced for
all types. So anticipate it for all and make the test log less noisy.

Change-Id: I78681624252ff8a71f080204f8b031609ddac468
Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
2022-10-18 14:13:28 +02:00
Edward Welbourne
d39f1da6e3 Simplify a list-removal operation in QTestLog's handleIgnoredMessage()
When list->next is nullptr, setting ignoreResultList to list->next is
the same as setting it to nullptr.

Change-Id: If328ce31db4344cf0136b7a827be871eb89e35b5
Reviewed-by: Friedemann Kleint <Friedemann.Kleint@qt.io>
2022-10-18 14:13:28 +02:00
Edward Welbourne
d1bf556e24 tst_QChar::fromUcs4(): deduplicate a test-case
There were two copies of the 0x1D157 row and we can't remember why.
So change one of them to the Chakma digit 3 (a spiral) and annote all
three test-cses with what meaning Unicode assigns to them.

Change-Id: I95837588bd5944f7f2c39c8438d9076e844e4dd0
Reviewed-by: Marc Mutz <marc.mutz@qt.io>
2022-10-18 14:13:28 +02:00
Edward Welbourne
95230ffd81 tst_QLocalSocket::listen(): distinguish two data tags
Two test-cases had the same name; distinguish them by the part of
their data in which they differ - one closes, the other doesn't.

Change-Id: I37051baf194bf8df742688739ad01e3335e64dc7
Reviewed-by: Mårten Nordheim <marten.nordheim@qt.io>
2022-10-18 14:13:28 +02:00
Edward Welbourne
e7913006f1 tst_QDoubleValidator::setRangeOverloads(): rename a data row
Two rows shared the same name. They claimed the value used was out of
range, but actually that was only true for one of them. The other was
in range, but the test reduced the number of digits allowed after the
decimal point, thereby making it invalid, so rename that one to
reflect this.

Change-Id: I0936ea25ec799c0069cd148b9f9bae5d35906093
Reviewed-by: Ivan Solovev <ivan.solovev@qt.io>
2022-10-18 14:13:28 +02:00
Edward Welbourne
09e86cfbef tst_QFont::serialize(): distinguish two letterspacing data tags
Include the spacings used, to avoid a naming collision.

Change-Id: Iaf78f7142f6780dcf4c7a0b973db9f625af06767
Reviewed-by: Mitch Curtis <mitch.curtis@qt.io>
2022-10-18 14:13:27 +02:00
Edward Welbourne
b65a7d80be tst_QPainter::blendARGBonRGB(): rename some data rows
Avoid duplication by distinguishing similar test-cases.

Change-Id: I1a100d6c9729f0ea356f177535d15c3d36e2da9e
Reviewed-by: Allan Sandfeld Jensen <allan.jensen@qt.io>
2022-10-18 14:13:27 +02:00
Edward Welbourne
bed8663a0b tst_QPainterPath::testNaNandInfinites(): anticipate the warnings
The test used to trigger a lot of QWARN messages; these are clearly
intended, so tell QTest to expect them, so that we get an error here
if those warnings ever don't show up.

Incidentally tidy up a comment and convert a != verify to a
QCOMPARE_NE(), since it's now available to do that job.

Change-Id: I83e225c37abe8446dac06ebe4e75258cb87b71b0
Reviewed-by: Allan Sandfeld Jensen <allan.jensen@qt.io>
2022-10-18 14:13:27 +02:00
Edward Welbourne
4af55438d0 tst_QPainterPath::testArcMoveTo(): include index in some data tags
In the process, clean up the building of the data tags: use a
range-for loop, albeit we do need an index to show in tags; show it
and the angle in the tags using addRow()'s easier formatting. Change
the low angle tests to show the sign of the angle (which is how they
differ)rather than just labeling them 1 and 2.

Change-Id: Ib5aaa3e22d771c530c9343ba368b0fdfceb264ce
Reviewed-by: Marc Mutz <marc.mutz@qt.io>
Reviewed-by: Jason McDonald <macadder1@gmail.com>
2022-10-18 14:13:27 +02:00
Edward Welbourne
119801f70d tst_QPainterPath::contains_QRectF(): rename some data rows
The last three duplicated earlier ones; and their names didn't take
into account the circle that had been added to the path since those
tests. So revise their names to reflect that.

Change-Id: I32d74f21947b4ba0c04eee53daf8efde6b4a6409
Reviewed-by: Eirik Aavitsland <eirik.aavitsland@qt.io>
Reviewed-by: Giuseppe D'Angelo <giuseppe.dangelo@kdab.com>
2022-10-18 14:13:27 +02:00
Edward Welbourne
d52abad85d tst_QImage::reinterpretAsFormat(): deduplicate a data tag
Two rows shared a data tag. Prefixed one of them with the color of the
half-transparent image it involves (the other's is fully transparent).

Change-Id: I1bd174008ed29bcf2f460e683fdf6d1f12ba19d0
Reviewed-by: Allan Sandfeld Jensen <allan.jensen@qt.io>
2022-10-18 14:13:27 +02:00
Edward Welbourne
e6fb0e0779 tst_QImage::mirrored(): deduplicate some data row names
Change-Id: Ia10c72c450eed12d29c9608c6a6270dd4dc4ef7c
Reviewed-by: Allan Sandfeld Jensen <allan.jensen@qt.io>
2022-10-18 14:13:27 +02:00
Edward Welbourne
c13df5b6ea tst_QImageReader::preserveTexts(): deduplicate data tags
The same data tags were used with two distinct filenames in their
data. Include the basename of each filename in the data tag, to avoid
duplication.

Change-Id: I216fecbd413fab409227ad6f93f8ac3fcc74b059
Reviewed-by: Eirik Aavitsland <eirik.aavitsland@qt.io>
2022-10-18 14:13:27 +02:00
Edward Welbourne
af0c910912 tst_QKeySequence::parseString_data(): drop duplicated rows
The "a" and "A" rows appeared under Valid, then again under Only Keys.
The two copies were identical, in each case, so drop the latter.

Change-Id: Ib3d84710e772171bb4a5e0aefd20022810fb41cd
Reviewed-by: Mitch Curtis <mitch.curtis@qt.io>
2022-10-18 14:13:27 +02:00
Edward Welbourne
ab27c1e2d5 tst_QDBusTypes::isValidFixedType: don't duplicate fixed types
tst_QDBusType::isValidFixedType_data() called addFixedTypes() and then
addBasicTypes(); but the latter calls addFixedTypes(), too; so those
rows got duplicated. Only add the fixed types once.

Change-Id: If0d6f44ec7defb12117dad251878850ca75beb48
Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
2022-10-18 14:13:27 +02:00
Edward Welbourne
c74cf23124 tst_QRect::containsPointF_data(): remove duplicate data row
The row 27 that was positioned before row 01, as if it were meant to
be numbered row 00, was identical to the row 27 that appeared after
row 26. Since row 26 was the other case dealing with the null
QRectF(), I kept the one after it instead of renumbering row 00 and
deleting row 27.

Change-Id: I3585839184233f1f1629280ac9e5b25110c155c0
Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
2022-10-18 14:13:27 +02:00
Edward Welbourne
c10132888e tst_QCryptographicHash: avoid duplicate data tags
Use key(i) rather than valueToKey(value) as the Sha3_* alias Kekkak_*
or RealSha3_*. This way, we still test all members of the enum,
without duplicating row keys (albeit the aliases duplicate values).

Change-Id: I6acba5ffdf5b68294031d609a76b37ca8fad9d94
Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
2022-10-18 14:13:26 +02:00
Edward Welbourne
0448d57c07 tst_QBitArray: remove duplicate data rows
Both countBits() and datastream() had two copies of an all-zeros test
with 35 zeros. Removed the second, in each case.

Change-Id: I5dec4765236ae870c30828dae0f04b8902a100f0
Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
2022-10-18 14:13:26 +02:00
Yuhang Zhao
ade68c9949 MSVC: Disable buggy conformance check
/Zc:lambda seems buggy. Although in my experiments it works well
for 99% Qt repos, it seems some tests will trigger the bug and it
also blocks some new commits. So disable it for now, it's not stable
enough.

Now that this check is disabled, the workaround for tst_qstringapisymmetry
is also not needed anymore, so remove the workaround as well.

Partially reverts commit 8cb832090a

Change-Id: Icf0ecbbaa6262522470e5f5dea05705985ab18f1
Reviewed-by: Jörg Bornemann <joerg.bornemann@qt.io>
2022-10-18 19:31:25 +08:00
Axel Spoerl
b1054d45e9 Fix flakiness in tst_QDoubleSpinBox / editingFinished
setFocus() was called on a double spinbox without calling show()
first. That causes flakiness on XCB when checking focus afterwards.
The test can still fail, when focus is acquired by e.g. a system
popup.

This patch adds a show() call before setFocus() to stabilize normal
behavior. In case the double spin box is shown, but cannot acquire
focus, the test is skipped.

Fixes: QTBUG-70088
Change-Id: If02e88800a31b09a1da63dcc074eb8bb1b0df391
Reviewed-by: Paul Wicking <paul.wicking@qt.io>
2022-10-18 11:31:25 +00:00
Samuel Mira
2937cf91c7 Android: Stop using getPrimaryClipDescription
The function getPrimaryClipDescription was used to establish if the
clipboard data had text, html and/or uris. Analysing QTBUG-106646 and
tst_qquicktextedit showed inconsistent results, namely the description
hasMimeType failed to find html mimetype on copy&paste.
This patch changes it for searching it by hand instead of using
hasMimeType function.

Task-number: QTBUG-106646
Change-Id: I8918938e7a3fa6953eac95b72959fca85050e52f
Reviewed-by: Ville Voutilainen <ville.voutilainen@qt.io>
2022-10-18 07:29:51 +00:00
Thiago Macieira
54df3488af QLibrary::setFileNameAndVersion: reset the tag after findOrCreate
If the library we've found is already loaded, set the tag to Loaded.

Pick-to: 6.4
Change-Id: I12a088d1ae424825abd3fffd171ce3831b884eee
Reviewed-by: Fabian Kosmale <fabian.kosmale@qt.io>
Reviewed-by: Marc Mutz <marc.mutz@qt.io>
2022-10-17 15:01:39 -07:00
Friedemann Kleint
ec6b22f67d windeployqt: Deploy Qt Designer plugins for QtUiTools
Make QtUiTools a known module with command line options and
plugin dependencies.

Note: There is no automated dependency checking for those
plugins as this can lead to undesired libraries being pulled.

Pick-to: 6.4
Fixes: QTBUG-104831
Change-Id: I31a0c3620460d6558edcf8245f43502f2bca7748
Reviewed-by: Jörg Bornemann <joerg.bornemann@qt.io>
2022-10-18 00:01:38 +02:00
Marc Mutz
2fd990b386 Port qCompress() to zstream/deflate()
The zlib convenience API we've been using so far has two problems:

- On Windows-64, where sizeof(long) == 4, the use of ulong for sizes
  meant that we could not compress data compressable on other 64-bit
  platforms (Unix). While zstream also uses ulong, being a stream API,
  it allows feeding data in chunks. The total_in and total_out members
  are only required for gzip compression and are otherwise just
  informational. They're unsigned, so their overflow does not cause
  UB. In summary, using zstream + deflate() allows us to compress more
  than 4GiB of data even on Windows-64.

- On all platforms, we always allocated the output buffer in such a
  way as to accommodate the pathological case of random, incompressible
  data, so the output buffer was larger than the input. Using zstream
  + deflate(), we can start with a smaller buffer, then let zlib pick
  up where it left off when it ran out of output buffer space, saving
  memory in the common case that compression meaningfully reduces the
  size. To avoid the first few rounds of reallocations, we continue to
  use zlib's compressBound() for input less than 256KiB.

This completely fixes the compression side of QTBUG-106542 and
QTBUG-104972.

Pick-to: 6.4 6.3 6.2
Fixes: QTBUG-104972
Fixes: QTBUG-106542
Change-Id: Ia7e6c38403906b35462480fd611b482f05a5c59c
Reviewed-by: Qt CI Bot <qt_ci_bot@qt-project.org>
Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
Reviewed-by: Edward Welbourne <edward.welbourne@qt.io>
2022-10-17 23:33:41 +02:00
Marc Mutz
fdd0a1bc17 QApplicationStatic: avoid use of std::aligned_union
It's deprecated in C++23. Replace with std::aligned_union's
implementation, like done elsewhere in the code base.

Pick-to: 6.4
Fixes: QTBUG-107569
Fixes: QTBUG-99122
Change-Id: I0c06876c03a3c268298fab0f0bae399f26449bed
Reviewed-by: Mårten Nordheim <marten.nordheim@qt.io>
2022-10-17 19:33:36 +02:00
Marc Mutz
f5205bd6a4 tst_Q{BitArray,ContiguousCache}: check not only count(), but size(), too
Add at least a few, so size() isn't completely untested.

Pick-to: 6.4 6.2 5.15
Change-Id: I500d28f7efb30ab578808d8fefb6ea57949edc2e
Reviewed-by: Fabian Kosmale <fabian.kosmale@qt.io>
2022-10-17 19:33:34 +02:00