This was visible in the triquadcube test when enabling transparent window
background: the cube on the left was rendered incorrectly because alpha
was not written out due to not setting glColorMask() back to the defaults
when switching to another pipeline.
Change-Id: I7a8c94072e0b68a58fffcc8c1a200e3940dcad44
Reviewed-by: Christian Strømme <christian.stromme@qt.io>
This class will likely be used by the OpenGL backend of QRhi as well.
Therefore, we need to make it more self-contained and independent.
Change-Id: If046ed41e25c70cc9abb45219b451f9179feaa1c
Reviewed-by: Christian Strømme <christian.stromme@qt.io>
This will also cause clearing to 0,0,0,0.
Essential in order to allow fast testing of window transparency
issues in combination with QRhi and the various backends.
Change-Id: Iee2763c1d06f1d3e5d59a9142abaf30fab1dc543
Reviewed-by: Christian Strømme <christian.stromme@qt.io>
With OpenGL a scissor (or viewport) rectangle is not allowed to have a negative
width or height. Everything else is allowed. This is also the semantic we wish to
keep for QRhiViewport and QRhiScissor.
This raises some problems. For instance, when we do bottom-left - top-left
rectangle conversion, the case of partially out of bounds rects needs to be
taken into account.
Otherwise, Qt Quick ends up in wrong scissoring in certain cases, typically when
the QQuickWindow size is decreased so the content does not fit because that will
then start generating negative x, y scissors for clipping (which is perfectly
valid but the QRhi backends need to be able to deal with it)
Then there is the problem of having to clamp width and height carefully, because
some validation layers for some APIs will reject a viewport or scissor with
partially out of bounds rectangles.
To verify all this, add a new manual test, based on the cubemap one. (cubemap was
chosen because that is an ideal test scene as it fills the viewport completely, and
so it is visually straightforward when a scissor rectangle is moving around over it)
Fixes: QTBUG-78702
Change-Id: I60614836432ea9934fc0dbd0ac7e88931f476542
Reviewed-by: Christian Strømme <christian.stromme@qt.io>
Since iOS 13, the cascade list for the default UI font contains
meta-families for several writing systems, such as CJK. Since
these font families were never populated to the database, we ignored
them in Qt, and thus got missing glyphs for the characters in question.
The fix is to make sure these fonts are populated in the database.
It contains a partial backport of 922d195020,
which adds the qt_isFamilyPopulated() accessor to allow us to check
if the family has been populated in the font database. In Qt 5.14,
there is public API for this in QPlatformFontDatabase, so this is
a temporary resolution until then.
Fixes: QTBUG-77467
Change-Id: Ia9ebb8a19ad2367eb764ae1496a52966b465336b
Reviewed-by: Tor Arne Vestbø <tor.arne.vestbo@qt.io>
Spotted in API change review, thanks to Albert Astals Cid.
Also added documentation of this method.
Change-Id: I2ef2c526a98b571a3cb3bb5f93d1952b1b0d63a9
Reviewed-by: Albert Astals Cid <albert.astals.cid@kdab.com>
For Windows 10 and higher, the SP version and major/minor versions
are not relevant any more; the release id (displayed by the winver
tool as "Version" should be displayed instead. Add helpers and
change the output accordingly.
For Windows 7, output the build number.
[ChangeLog][QtCore][Windows] QSysInfo::prettyProductName()
now returns a version including the Windows 10 release id or Windows 7
build number respectively, resembling the version string displayed by
the winver tool.
Change-Id: Ia783272a0da234d2f7ff35c4a9a6fc296da277e0
Reviewed-by: Volker Hilsheimer <volker.hilsheimer@qt.io>
Change-Id: I0b35c32f3730dc15d868b10489abeda909bbe926
Reviewed-by: Alexandru Croitor <alexandru.croitor@qt.io>
Reviewed-by: Timur Pocheptsov <timur.pocheptsov@qt.io>
My commit 3e7463411e adjusted the focus widget by setting
QApplicationPrivate::focus_widget directly, while there is a method for
doing this properly, including setFocus_sys() and emitting signals.
Fixes: QTBUG-77364
Change-Id: I218acf7a9de39173d282ced46def4f65594f80b4
Reviewed-by: Florian Bruhin <qt-project.org@the-compiler.org>
Reviewed-by: Volker Hilsheimer <volker.hilsheimer@qt.io>
Reviewed-by: Allan Sandfeld Jensen <allan.jensen@qt.io>
Reviewed-by: Shawn Rutledge <shawn.rutledge@qt.io>
The fix for QTBUG-35203 set the Alt+Right shortcut on the next
button, clobbering the Alt+N shortcut from parsing the text (similar
for other languages). Add a separate shortcut for Alt+Right since a
button may not have several shortcuts.
Amends 6714196f45.
Fixes: QTBUG-78604
Change-Id: I1367da739c35fbd011d11f850c9bc3915113c644
Reviewed-by: Oliver Wolff <oliver.wolff@qt.io>
Add back code to handle bitmap glyphs returned when we did not request
a bitmap glyph. This is a can happen on some configurations where
bitmaps are not suppressed.
Fixes: QTBUG-78116
Change-Id: Ie0c6cfbf9c50456431b0e3a23e568f3399e5a879
Reviewed-by: Lars Knoll <lars.knoll@qt.io>
v3.29.0 is the latest and there is no indication as to when the next
release is so we will apply this separately for now and it can be
reverted once it is in a release that we ship with.
This patch is taken from https://www.sqlite.org/src/info/98357d8c1263920b
Change-Id: I82d398b093b67842a4369e3220c01e7eea30763a
Reviewed-by: Simon Hausmann <simon.hausmann@qt.io>
On Windows, shortcut ".lnk" files are treated as symlinks, and
attribute queries on a shortcut file return the results for the
shortcut target.
Fixes: QTBUG-77523
Change-Id: I907a43cd9a714da288a2fffd15bada7eba37d3ba
Reviewed-by: Volker Hilsheimer <volker.hilsheimer@qt.io>
moc extracts he name that is inthe Q_FLAG macro and that gets used in
qDebug(). As the documentation described, qDebug would have printed:
QFlags<LoadHints>(QLibrary::ResolveAllSymbolsHint)
which doesn't compile (though we could have partially specialized
QFlags<QFlags<E>> to be QFlags<E>). The semantically correct output is:
QFlags<LoadHint>(QLibrary::ResolveAllSymbolsHint)
which is what this change gets. The ideal output would be:
LoadHints(QLibrary::ResolveAllSymbolsHint)
But that's not a doc change.
Fixes: QTBUG-77216
Change-Id: I0635172f4f2a4c51a435fffd15b59a859886e90c
Reviewed-by: Mårten Nordheim <marten.nordheim@qt.io>
On exit, QLocale::codecForLocale() can return null as the codec may have
already been destroyed. In that case, pretend that Latin1 was the
locale, so any file name is acceptable. This matches QString:
QTextCodec *codec = QTextCodec::codecForLocale();
if (codec)
return codec->toUnicode(str, size);
#endif // textcodec
return fromLatin1(str, size);
Note that if we're wrong and the locale was *not* Latin1, files that you
had a name to may not be encoded or decoded the same way.
Fixes: QTBUG-78446
Change-Id: Iece6e011237e4ab284ecfffd15c54077728a17ca
Reviewed-by: Edward Welbourne <edward.welbourne@qt.io>
The error was due to a compiler optimization bug, which is fixed
in 16.3.0.
This reverts commit 305f2c3aa6.
Fixes: QTBUG-77239
Change-Id: Idfb86ad5c3ec026518f0713c41f7ad744ab4d5db
Reviewed-by: Mårten Nordheim <marten.nordheim@qt.io>
Due to their sandboxed nature, UWP applications do not have access to
system settings like time zone.
Fixes: QTBUG-71185
Change-Id: I567a255f8adc18838fff79b81210faa094674722
Reviewed-by: Edward Welbourne <edward.welbourne@qt.io>
This amends 9be66cb282 so that the
DialogButtonBoxLayout case is moved to be before the
MouseDoubleClickDistance one in case the fallthrough is triggered.
Change-Id: I843dad6b55ccffe6b6c275cd75587f04659e512f
Reviewed-by: BogDan Vatra <bogdan@kdab.com>
The css style 'spincontrol-disable-on-bounds' was not properly honored
within QAbstractSpinBox::initStyleOption() because the affected widget
was not passed to QStyle::styleHint(). Therefore QStyleSheetStyle did
not find the correct render rule.
Fix it by passing 'this' as third argument to QStyle::styleHint().
Fixes: QTBUG-18008
Change-Id: Iabcebf0b83143f45309b4e7066bccb8d20bd0419
Reviewed-by: Eirik Aavitsland <eirik.aavitsland@qt.io>
Leaving it empty resulted in errors from Xcode when compiling the app.
Task-number: QTBUG-25309
Task-number: QTBUG-74872
Change-Id: I61b0f47d754c5f5b181a6f918283d990458cc78d
Reviewed-by: Joerg Bornemann <joerg.bornemann@qt.io>
A previous change modified hit testing in the non-client area of
fixed-size windows, in order to prevent showing a resize cursor when
the windows are not resizable (QTBUG-77220). The change assigned
HTCAPTION for any point over the entire title bar, including the top
bar buttons, which on Windows 7 classic or basic desktop caused these
buttons to become unresponsive. The present fix changes this behavior
to redefine only the outer sizing frame, while letting the rest of the
title bar be handled by DefWindowProc().
Fixes: QTBUG-78262
Change-Id: Id6e821a805c8333a67988f87c3727bed0c93290e
Reviewed-by: Volker Hilsheimer <volker.hilsheimer@qt.io>
Reviewed-by: Friedemann Kleint <Friedemann.Kleint@qt.io>
Have to set the drawableSize ourselves.
This is not yet fully correct in the sense that does not ensure
what the platform plugin patch tries to enable, namely atomic frames
when it comes to the drawable size. Going to fix that up in separate
patches, maybe it will need some QRhi API changes as well so won't
mix that in here.
Change-Id: I47a3816930bc6a87a2c96d4a6c4c85b2577147dc
Reviewed-by: Tor Arne Vestbø <tor.arne.vestbo@qt.io>
Separate quiet NaN from infinity and expand the nan-with-payload test
to a general test that bits outside the exponent don't break qIsNan().
Generally test more thoroughly and systematically.
Tests for signalling NaN shall follow.
Change-Id: Ib35dabacc8ebcc9a0761df38f6f419f0398d0e20
Reviewed-by: Erik Verbruggen <erik.verbruggen@me.com>
Like our other rendering code paths, the Metal path should allow the user
to resize their surface when they see fit. This is the case today with
e.g QBackingStore::resize() and QOpenGLPaintDevice::setSize().
[ChangeLog][macOS] The drawableSize of Metal layers is no longer updated
automatically on window resize or screen change. Update the size manually
in response to resizeEvent(), or at the start of each frame, as needed.
Change-Id: I9ed6d4326d0e0a3f4e3c63984d3b193e8bb77cae
Reviewed-by: Morten Johan Sørvig <morten.sorvig@qt.io>
Testlib's signaldumper functionality would crash inside
testlib as it dereferenced the sender after it was deleted.
Change-Id: I6013b75b0a121e2768429d8a3cf0339a940314f2
Reviewed-by: Lars Knoll <lars.knoll@qt.io>
[ChangeLog][Platform Specific Changes][Linux] Added a device spec for
Raspberry Pi 4 (32-bit, V3D)
Change-Id: Idea889842a89dcc74705f1bb9559953dadc07251
Reviewed-by: Eirik Aavitsland <eirik.aavitsland@qt.io>
Reviewed-by: Andy Nichols <andy.nichols@qt.io>
Switches the text blending to be SourceOver as that is
much more common than Source, and means we can now handle
semi-transparent text colors there.
Task-number: QTBUG-72165
Change-Id: I7b3aedb22412e6fb6f60197596b37f26c6008784
Reviewed-by: Tor Arne Vestbø <tor.arne.vestbo@qt.io>
QQuickMultiPointTouchArea needs to understand whether a stationary
touchpoint has relevant property changes, to decide whether to emit its
updated() signal. Amends 217dd1b3b0
Task-number: QTBUG-77142
Change-Id: I85e031820bef9d687369b7d67a57c67fe2875b4b
Reviewed-by: Tor Arne Vestbø <tor.arne.vestbo@qt.io>
In 5bb178c479, the Android platform plugin was moved from
platforms/android to platforms/. The unforeseen consequence of this was that the plugin
loader for plugins/platforms would now find it, whereas before it would be ignored. It
would therefore be detected as the appropriate plugin, but since it was intended to be
loaded as a static plugin, loading it dynamically would fail.
Instead of fixing the static plugin loading, we remove this hack.
Fixes: QTBUG-78440
Change-Id: Idcb6c075fdebaf67644f32a59d7aaf0d1c0bbe20
Reviewed-by: Eskil Abrahamsen Blomfeldt <eskil.abrahamsen-blomfeldt@qt.io>
Before, only the direct children would get an update when the
stylesheet changed, any children below that would be unchanged.
Fixes: QTBUG-77006
Change-Id: Id668eaae74a8289d78d66644f077e6a3302960cd
Reviewed-by: Frederik Gladhorn <frederik.gladhorn@qt.io>
If a QPainter ended without all saved states having been restored, the
state stack would leak memory.
Fixes: QTBUG-77843
Change-Id: I760904d6391de24a4867be54fa1bebf76be14ba7
Reviewed-by: Allan Sandfeld Jensen <allan.jensen@qt.io>
Remove info about Windows Phone, which is no longer supported.
Task-number: QTBUG-61884
Change-Id: Ic330f0f19a4e7314dd175f6c492fa25133185517
Reviewed-by: Oliver Wolff <oliver.wolff@qt.io>
The code snippet is used by both Q_ENUMS and Q_ENUM. Therefore,
remove the example snippet from Q_ENUMS documentation, as it is
obsolete. Also, move recommendation to use Q_ENUM in new code to the
very top of Q_ENUMS' documentation.
Fixes: QTBUG-63203
Change-Id: I12a9f45e0b3bd75dfe98e1ecbc45e299a688b80c
Reviewed-by: Giuseppe D'Angelo <giuseppe.dangelo@kdab.com>