Make it readable by using names instead of mere indices for the stages.
There is an important fix in there as well: when in a render pass, only
resource for VERTEX and FRAGMENT are taken into account, while in a compute
pass those are skipped. This ensures that we do not send messages to a nil or
invalid MTLRender/ComputeCommandEncoder. (nil would not be an error but the
other is fatal)
Task-number: QTBUG-79447
Change-Id: Ibef108cb7c82b5b0fdd2a299cd89fbebe8c3606a
Reviewed-by: Paul Olav Tvete <paul.tvete@qt.io>
...when available. Fall back to the QRhi (i.e. SPIR-V) binding
point otherwise (which becomes unsafe once shadertools bumps
its SPIRV-Cross snapshot, but is fine for existing .qsb files)
Task-number: QTBUG-79368
Change-Id: I2d452fdd4efb484867732c358171a800d3261dcd
Reviewed-by: Christian Strømme <christian.stromme@qt.io>
The deserializer remains compatible with .qsb files without this
additional section.
Task-number: QTBUG-79368
Change-Id: I03e2a634febbd88da7f6a4369f104855ea31e3af
Reviewed-by: Christian Strømme <christian.stromme@qt.io>
During the creation of a raster paint engine in QImage::paintEngine(),
the QImage will be detached. At least old gcc versions would get
confused so that the newly created paintengine would end up in the old
QImage copy insteads of the newly detached one. Work around by
dropping the temporary engine pointer.
Fixes: QTBUG-79383
Change-Id: I27b1f24312269bc2bcc641dc4334397a92e3bfbb
Reviewed-by: Allan Sandfeld Jensen <allan.jensen@qt.io>
The Windows API MemoryBarrier function is actually a macro when
_M_ARM64 is defined and it conflicts with the MemoryBarrier method when
it's declared and used.
Task-number: QTBUG-77388
Change-Id: I762edfc4ca1a44cbe095724de708c7cdad34ae65
Reviewed-by: Laszlo Agocs <laszlo.agocs@qt.io>
Fix a typo introduced in be56db2c49 to
avoid a crash when a pixmap is given for selected on but not for
selected off.
Fixes: QTBUG-79125
Change-Id: I84072b6b4e8a4d21684be21f5bff1deeaddbba6d
Reviewed-by: Friedemann Kleint <Friedemann.Kleint@qt.io>
Inspired by a recent Qt Quick fix. Make sure we make it
clear that QRhi-based rendering code should base output
size calculations (e.g. for setViewport() and similar)
on the pixel size reported from QRhiSwapChain, instead
of going to the QWindow.
Change-Id: I2fc22972162ccc6307ac07ceb7766c746d5f562a
Reviewed-by: Paul Olav Tvete <paul.tvete@qt.io>
Clarify that the qproperty properties will only be
evaluated once.
Fixes: QTBUG-2982
Change-Id: Ie294ced118f740c7378c62c0b5a4924d5628e118
Reviewed-by: Venugopal Shivashankar <Venugopal.Shivashankar@qt.io>
This partially reverts commit 5e8b16f0e4.
Releasing the mouse button synthetically made it impossible
to use tap and hold gestures. When investigating, it seems
that other changes have fixed the original issue that
5e8b16f0e4 was meant to address,
so this is no longer needed.
[ChangeLog][Android] Fixed regression that made it impossible for an
application to use the tap-and-hold gesture.
Fixes: QTBUG-72408
Change-Id: I53f687d047a4ad0fdf3c8c96a00ed1b11d09f047
Reviewed-by: BogDan Vatra <bogdan@kdab.com>
The default font on Windows ("Times" is not found) does not have
a ligature for "fi", so the test would not actually be testing
what it was supposed to on this platform, and would pass even
when the code was buggy.
To enable the test on Windows, we select a standard font which
has the ligature (Calibri).
Change-Id: Ic117cd8e549aa729a0cd68006d7c180c6c89c053
Reviewed-by: Simon Hausmann <simon.hausmann@qt.io>
The original commit message says this is to ensure compatibility
with the old Harfbuzz, but since OpenType features such as
kerning are often matched based on the writing system of the glyphs,
it will break kerning (and other OpenType features) for text in these
languages in some fonts. Even font that were successfully kerned by
the old Harfbuzz are broken.
To avoid regressing on finding cursor positions inside ligatures,
we need to amend 9f837af945. This
would enable cursor positions inside ligatures for languages
where they are only used for cosmetic purposes, and this was
generalized to Common and Greek at the time. This now has to be
expanded to include all the writing systems that were previously
covered by "Common".
[ChangeLog][Text] Fixed kerning error with certain fonts.
Fixes: QTBUG-77908
Change-Id: Id261fef05f86841b1533b7d87207c3d17e01e96e
Reviewed-by: Simon Hausmann <simon.hausmann@qt.io>
'macOS' appears in the documentation frequently, and because it
resembles a variable/property name, QDoc links each occurrence
of it.
'WebChannel' appears as part of a module name, but it's also
a QML type - auto-linking each word to QML documentation is
confusing.
Likewise, there's no need to link 'OpenGL' each time.
Explicit links such as \l [QML] WebChannel continue to work.
Task-number: QTBUG-79135
Change-Id: I76cc84b0076255e260aa88c244102702a48f35a6
Reviewed-by: Martin Smith <martin.smith@qt.io>
Instead of having each platform plugin deal with application termination
in their own weird ways, we now have a QPA API to signal that the system
requested the application to terminate.
On the QGuiApplication side this results in a Quit event being sent to
the application, which triggers the default behavior of closing all app
windows, and then finally calling QCoreApplication::quit().
The quit event replaces the misuse of a close event being sent to the
application. Close events are documented as being sent to windows.
The close events that are sent to individual windows as part of the
quit process can be ignored. This will skip the final quit() of
the application, and also inform the platform that the quit was
not accepted, in case that should be propagated further.
In the future the logic for closing windows should be unified
between the various approaches in closeAllWindows, shouldQuit,
and friends.
Change-Id: I0ed7f1c0d3f0bf1a755e1dd4066e1575fc3a28e1
Reviewed-by: Paul Olav Tvete <paul.tvete@qt.io>
The logic for handling termination without any event loops has been
moved up as an early exit, and the code has been modernized.
Change-Id: I202720b9923e35732cffea656e1ce108ef11953d
Reviewed-by: Paul Olav Tvete <paul.tvete@qt.io>
The logic for preventing application termination when there are modal
windows active was a leftover from the Carbon to Cocoa port, and is no
longer needed. AppKit will deal with this on its own, by checking the
preventsApplicationTerminationWhenModal property of each NSWindow.
In some cases AppKit will also ignore this property, such as when
quitting the application from the menu entry, which means we now get
the default system behavior for this use-case.
Change-Id: Iac5d8d8e17eb0974448f7ee6f39c9b7761bf4d90
Reviewed-by: Shawn Rutledge <shawn.rutledge@qt.io>
Reviewed-by: Volker Hilsheimer <volker.hilsheimer@qt.io>
This avoids error prone manual mappings when having to persist such values,
as eg. done in https://cgit.kde.org/kio.git/tree/src/kssld/kssld.cpp#n49.
Change-Id: Ib279c116a10ce8edc0b686b8b80cbd848b4b410e
Reviewed-by: David Faure <david.faure@kdab.com>
There are two places where we are only interested in the mapping of
proxy to source sort column, rather than the full mapping. Creating the
full mapping is rather expensive as it iterates all rows and columns and
allocates a large number of objects. Just figuring out the n-th accepted
column can be much cheaper.
Fixes: QTBUG-41659
Change-Id: I7ea914cb695518b4d47cdc3ad67c7786380d8709
Reviewed-by: David Faure <david.faure@kdab.com>
Reviewed-by: Christian Ehrlicher <ch.ehrlicher@gmx.de>
For some scalings, setClipRect(QRect) would produce a clip one pixel
different from setClipRect(QRectF) because of different
rounding. Ditto for setClipRegion. Fix by making sure to transform
QRectFs instead of QRects.
Fixes: QTBUG-78962
Fixes: QTBUG-78963
Change-Id: I0be721133858c30769ec6d81e978962a3d6b70cf
Reviewed-by: Christoph Cullmann <cullmann@kde.org>
Reviewed-by: Allan Sandfeld Jensen <allan.jensen@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>
(cherry picked from commit 1d1ed01711)
Reviewed-by: Tor Arne Vestbø <tor.arne.vestbo@qt.io>
Add proper version check and replace long deprecated and now removed
access to pg_attrdef.adsrc.
[ChangeLog][QtSql][QPSQL] added support for PostgreSQL 12
Fixes: QTBUG-79033
Fixes: QTBUG-79064
Change-Id: Iec1b13945c34ea017139ad1c5539ab5b7f1e03aa
Reviewed-by: Edward Welbourne <edward.welbourne@qt.io>
Makes this consistent with the rest of the actions here, and avoids
dirty hacks like KIconTheme::assignIconsToContextMenu.
Change-Id: I749f4d5f67efdbf595a52185dd507de5f87f6487
Reviewed-by: Friedemann Kleint <Friedemann.Kleint@qt.io>
Reviewed-by: Richard Moe Gustavsen <richard.gustavsen@qt.io>
Since the pre-built versions of Qt at this point are still built against
the iOS 12.x SDKs, then we need to account for this in order to have the
workaround implemented in e00d888dae still
working when deployed to an iOS 13 based device.
Change-Id: I649a453c549ee272de64624d68f9382276fcba64
Reviewed-by: Tor Arne Vestbø <tor.arne.vestbo@qt.io>
The logic was a leftover from the Carbon days and is no longer needed.
Change-Id: I557b669eadea902fa439c43162218c5864077df9
Reviewed-by: Volker Hilsheimer <volker.hilsheimer@qt.io>
std::abs(int) is defined in cstdlib which is not included on QNX.
Fixes: QTBUG-78763
Change-Id: I14d087069369db7ab4e5db9d4f816a3fbffe95f6
Reviewed-by: Johanna Äijälä <johanna.aijala@qt.io>
Reviewed-by: Friedemann Kleint <Friedemann.Kleint@qt.io>
Remove some code which was commented out with 'NOT_READY_YET' since the
initial Qt5 import. Since the mentioned bug reports are no longer
available remove this code.
Change-Id: I98686e53d85619f01d16105d147eba79b557a104
Reviewed-by: Edward Welbourne <edward.welbourne@qt.io>
.Noto Sans Univeral is a system-generated font, but for some
undiscovered reason, it has different content when the app
has a valid Info.plist versus when it does not.
When there is no valid Info.plist, the font will act as a
last-resort font and return a question mark glyph (index 4)
for all characters it does not support. This was discovered
with emojis, but I also verified that the font returns index
4 for a random character in the Cherokee range, in order to
check if this was specific for emojis or not.
This causes the font to take precedence over anything that
follows it in the fallback list in apps that do not have
a valid Info.plist, so it has to be at the end of the list.
Note that in these apps, it will act as a last-resort font,
so the glyphs returned for missing characters will be
different from in a regular app bundle. But this seems
safer than to exclude the font entirely, given that
Noto Sans cover a large range of characters and might be
needed.
This font also refactors the look up of fonts to push to
the end to avoid doing lots of unnecessary looping over
the list.
Fixes: QTBUG-78833
Change-Id: I38bec5d5941681c4b4586072f7811d31561e1051
Reviewed-by: Tor Arne Vestbø <tor.arne.vestbo@qt.io>
In d5abda313d, we started populating
meta-fallback-fonts in the font database because some that are
returned as fallbacks are not in the main list of fonts on the
system, so we would exclude them, thinking they were non-existent.
But populating these fonts by name does not always work, as
the system explicitly forbids requesting meta-fonts by name
for some cases. One of these was the emoji font, which would
resolve to a incompatible font descriptor and support for
emojis would be broken.
The fix is to retain the font descriptors we get from the
system instead, since these are guaranteed to be refer to the
correct font. This also saves us an unnecessary round-trip.
Task-number: QTBUG-78821
Task-number: QTBUG-77467
Change-Id: Icb17ccc75811eebf03919437828ba71f3ef08938
Reviewed-by: Tor Arne Vestbø <tor.arne.vestbo@qt.io>
QDesktopWidget is marked as obsolete in docs, but it is not yet
completely deprecated, some of its methods are still in use.
Replace uses of the following methods marked as obsolete:
- QDesktopWidget::screenNumber(QWidget*) -> QWidget::screen()
- QDesktopWidget::screenGeometry(QWidget*) -> QWidget::screen()->geometry()
- QDesktopWidget::availableGeometry(QWidget*) -> QWidget::screen()->availableGeometry()
Task-number: QTBUG-76491
Change-Id: I2cca30f2b4caa6e6848e8190e09f959d2c272f33
Reviewed-by: Tor Arne Vestbø <tor.arne.vestbo@qt.io>
We only need to use the QT_MANGLE_NAMESPACE macro when declaring the
interface of the class. As long as we couple that with an alias
declaration using QT_NAMESPACE_ALIAS_OBJC_CLASS, any further uses
of the class name can be un-namespaced, including declaring
categories on the class.
The only snag with QT_NAMESPACE_ALIAS_OBJC_CLASS is that it can
only be used once per class and translation unit, so forward
declarations get hairy, but we can avoid that by just including
the headers instead.
Change-Id: I333bcd18fe1e18d81fbd560b0941c98b1c32460e
Reviewed-by: Timur Pocheptsov <timur.pocheptsov@qt.io>
When a prepared statement is still alive after the database was removed
with QSqlDatabase::removeDatabase(), the cleanup routine is trying to
access the driver which is no longer alive which results in a crash.
Fixes: QTBUG-79019
Change-Id: I4630e3b947a12b23ed062f015abc373fc0e246c1
Reviewed-by: Andy Shaw <andy.shaw@qt.io>
When a QPrinterInfo is passed in to the QPrinter then it needs to ensure
that the underlying session is set up to use the specified printer,
otherwise it uses the default one as it has not been changed.
Change-Id: I90012223e9831303d02fd3ffc68223dc492ece0c
Reviewed-by: Tor Arne Vestbø <tor.arne.vestbo@qt.io>
We must check whether outputs or inputVars are non-empty before
accessing them.
This amends commit 68866b1a.
Task-number: QTBUG-79178
Change-Id: Iecf6dc705bac9bef5133ae2e5ceeace5f859f175
Reviewed-by: Oliver Wolff <oliver.wolff@qt.io>
Add a RAII class for registry keys and use it throughout
the code base.
Change-Id: I666b2fbb790f83436443101d6bc1e3c0525e78df
Reviewed-by: Volker Hilsheimer <volker.hilsheimer@qt.io>
Use the Qt's macros instead, since constexpr support may be revoked
on certain compilers.
Amends d26289ffb4.
Change-Id: I62354b14b57ae5fcbf3f1186ddb48bcf26535e90
Reviewed-by: Edward Welbourne <edward.welbourne@qt.io>
When an empty text block precedes a table in QTextEdit, the cursor in
the said text block is drawn twice (in order to make sure that the
cursor is drawn on top of the table) with inverted colors, resulting in
nothing showing up. This commit checks for an empty block before the table
and skips the first drawing of the cursor if that's what it finds.
Fixes: QTBUG-62919
Change-Id: I828d06e0645007ac42e3f308a35868b4f0db1380
Reviewed-by: Edward Welbourne <edward.welbourne@qt.io>
Reviewed-by: Ville Voutilainen <ville.voutilainen@qt.io>
Integrity has a hack, to let us link to the library mmap is in, that
depends on two extern "C" symbols of type char *; but assigning a
string literal to a char * variable as initializer is a const-ness
violation (as the Integrity compiler does point out), so change the
two variables to be char[] instead of char *, so that the literals
populate (and determine the size of) the arrays, instead.
Change-Id: Iab34fb378bc0522e14539592ead066f068751ad0
Reviewed-by: Qt CI Bot <qt_ci_bot@qt-project.org>
Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
Prevent call to activateWindow() for minimized windows in
QWidget::setWindowState() by clearing the flag.
Fixes: QTBUG-46763
Change-Id: I40389d0906438ffe251fc79f18a523ecb53edb1b
Reviewed-by: Andy Shaw <andy.shaw@qt.io>
Reviewed-by: Richard Moe Gustavsen <richard.gustavsen@qt.io>
When calculating the header section size based on its contents when a
stylesheet is used, the size hints from the stylesheet are used. In case
if the stylesheet specifies only one of the sizes, the other is set to
-1. Because of this the actual content size is ignored.
The solution is to calculate the size based on the application style, in
case if it's not specified in the stylesheet.
Fixes: QTBUG-75615
Change-Id: I3453fa623d75b6b32832edf753de6e3e4e7f5a22
Reviewed-by: Frederik Gladhorn <frederik.gladhorn@qt.io>
From macOS 10.15 and iOS 13 forward it's not possible to create font
descriptors for system fonts such as .AppleSystemUIFont based on the
family name.
This means we have to preserve the font descriptors we get from CoreText
for fallback fonts, so that we can populate them along with the family name.
Task-number: QTBUG-78821
Task-number: QTBUG-77467
Change-Id: Ifce01da65f90afb7dc2bc3005c3c5870b9c116de
Reviewed-by: Eskil Abrahamsen Blomfeldt <eskil.abrahamsen-blomfeldt@qt.io>
This reverts the x86 F16 part of commit
9649c41ed9. Unfortunately, it is perfectly
valid to compile coe without F16C an link to a QtCore that was compiled
with it. That's the case in Clear Linux where there's
/usr/lib64/libQt5Core.so.5 and /usr/lib4/haswell/libQt5Core.so.5.
Change-Id: I907a43cd9a714da288a2fffd15baacace8331403
Reviewed-by: Jani Heikkinen <jani.heikkinen@qt.io>
qmake.conf(25) incorrectly sets QMAKE_CFLAGS_DISABLE_LTCG to -Qno-ipo.
The correct form to disable IPO on Windows with ICC 18.x and 19.x should
be: -Qipo-. The implication is that the CONFIG feature in simd.prf (31)
modulating the compilation of specific ISA optimized sources now
successfully disables IPO on intel_icl when needed.
Fixes: QTBUG-78976
Change-Id: Id691f69b909d2bbba77402ff4f0b17b3b07ad6f3
Reviewed-by: Allan Sandfeld Jensen <allan.jensen@qt.io>
- Replaced the usages of the following deprecated APIs:
* QDesktopWidget::screenCount() -> QGuiApplication::screens().size()
* QDesktopWidget::screenGeometry(int) -> QGuiApplication::screens().at()
* QDesktopWidget::screenNumber(QPoint) -> QGuiApplication::screenAt(QPoint)
- Added notes for the QWidget *QDesktopWidget::screen(int), which
currently has no replacement.
- Fixed the tests to build conditionally, only when these APIs are
enabled.
Task-number: QTBUG-76491
Change-Id: I2fdec96d0a6a4fc782c53549b05a5556412b8305
Reviewed-by: Volker Hilsheimer <volker.hilsheimer@qt.io>
This gives the user the opportunity to employ BASH_ENV to circumvent
macOS System Integrity Protection and set variables like
DYLD_FRAMEWORK_PATH.
Fixes: QTBUG-57204
Change-Id: Icd99d903a3be76fabd509e204ea61a254a96609c
Reviewed-by: Eike Ziller <eike.ziller@qt.io>
Reviewed-by: Andy Shaw <andy.shaw@qt.io>
Reviewed-by: Tor Arne Vestbø <tor.arne.vestbo@qt.io>