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>
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>
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>
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>
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>
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>
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>
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>
These are very helpful when converting to and from DOMRect.
Change-Id: I4a7fc6318f45bed8e2b82fd5d6ec174dc1762326
Fixes: QTBUG-107740
Reviewed-by: Paul Wicking <paul.wicking@qt.io>
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>
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>
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>
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>
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>
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>
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>
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>
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>
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>
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>
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>
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>
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>
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>
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>
Include the spacings used, to avoid a naming collision.
Change-Id: Iaf78f7142f6780dcf4c7a0b973db9f625af06767
Reviewed-by: Mitch Curtis <mitch.curtis@qt.io>
Avoid duplication by distinguishing similar test-cases.
Change-Id: I1a100d6c9729f0ea356f177535d15c3d36e2da9e
Reviewed-by: Allan Sandfeld Jensen <allan.jensen@qt.io>
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>
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>
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>
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>
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>
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>
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>
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>
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>
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>
/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>
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>
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>
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>
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>
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>
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>