This way Qt builders can see if everything has been configured
properly for XCB GL integrations at configure time, instead of
at the end of the build process.
Change-Id: I00740cc2edd7f6ecfcda0ddfb22649d1b4db4aa2
Reviewed-by: Oswald Buddenhagen <oswald.buddenhagen@gmx.de>
xcb-xlib is used by XCB and EGLFS_X11.
xlib is used by XCB, EGLFS_X11 and offscreen plugin (not listed
currently under "QPA backends").
egl_x11 is used by XCB GL integration plugin and EGLFS_X11.
Renamed X11 -> XCB under "QPA backends", because that is the
correct QPA name.
Change-Id: I455ac3a41da3ab84453d8de0edc657c3a5e064c9
Reviewed-by: Oswald Buddenhagen <oswald.buddenhagen@gmx.de>
Its been available by default since at least libxcb 1.5, and in Qt 5.12
we have even increased the minimal required libxcb version to 1.9.
Having configure switches for extensions is a legacy from Qt 4. There
are still few exceptions in Qt5, where the reason is that we have to
support Linux distributions that don't ship recent enough libxcb.
Task-number: QTBUG-30939
Change-Id: I0a02d93b6411119ec018b0cb8fe5c63beeab62ee
Reviewed-by: Oswald Buddenhagen <oswald.buddenhagen@gmx.de>
Reviewed-by: Allan Sandfeld Jensen <allan.jensen@qt.io>
xcb-render is a C interface for X11 extension. xcb-render-util is a
utility library that complements xcb-render by providing convenience
functions and interfaces which make the raw X protocol more usable.
Bumped xcb-render-util version to avoid having include hacks. We were
bundling 8 years old release 0.3.8 (Apr, 2011). 0.3.9 is the latest
release and it was relesed 4,5 years ago (Jun, 2014). All CI machines
have 0.3.9. The only thing that have changed in xcb-render-util sources
since 2011 is that we don't need to have various hacks to include
xcb_renderutil.h in C++ files. Upgrading bundled XCB libs was also
requested in QTBUG-71109.
Task-number: QTBUG-71109
Change-Id: Ib261f7584ad81be95660123b007e2200a3042f4c
Reviewed-by: Oswald Buddenhagen <oswald.buddenhagen@gmx.de>
We would draw the tab and space symbols without setting the correct
font on the painter first.
[ChangeLog][QtGui][Text] Fixed so ShowTabsAndSpaces will use the
correct font.
Fixes: QTBUG-62540
Change-Id: I3b7d6d317473e7aab722dafe1a128c57a830f634
Reviewed-by: Andy Shaw <andy.shaw@qt.io>
Reviewed-by: Konstantin Ritt <ritt.ks@gmail.com>
The Qt::ForeignWindow flag is or’ed to d->windowFlags
by QWindow::flags(). Use this getter function instead
of accessing d->windowFlags() directly.
Change-Id: I6a82aa7e379ba51272954ffe7b87f108034da8c6
Reviewed-by: Tor Arne Vestbø <tor.arne.vestbo@qt.io>
QPlatformWindow::isForeignWindow() should return whether
the native window is of the foreign window type, or
false if the platform (plugin) does not support this
concept.
It should not call QWindow::type(), since that function
may itself be implemented in terms of isForeignWindow().
Change-Id: Ib67a5a44c5c1db0acb4d3bc155e187f8164146d1
Reviewed-by: Tor Arne Vestbø <tor.arne.vestbo@qt.io>
Reviewed-by: Timur Pocheptsov <timur.pocheptsov@qt.io>
When glyphs are converted to monochrome from an alpha map,
it does not make sense to apply high quality dithering, because
the result will be that some the subpixels along the edges
that cover only part of a pixel are filled. This causes the
glyphs to look jagged and ugly.
Instead, we use ThresholdDither to fill all pixels that are
>= 50% opacity.
[ChangeLog][QtGui][Text] Improved appearance of monochrome
text on some platforms.
Fixes: QTBUG-69702
Change-Id: I0f44a8d73f6b9f1eb59f297d66438575f1e9db10
Reviewed-by: Allan Sandfeld Jensen <allan.jensen@qt.io>
When eliding text we would check for the existence of the ellipsis
character and fall back to using the dot if it was not available.
However, when font merging was in use, we would also use ellipsis
from a fallback font if available. This could cause the metrics
of the text to increase if the fallback font had larger metrics,
and the result was that text could shift when elided.
It is better to prefer the dot from the current font than to use
the ellipsis from a fallback, so we only use the ellipsis if
it is in the main font.
[ChangeLog][QtGui][Text] Fixed a bug where eliding text could
change the height of its bounding rectangle for certain fonts.
Fixes: QTBUG-72553
Change-Id: Ib27fc65302465ddce661801bcc5ae32e55f1aeb9
Reviewed-by: Simon Hausmann <simon.hausmann@qt.io>
these were new on dev while the original migration happened on 5.9, or
came from new changes which hadn't adapted yet.
Change-Id: I5e48437061a97e6df6e93881c98471455e177631
Reviewed-by: Joerg Bornemann <joerg.bornemann@qt.io>
as it is now cheap to test for individual libraries and headers, split
the xcb_syslibs monster-library into its parts.
the compile test remains a single blob, though, as that didn't get any
cheaper. whether it's worth keeping it in the first place is debatable.
Change-Id: Id7cae7925bb4d77069437512abecf14feea749f2
Reviewed-by: Gatis Paeglis <gatis.paeglis@qt.io>
When building ANGLE, we need the shader compiler (fxc.exe), which is not
shipped with MinGW. Previously, we required an installed DirectX SDK.
For Windows versions >= 8, the DX SDK is also part of the Windows Kit,
so we also allow the user to specify the location of the Windows Kit.
We also detect fxc on 64-bit hosts now, and in newer SDK versions which
version the binary directory.
The detected binary is now exported by configure, so the ANGLE project
file does not need to duplicate the logic anymore.
Task-number: QTBUG-52487
Change-Id: I41a17992909041dd84291b69498195cc8b8fab8a
Reviewed-by: Joerg Bornemann <joerg.bornemann@qt.io>
properly atomize the libraries and express their dependencies, and
adjust the project files accordingly.
note that we don't try to use any additional paths, as all SDKs we
currently support have built-in directx 11 support:
- msvc2013 comes with win sdk 8.1; that is also used for win7 targets
- mingw-64 5.3 (though this one is missing fxc, which is why the code
path for using an external sdk for that remains)
Change-Id: Ib44e389ef46567308293c2bbcad20a96e8ef70c7
Reviewed-by: Joerg Bornemann <joerg.bornemann@qt.io>
Reviewed-by: Oliver Wolff <oliver.wolff@qt.io>
Otherwise HarfBuzz will fall back to using default font sizes, e.g. 12.0
in the CoreText backend.
hb_coretext_font_create() already does the right thing, but we're not using
that function, we create the hb_font_t ourselves in _hb_qt_font_create().
The mismatch didn't matter for vector-based fonts as the metrics (presumably)
scale linearly, but for bitmap-based font such as Emojis they don't, and
we ended up with advances that were way too large (increasingly so the
larger the font point size).
Change-Id: I4781dda965c745853732026da91590d8506ec3f5
Reviewed-by: Simon Hausmann <simon.hausmann@qt.io>
in addition to the actual library resolution, also resolve the headers
belonging to the library, to validate the include path, and possibly
ensure that the right version of the library is present.
the "include" entries were moved out of the "test" objects, and renamed
to "headers". this cleanly permits libraries without compile tests.
the headers were not put into the sources, because the variance among
the includes is generally orthogonal to the variance among the
libraries.
note that this - like the library resolution - provides no support for
darwin frameworks. consequently, the opengl libraries are excluded from
the conversion on darwin.
similarly, wasm is excluded (centrally), because emcc is magic and would
need advanced wizardry to be dealt with.
Change-Id: Ib390c75371efa2badcfec9b74274047ce67c3e5a
Reviewed-by: Joerg Bornemann <joerg.bornemann@qt.io>
Reviewed-by: Paul Wicking <paul.wicking@qt.io>
Insufficient memory was allocated when asking GetDIBits() to convert to 32bit.
Fix allocation size and use a QScopedArrayPointer.
Fixes: QTBUG-72343
Change-Id: I45f79c913a243316e01bc6efed08e50ccc7d25f4
Reviewed-by: Eirik Aavitsland <eirik.aavitsland@qt.io>
Resolves "reference to non-static member function must be called" error.
Fixes: QTBUG-72403
Change-Id: Iebd865ff553736df43548b72b45ed3f4711fffc1
Reviewed-by: Jesus Fernandez <Jesus.Fernandez@qt.io>
Our glyph caches on 10.14 are based on the application appearance, so when
the application goes from dark to light or light to dark, we need to reset
and re-populate the glyph-caches to account for the new appearance.
Change-Id: If019d8cfa33ffb2b14747444b2ff74b288992f55
Fixes: QTBUG-71018
Reviewed-by: Timur Pocheptsov <timur.pocheptsov@qt.io>
This reverts commit ae8389e19c.
The result of malloc should be aligned in any case, and
this change conflicts with the use of realloc on the data elsewhere.
Change-Id: I01773132b240614a2656dd3013490b0df9cd14a7
Reviewed-by: Kirill Burtsev <kirill.burtsev@qt.io>
Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
egl-x11 is used in two places:
- the eglfs-x11 plugin, which has a hard dependency on xcb-xlib
- the xcb-egl plugin, which has a soft dependency on xcb-xlib
that means that the egl-x11 configure test needs to be untangled from
xcb, and that eglfs-x11 should be a separate feature with a proper
dependency declaration.
when the plugins that need egl-x11 are not built, it also makes no sense
to build the respective integration in the egl_support module (even if
it's possible to coax it into building), so adjust things accordingly.
Change-Id: Ic729d0b7c893dd00844567329205c24ea2703033
Reviewed-by: Gatis Paeglis <gatis.paeglis@qt.io>
xcb is a dependency which should be detected upfront.
same for xlib.
this also removes calls to functions coming from the dependencies from
the tests (both because these calls prove nothing, and because at some
point we will stop linking transitive deps).
Change-Id: Iac77305eab33ea8ff5c71302cef980eb908d8403
Reviewed-by: Gatis Paeglis <gatis.paeglis@qt.io>
freetype depends on zlib. using statically linked freetype as system
library lacks the usage requirement to link with zlib. so we need to
add this manually.
Task-number: QTBUG-63115
Change-Id: Iaf0f3027bd9d1386fcc1ecfbfbe07ab09b2d0bb9
Reviewed-by: Oswald Buddenhagen <oswald.buddenhagen@qt.io>
Reviewed-by: Joerg Bornemann <joerg.bornemann@qt.io>
It was added in c3a963da1f.
wayland was updated in a8fed20181729cae70de43079c4a34ad1780cfd7.
Change-Id: Ibf458815c3b61c5f936f147086db3d2b5782c175
Reviewed-by: Oswald Buddenhagen <oswald.buddenhagen@qt.io>
If the document is paged and contains an image spanning more than one
page, correctly set the y position for everything following that
image.
Change-Id: I1c584c7a907c1728c2965f1dc3fdc56069ab3172
Fixes: QTBUG-59886
Reviewed-by: Eskil Abrahamsen Blomfeldt <eskil.abrahamsen-blomfeldt@qt.io>
The alignment of long long on 32-bit windows is only 32-bits, but we
should be safe to assume it is aligned at 64-bit.
Since QRgba64 is a public type, we can't fix the alignment there without
breaking ABI, so instead fix it where temporary buffers are allocated.
At the same time be consistent about using QRgba64 so we can switch to it
enforcing alignment in Qt6.
Change-Id: Ie15c305bc867c62a13df8eb2b1678e92174e1f97
Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
Commits that added this code:
7ce8491280 and
f005dee1b3
I guess this was a work-around, before we started bundling
XCB libs a year later in 21bd66e1ea
0.3.8 was released in 2011-04-26 and we are bundling 0.3.9, so
it is safe to remove the include work-around as well.
Change-Id: I5794f40d86e10ebdad984aa4b61311979aaadcf3
Reviewed-by: Oswald Buddenhagen <oswald.buddenhagen@qt.io>
Reviewed-by: Frederik Gladhorn <frederik.gladhorn@qt.io>
Reviewed-by: Shawn Rutledge <shawn.rutledge@qt.io>
It's a leftover from when the Cocoa plugin used QFontEngineMulti
exclusively. Nowadays QFontEngineMulti will strip out the highByte
before calling into the real engine. Left an assert just in case..
Change-Id: I6cb26d20a908d7c3aaf096297fca160805fdb85b
Reviewed-by: Simon Hausmann <simon.hausmann@qt.io>
Reviewed-by: Eskil Abrahamsen Blomfeldt <eskil.abrahamsen-blomfeldt@qt.io>
Reviewed-by: Tor Arne Vestbø <tor.arne.vestbo@qt.io>
The only reason why we bundled this library ~6 years ago was because
it was not available on distributions that we supported at the time,
but library was a hard dependency for XCB plugin. See:
2122e731ab
Later more and more projects started to depend on it (compose input
context plugin, libinput, mir, wayland). The configuration had become
too complex, because some projects used bundled and some used the
version from the system.
Having libxkbcommon in 3rdparty sources is not necessary anymore, after
RHEL 6.6 was removed from the list of supported platforms for Qt 5.12.
Ubuntu 16.04 - 0.5.0
Ubuntu 18.04 - 0.8.0
openSUSE 42.3 - 0.6.1
RHEL-7.4 - 0.7.1
This will also simplify further development, e.g. QTBUG-42181
Bumped the minimal required version 0.4.1 -> 0.5.0.
The patch also contains a code marked with "TRANSITION HACK", which
is temporary needed so we can update the dependent wayland module.
[ChangeLog][Third-Party Code] Removed xkbcommon from bundled sources.
This library is present on all supported platforms. The minimal required
version now is 0.5.0.
Task-number: QTBUG-65503
Change-Id: Iec50829bb6f8fbb19f3c4e4ad62e332beb837de5
Reviewed-by: Lars Knoll <lars.knoll@qt.io>
Reviewed-by: Laszlo Agocs <laszlo.agocs@qt.io>
Reviewed-by: Oswald Buddenhagen <oswald.buddenhagen@qt.io>
No need to return top level window if it was not created.
It means no platform resources have been allocated.
Events might not be delivered if the wrong window is returned.
Fixes: QTBUG-70544
Change-Id: I43462974f70871470f7b7490dc2b3c08846f77b1
Reviewed-by: Richard Moe Gustavsen <richard.gustavsen@qt.io>
Removes assumptions about QImage format in a few places.
Change-Id: I515701be53190429a48956c31986fa0804806406
Reviewed-by: Simon Hausmann <simon.hausmann@qt.io>
Instead of relying on the return value of malloc having the correct
alignment, use proper non-throwing new[] operators.
Change-Id: I06c6c619e21c848f3d184bdb7cef8c5589c1c7ab
Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
This special case of macOS appears to be outdated and now causes a bug.
Change-Id: Ie9c074bb69eda7abfe3d123f807b517334cc2958
Fixes: QTBUG-69803
Reviewed-by: Eskil Abrahamsen Blomfeldt <eskil.abrahamsen-blomfeldt@qt.io>
Reviewed-by: Konstantin Ritt <ritt.ks@gmail.com>
fix the plugin name (it was missing the leading 'q') and the name used
in configure (the latter making it unnecessary to mess with it in the
mkspec). the qt.prf override which forced linkage of the plugin is also
removed due to being completely redundant.
Change-Id: I94687a34a295c36754e36a298af902b656ba2ecc
Reviewed-by: Kyle Edwards <kyle.edwards@kitware.com>
Reviewed-by: Lorn Potter <lorn.potter@gmail.com>
Don't start a new page to print a very high line of text if
that line wouldn't fit on one page in any case. In that case
we have to break the image up onto several pages anyway, so
we might as well start it immediately.
Change-Id: I823aa4961df179054476755c8f5df2e03874661f
Fixes: QTBUG-59885
Reviewed-by: Eskil Abrahamsen Blomfeldt <eskil.abrahamsen-blomfeldt@qt.io>
Inline images can have 4 different alignments. Unfortunately,
AlignTop and AlignBottom can only be set once we have laid out
the whole line and know the total height of the line, as one
could otherwise end up with lines that are too high.
To fix this, position the images for these cases in a second loop
after we have calculated the length of the line and the maximal
image height in that line.
Task-number: QTBUG-59310
Change-Id: I1fd4cd39e43a13d1967b9f5c9ce8270a99269cd9
Reviewed-by: Allan Sandfeld Jensen <allan.jensen@qt.io>
Reviewed-by: Eskil Abrahamsen Blomfeldt <eskil.abrahamsen-blomfeldt@qt.io>
The logclusters where never correctly initialized for tabs or
inline objects.
Change-Id: I376fd2dba19994eb5add24cdb8a93c38bde8cd1e
Fixes: QTBUG-70946
Reviewed-by: Allan Sandfeld Jensen <allan.jensen@qt.io>
From 64 to 256 MB. Note that this is especially important
because bindTexture() will fail and return an invalid
texture for image data larger than this. That is not ideal
but is trickier to correct. Until that is available, increase
the cache size to alleviate the pain somewhat.
Task-number: QTBUG-59207
Change-Id: Ibc22524acad0b42a632eb7e4cd8ea86225174837
Reviewed-by: Allan Sandfeld Jensen <allan.jensen@qt.io>
We document being able to parse more than 8-bit per color, but were
ignoring everything after the first 8 bits.
Change-Id: Ic85ab04b0836e6979a623e294eebd5084c1a9478
Fixes: QTBUG-71373
Reviewed-by: Eirik Aavitsland <eirik.aavitsland@qt.io>
QImageWriter's plugin can open devices while operating and only free
them on destruction which means that if one wants to act on the file
written if must first destroy the writer's instance. This patch adds
the suggestion to use a scope to avoid that problem.
Change-Id: I239157ea86c4a93faab237fe1860312a3c7ac7a2
Reviewed-by: Eirik Aavitsland <eirik.aavitsland@qt.io>
The devicePixelRatio on the returned pixmap should
be the product of the Qt and platform scale factors.
This handles the corner case of setting QT_SCALE_FACTOR
on macOS with a high-dpi display.
Change-Id: I3600165d47c03c4e043bcc5e375932cc3fc0c544
Reviewed-by: Tor Arne Vestbø <tor.arne.vestbo@qt.io>
Assert on receiving double clicks which are currently not implemented.
Task-number: QTBUG-71263
Task-number: QTBUG-70999
Change-Id: I85cd21665ecaf118584053de63745044728d8f5b
Reviewed-by: Gatis Paeglis <gatis.paeglis@qt.io>
Reviewed-by: Tor Arne Vestbø <tor.arne.vestbo@qt.io>
When calling setDocument (directly or through the constructor) a delayed
rehighlight is initiated. Previously, if any text was changed before
this rehighlight could run it would cancel the rehighlight, even if the
changed text only caused a new block of text to be highlighted.
Fixes: QTBUG-71307
Change-Id: Ib09b664d90906f5b4427105f0e45469806f3a779
Reviewed-by: Jędrzej Nowacki <jedrzej.nowacki@qt.io>
This check, which was only done once, was wrong:
const int bytes_per_line = ((width * depth + 31) >> 5) << 2;
// sanity check for potential overflows
if (std::numeric_limits<int>::max()/depth < width
If width*height overflows, then it's already UB and checking afterwards
with a division is pointless and slow.
The other instances weren't properly guarding against overflows.
Change-Id: I343f2beed55440a7ac0bfffd1563350d4cfa639c
Reviewed-by: Allan Sandfeld Jensen <allan.jensen@qt.io>
Also clean up QTextCodec usage in qmake build and some includes
of qtextcodec.h.
Change-Id: I0475b82690024054add4e85a8724c8ea3adcf62a
Reviewed-by: Edward Welbourne <edward.welbourne@qt.io>
Reviewed-by: Oswald Buddenhagen <oswald.buddenhagen@qt.io>
These are minor typos or documentation warnings that snuck in with
new features.
Task-number: QTBUG-71502
Change-Id: I03669cfecc3c3d80168ff7b1ca8bca7571e06d25
Reviewed-by: Martin Smith <martin.smith@qt.io>
This part was accidently left disabling after testing the
fallback still worked.
Change-Id: Ic2df939753641a9771e68bc8857c570d356cff44
Reviewed-by: Laszlo Agocs <laszlo.agocs@qt.io>
The opacity set on a QPainter was being ignored for drawImage()/drawPixmap()
calls when rendering to a PDF file through QPdfWriter/QPrinter. This change
fixes it for PDF files v1.4 (default version) or v1.6. For PDF/A-1b files,
opacity will remain ignored to ensure compliance with the specification.
Task-number: QTBUG-70752
Change-Id: I4280e898698e0367dfb4c6ac2cd14ca2bf98850e
Reviewed-by: Oliver Wolff <oliver.wolff@qt.io>
Reviewed-by: Lars Knoll <lars.knoll@qt.io>
Reviewed-by: Friedemann Kleint <Friedemann.Kleint@qt.io>
When we try to gracefully destroy a QOpenGLVertexArrayObject it is not
possible to create an QOffscreenSurface from a thread that is not the
GUI thread. In this case we just need to bail out instead.
The side effect that was seen previously was that there would be a
warning and a deadlock on Windows when closing QQuickWindows that
contained a QQuickPaintedItem backed by a FrameBufferObject render
target (which would be using the OpenGL paint engine) when using the
threaded render loop.
Task-number: QTBUG-70148
Change-Id: I4a20d74d9af850bb90d243212ad9f65c3fc9e616
Reviewed-by: Laszlo Agocs <laszlo.agocs@qt.io>
If a tooltip was shown on an application modal dialog then it would end
up blocking mouse events to the dialog while the tooltip was visible.
Since tooltips are special in this case, they should not cause mouse
events to be blocked.
Fixes: QTBUG-65599
Change-Id: Ibf1729ca4942f5854e4f9687c5586382e23c1c31
Reviewed-by: Richard Moe Gustavsen <richard.gustavsen@qt.io>
There is no sense in testing the 'm_array' pointer against null, as the
memory was allocated using the 'new' operator. The exception will be
generated in the case of memory allocation error.
Task-number: QTBUG-71156
Change-Id: Ib76d16d38d2b0b0c4c9fae3d8d5bdd86af0d08ff
Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
Qt's PDF engine previously supported only the PDF v1.4 standard, which
only allows pages of up to 200x200in (about 5x5m). This patch optionally
enables the generation of PDF v1.6-compliant files that allow the
redefinition of user space units, so that pages of up to 381x381km are
now possible. By default, generated files are compliant to v1.4 spec.
v1.6 compliance must be enabled by, e.g., calling QPrinter::setPdfVersion()
with QPrinter::PdfVersion_1_6. PDF v1.6-compliant files require Adobe
Reader 7.0 or newer (also worked with the built-in viewers in current
versions of Chrome, Firefox and Edge).
Task-number: QTBUG-69386
Change-Id: I21708e0d465d5d7d9e46ff06dd04acfe1dfb0858
Reviewed-by: Friedemann Kleint <Friedemann.Kleint@qt.io>
Reviewed-by: Andy Shaw <andy.shaw@qt.io>
Reviewed-by: Oliver Wolff <oliver.wolff@qt.io>
There is no need to call a memset as long as class is initialized with
new and default-constructor will initialize values.
Change-Id: I02f9ec524e32cb72713f6b5e37b60f3dec72fb28
Reviewed-by: Giuseppe D'Angelo <giuseppe.dangelo@kdab.com>
Reviewed-by: Allan Sandfeld Jensen <allan.jensen@qt.io>
A file with the correct QPicture magic bytes, but shorter than a full
QPicture file header, could cause the header decoder to access memory
out of bounds. Add a size check to avoid.
As a driveby, generally harden the parsing against malformed files.
[ChangeLog][QtGui][QPicture] Fix crash reading malformed picture file
Task-number: QTBUG-71208
Change-Id: I86eb1f915ca9b3a4b91c7433036d76ed6061e2f0
Reviewed-by: Lars Knoll <lars.knoll@qt.io>
'description' is used only once in all configure.json files, so
I assume that was meant to be 'purpose'.
Change-Id: I66e9d9196c27d2f2131c2d57ea03895e8f5ce754
Reviewed-by: Simon Hausmann <simon.hausmann@qt.io>
Reviewed-by: Oswald Buddenhagen <oswald.buddenhagen@qt.io>
The script taken here is a QChar::Script, not a
QFontDatabase::WritingSystem. This means it was passing QChar::Unknown.
Change-Id: I919ae7187ba277346a7719116a94776dce24dd84
Reviewed-by: Eskil Abrahamsen Blomfeldt <eskil.abrahamsen-blomfeldt@qt.io>
According to reports Intel on Windows gets confused when feeding
program binaries retrieved from x86 and x64 builds into each other.
Task-number: QTBUG-64697
Change-Id: Ia7748f532ad06942a92c6fbfc4c9d1ad16bc785a
Reviewed-by: Andy Shaw <andy.shaw@qt.io>
Reviewed-by: Friedemann Kleint <Friedemann.Kleint@qt.io>
Reviewed-by: Andy Nichols <andy.nichols@qt.io>
Before commit 4d15f393a7 update requests
were handled by a timer on QWindow. Therefore they survived the closing
and re-opening of platform windows. Now, as the timer was moved to
QPlatformWindow, it gets reset when you close the QWindow, and any
pending update requests are lost. However, we do set the
updateRequestPending variable on QWindow when requesting an update.
Therefore, we can also restore the update timer on the platform window
when creating it.
Change-Id: I23b00f24a46706beac7d1455edd8a5623db46b22
Fixes: QTBUG-70957
Reviewed-by: Tim Jenssen <tim.jenssen@qt.io>
Reviewed-by: Thomas Hartmann <thomas.hartmann@qt.io>
Reviewed-by: Laszlo Agocs <laszlo.agocs@qt.io>
This was a regression from Qt 4.
Before this patch, we supported filtering events only at QWindowSystemInterface
level, but to properly support filtering in QAbstractEventDispatcher::filterNativeEvent,
we have to filter the events earlier. Now it is possible to enable/disable this
feature for platforms that support native event filtering.
The mapping of which events are user input events were taken from
QWindowSystemInterfacePrivate::EventType.
Task-number: QTBUG-69687
Change-Id: I9a5fb9f999451c47abcdc83fdcc129b5eeb55447
Reviewed-by: Paul Wicking <paul.wicking@qt.io>
Reviewed-by: Allan Sandfeld Jensen <allan.jensen@qt.io>
The pdf engine uses a resource file, but Q_INIT_RESOURCE() was lacking.
Task-number: QTBUG-71070
Change-Id: I685961b3f2eea0ffe6b5313c72d504a8ad9a98e5
Reviewed-by: Lars Knoll <lars.knoll@qt.io>
We need to override this snippet for the documentation
we generate for Qt for Python, and it is easier to have
it on a separate file.
Task-number: PYSIDE-801
Task-number: PYSIDE-691
Change-Id: Ideb5b6af25024279f167137d3b65660bb9c96a7e
Reviewed-by: Topi Reiniö <topi.reinio@qt.io>
QImage's operator>>(QDataStream&) did not set an error mode on the
stream on read failures. That would break QDataStream transactions.
Since the current QImage serialization cannot differentiate between
truncated and corrupted data, we set the ReadPastEnd error as expected
by the transaction system.
Also specify the expected file format on decoding QImage from stream,
to avoid all the format handlers' canRead() being invoked. This is
necessary since some of them may call ungetChar(), which fails when
the stream is in a transaction.
Also add testing of this feature to the QDataStram transaction
autotest. That required a slight rewrite of the fake sequential
QIODevice subclass. The previous implementation had incorrect
behavior of peek(), which is required by QImage decoders.
Task-number: QTBUG-70875
Change-Id: If3f1ca7186ad1e6ca0e6e8ea81d2b2fbece6ea01
Reviewed-by: Alex Trotsenko <alex1973tr@gmail.com>
Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
This fixes qopenglwindow shader in the triangle
Task-number: QTBUG-67338
Change-Id: I8552183bf9ca45e9b56760b340d014ddd34c21f4
Reviewed-by: Laszlo Agocs <laszlo.agocs@qt.io>
Wrong option was used to set zlib compression level for png
setCompression with negative value uses default compression
setCompression with value between 0-100 converts to zlib compression level 0-9
setCompression with positive value overrides Quality option
Change-Id: Ic4b048a1e30d6940019c2a00a6c24d0c11e3f821
Reviewed-by: Alexandra Cherdantseva <neluhus.vagus@gmail.com>
Reviewed-by: Eirik Aavitsland <eirik.aavitsland@qt.io>
When there were additional spaces between the function definition and
the first parameter, the parser failed to parse it when it contained
another function (e.g. 'qlineargradient(... rgb() ...)').
The reason for this was that ::until() needs the function at index-1 so
it can correctly count the opening parenthesis.
Fixes: QTBUG-61795
Change-Id: I992f556e7f8cd45550f83bc90aa8de2b4e905574
Reviewed-by: Richard Moe Gustavsen <richard.gustavsen@qt.io>
A few places we didn't check if detach() succeeded including
in reinterpretAsFormat(), where it can be undone.
Task-number: QTBUG-70785
Change-Id: Ibcc8e26e2961f6288eb7a045ae1cb28e59213a49
Reviewed-by: Eirik Aavitsland <eirik.aavitsland@qt.io>
When viewing "Supported HTML Subset" documentation in Qt Creator (in
QTextBrowser), the first table that lists all tags is quite unreadable
(see images). It happens because there is a code snippet in Comment
column for tag "meta" that uses pre-formatted text. Because it should
not be wrapped automatically, it ends up pushing first 2 columns into
their minimum size, which mostly makes them take a single letter per
row.
Task-number: QTBUG-64126
Change-Id: I08bf6f61806d52e7a2f47bdbed1b5950825ce739
Reviewed-by: Leena Miettinen <riitta-leena.miettinen@qt.io>
Move the checking logic from QGuiApplicationPrivate::_q_updateFocusObject()
to QInputMethodPrivate::objectAcceptsInputMethod(), which is also called
from QWidget::updateMicroFocus() via QInputMethod::update().
Fixes: QTBUG-56767
Change-Id: Ia4cce5e7e766008df891537048d5daf739c010ff
Reviewed-by: Alex Blasche <alexander.blasche@qt.io>
Also fix up the docs.
To make everything more complicated, OpenGL ES 3.2 does not support
default tessellation levels. Therefore the related functions remain
OpenGL 4.0+ only.
[ChangeLog][QtGui] QOpenGLShader has been fixed to expose geometry and
tessellation evaluation/control shaders with OpenGL ES 3.2.
Task-number: QTBUG-66074
Change-Id: I2e4277912800d8302824e3fb74f61ec16f4b341d
Reviewed-by: Paolo Angelelli <paolo.angelelli@qt.io>
Reviewed-by: Andy Nichols <andy.nichols@qt.io>
When a QTextCursor survives its QTextDocument, the internal
QTextDocumentPrivate pointer is set to null. There are checks for
this in all the QTextCursor functions to skip out early if such
a QTextCursor is used.
However, when executing the "if (d->priv)" condition in setters,
this will access the non-const operator->() of QSharedDataPointer
and detach the QTextCursorPrivate, and in the copy constructor of
this class, there was an unprotected call into priv->addCursor().
In theory, we could cast all the checks for d->priv to avoid
detaching, but in practice this doesn't matter, since the setters
will typically detach anyway later on.
[ChangeLog][QtGui][Text] Fixed a crash that can happen when calling
a setter on a QTextCursor after its QTextDocument has been deleted.
Task-number: QTBUG-70293
Change-Id: I8f6dc5bb344d1d824f673c0c220b68b7fee237a8
Reviewed-by: Konstantin Ritt <ritt.ks@gmail.com>
Reviewed-by: Simon Hausmann <simon.hausmann@qt.io>
Fixes the rest of the places we use the pattern of emptying the OpenGL
error stack to be able to handle GL_CONTEXT_LOST, and adds a note about
it in the documentation.
Change-Id: I7eb97dbca45f39295b832d44937023b538b19947
Reviewed-by: David Edmundson <davidedmundson@kde.org>
Reviewed-by: Laszlo Agocs <laszlo.agocs@qt.io>
New API in QMessageDialogOptions and implementation on Android.
Task-number: QTBUG-35545
Change-Id: I59567251199f220862d01ba76979266379eecd86
Reviewed-by: Shawn Rutledge <shawn.rutledge@qt.io>
Reviewed-by: Ulf Hermann <ulf.hermann@qt.io>
Before asking a image format handler to save an image, QImageWriter
sets the value of all supported options. For options like quality and
gamma, the default value is an illegal value (-1 and 0.0 resp.),
effectively telling the handler that the application has not requested
any particular value. But in the case of compressionratio, the default
was 0, a legal value. Fix by changing it to -1.
Change-Id: Iad6d4c2dbe269b25863e7d4967aa9ed2a7d1247f
Reviewed-by: Allan Sandfeld Jensen <allan.jensen@qt.io>
Initialize the lastDir properly, to avoid the stroking algorithm doing
direction-change handling for a single line. That could cause a cap to
be painted for a single FlatCap line.
Also fixes a bug in tst_qpainter, revealed by the above fix. The
result drawPolyline was erroneously compared to the result of drawing
the lines individually, for a case where the former correctly paints
the pixel of the join point in the corner, while the latter by
coincidence used to paint the same pixel as a cap because of the bug
above.
Task-number: QTBUG-70101
Change-Id: Ie20eda33214cfe9e7627f17ef4c7a5b3835c9c24
Reviewed-by: Lars Knoll <lars.knoll@qt.io>
Fixes a speed regression on ARGB32 painting on low end hardware
introduced when it was switched to using the RGB64 raster routines.
It turns out several of our embedded QPA targets use ARGB32 as native
format.
Task-number: QTBUG-69724
Change-Id: I6d7993c12da46a85b8354eb905930dae9602b5e6
Reviewed-by: Lars Knoll <lars.knoll@qt.io>
Stencil is - very likely - cleared just like depth. Also, switch to
STORE_OP_STORE for the multisample buffer, for correctness.
Change-Id: I31b56658286205af8551018115ca2abbe541be67
Reviewed-by: Andy Nichols <andy.nichols@qt.io>
Running with QT_VK_FORCE_STAGE_TEX does not work at all with recent
NVIDIA drivers due to QVulkanWindow's and the example's naive way of
picking the memory index. Enhance this and add a warning note to the
QVulkanWindow docs as well.
Change-Id: I7f200e11d982b56e3da3b71ee3915bd7bfca5cc1
Reviewed-by: Andy Nichols <andy.nichols@qt.io>
After convert and fetch were split, only convert was still NEON
vectorized, while fetch is the more commonly used version.
Change-Id: Iea2af7ccee6589b3d6e9908afeaae2d1ad2753be
Reviewed-by: Eirik Aavitsland <eirik.aavitsland@qt.io>
As transform() returns worldTransform(), point out that it is an alias
in its description.
Fixes: QTBUG-18117
Change-Id: I0eb1f78c6955b499906024105f9969cdccf13303
Reviewed-by: Martin Smith <martin.smith@qt.io>
Make the decoder fail early to avoid spending time and memory on
attempting to decode a corrupt image file.
Change-Id: I874e04f3b43122d73f8e58c7a5bcc4a741b68264
Reviewed-by: Lars Knoll <lars.knoll@qt.io>
Instead of doing it up front and then restoring the current context
if the makeCurrent call failed.
By delaying the update, QPlatformOpenGLContext::makeCurrent has the option
to check which context was current before the call.
Change-Id: I458f5c00d7c820acbe2f8552b0513fce99b9b683
Reviewed-by: Morten Johan Sørvig <morten.sorvig@qt.io>
Reviewed-by: Laszlo Agocs <laszlo.agocs@qt.io>
The case of the platform context failing makeCurrent is the exception.
Change-Id: I606e6fb379f84e886bff9e27355dda9b31ff9ebe
Reviewed-by: Morten Johan Sørvig <morten.sorvig@qt.io>
Reviewed-by: Laszlo Agocs <laszlo.agocs@qt.io>
Before this fix, QStandardItemModel::itemData returns
a map containing role 255 which is used internally to store the flags.
This role is an undocumented implementation detail so it should
not be returned to the user.
[ChangeLog][QtGui][QStandardItemModel] itemData does not return role 255
Change-Id: Ibead3cba84cfe92b3c664bc8ce87508cbcbdc9bd
Reviewed-by: David Faure <david.faure@kdab.com>
Applying the transformation in question has no effect on the winding
order. Rewrite that section.
While all the examples are correct, clarify the rules for the geometry
they use since the winding order varies. Fix up the triangle example code
to use front=CCW for clarity (even though it does not matter much since
culling is off there).
Change-Id: Icb968c76cc9fa918a5608d3c66b4fccd5668175e
Reviewed-by: Christian Stromme <christian.stromme@qt.io>
They were incorrectly attempted to be read as Indexed8, instead use
the RGBA64 formats to read them with full accuracy.
Task-number: QTBUG-45858
Change-Id: I14fc3cb0d59fa2fc0e68fd870f3b32352c34161f
Reviewed-by: Eirik Aavitsland <eirik.aavitsland@qt.io>
Snap now uses xdg-desktop-portal for portal support. Add check for apps
running in Snap and make them use portals by default. We also should be
using different name for the platform theme used by sandboxed apps.
Change-Id: Ibaa35b7549b3d94775d7edb937f729a300d071b6
Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
These fake mouse events should be synthesized by QtGui, not the QPA plugin,
when the tablet/touch events are not handled by the application and the
Qt::AA_SynthesizeMouseForUnhandledTouchEvents or
Qt::AA_SynthesizeMouseForUnhandledTabletEvents flags are set.
Task-number: QTBUG-47007
Task-number: QTBUG-60437
Change-Id: I4d6d5e6667d245c45a4eb4f3a94db05cf9772f52
Reviewed-by: Shawn Rutledge <shawn.rutledge@qt.io>
Reviewed-by: Romain Pokrzywka <romain.pokrzywka@gmail.com>
Reviewed-by: Jan Arve Sæther <jan-arve.saether@qt.io>
Reviewed-by: Friedemann Kleint <Friedemann.Kleint@qt.io>
Short-cuts the case where there is no gamma correction to avoid a
conversion over RGBA64 and back.
Change-Id: I100697a9f7a4b94283557b2c0eaa45e0eff81785
Reviewed-by: Lars Knoll <lars.knoll@qt.io>
This is the squashed diff from wip/webassembly to dev.
Done-with: Peng Wu <peng.wu@intopalo.com>
Done-with: Sami Enne <sami.enne@intopalo.com>
Done-with: Morten Johan Sørvig <morten.sorvig@qt.io>
Started-by: Andrew Knight <andrew.knight@intopalo.com>
Change-Id: I6562433c0a38d6ec49ab675e0f104f2665f3392d
Reviewed-by: Lorn Potter <lorn.potter@gmail.com>
Reviewed-by: Eskil Abrahamsen Blomfeldt <eskil.abrahamsen-blomfeldt@qt.io>
When building with warnings are errors for Android with gcc 4.9,
it wrongfully fails on use of uninitialized variable.
Change-Id: I39c5e8413c30567fba60cbba6a8b26d537c5836e
Reviewed-by: Konstantin Ritt <ritt.ks@gmail.com>
Avoid reading a pixel outside the image even if we multiply the result
by 0. This mirrors a similar old fix in the the 32bit scaling path.
Change-Id: I7860bc808dc46dbc94918672e99c81b56d4a1d27
Reviewed-by: Simon Hausmann <simon.hausmann@qt.io>
Under certain circumstances, if you had a widget with a QOpenGLPaintEngine,
and drew QStaticText into this, and then later had Qt Quick access the same
cache and try to resize it, we would get a crash because the resize function
would have a pointer to the paint engine and try to access its shader manager
(which would now be null, since this is outside the begin()/end() phase of the
paint engine.
The solution is to reset the paint engine pointer to null on the cache once it
has been populated and it is no longer needed.
[ChangeLog][QtGui][Text] Fixed a possible crash when combining QStaticText,
QOpenGLWidget and Qt Quick in the same application.
Task-number: QTBUG-70096
Change-Id: I7383ad7456d1a72499cfcd2da09a5a808d4b3eff
Reviewed-by: Simon Hausmann <simon.hausmann@qt.io>
One trick that is possible to do with QImage is to make it be sub image
of its imagedata by manipulating the data start and bytes-per-line,
we can not upload that directly and need to detect the case and create
a clean copy to upload.
Task-number: QTBUG-70105
Change-Id: I7ce184a0892fb4071b6dcc1a1fd3881a4e0703cd
Reviewed-by: Simon Hausmann <simon.hausmann@qt.io>
Reviewed-by: Liang Qi <liang.qi@qt.io>
Do not try using SSSE3 if the compiler do not support it.
(see 648ee7aa02).
Task-number: QTBUG-50804
Change-Id: I489b0bbacfde0c647c9d5b71ca3de992d7dc8878
Reviewed-by: Friedemann Kleint <Friedemann.Kleint@qt.io>
It's possible to use vcpkg using the -I and -L arguments, but
some of their libraries have different names than what we look for
during configure, so add in those variations.
Change-Id: Iee37197228cc0f15442ecd7ec4fc761f4d526e1d
Reviewed-by: Oswald Buddenhagen <oswald.buddenhagen@qt.io>
Declare rbSwap<QImage::Format_RGBA8888>, so we don't end up in a
fallback definition not used by little-endian.
Task-number: QTBUG-69951
Change-Id: I8512bba76da7d59a27593d37c70283d881c3e8fc
Reviewed-by: Shawn Rutledge <shawn.rutledge@qt.io>
According to MSDN, AltGr key presses are sent as a
sequence of SYS left Ctrl + right Alt.
Add an option to detect AltGr as modifier key.
Task-number: QTBUG-69317
Change-Id: I30ce169d2e6dbbae194ff714abfbc732b53652ce
Reviewed-by: Oliver Wolff <oliver.wolff@qt.io>
This allows apps that know their icons are
in a given icon theme to set that theme as
fallback, so in case the user theme does
not include them, the icons can still be found.
This solves the problem of missing icons
that often happens when running KDE applications
on a GNOME desktop.
Change-Id: I4e5543d598012352a29ff79dab0357506d986b6d
Reviewed-by: Dominik Haumann <dhaumann@kde.org>
Reviewed-by: Shawn Rutledge <shawn.rutledge@qt.io>
QRegularExpression doesn't offer a direct equivalent of QRegExp's exact
match.
There are several places in the Qt sources that use this feature. This
patch implements a small helper function that builds the expression as
recommended in the documentation and updates the related code.
[ChangeLog][Core][Tools] QRegularExpression now provides
anchoredPattern() which is a helper function to build regular
expressions used for exact matching.
Change-Id: Idbbf142c4c5cb9b62abf8229f4ce85fd4409e5d0
Reviewed-by: Oswald Buddenhagen <oswald.buddenhagen@qt.io>
Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
We detect if there's an upcoming momentum phase using the same trick
used by e.g. Mozilla in their event handling: https://tinyurl.com/yd8lcs4l,
and as recommended by an Apple engineer: https://tinyurl.com/y8yytlgv
The event is not guaranteed to be in the queue, but in practice it seems
to be. If this assumption fails we can add a wait timeout to the event
search instead of using [NSDate distantPast] as a timeout (which only
looks at queued events).
When the momentum phase is detected, QWheelEvent::phase will have the
new ScrollMomentum value, and the phase transitions will be
ScrollBegin -> ScrollUpdate -> ScrollMomentum -> ScrollEnd.
We no longer send ScrollEnd to signify that the user's fingers have
been lifted off the trackpad; rather, the first event with ScrollMomentum
phase means that the fingers have been lifted and macOS is now sending
simulated-momentum events.
This means ScrollEnd is a reliable indicator that the entire scroll
gesture (both the user interaction and the momentum) has ended.
If the ScrollMomentum phase is skipped, it means the user's fingers
came to rest before being lifted, so there is no momentum. In that case
the transitions will be ScrollBegin -> ScrollUpdate -> ScrollEnd.
Task-number: QTBUG-63026
Task-number: QTBUG-65160
Change-Id: I80191a472f6fa892387004c199166a6350124274
Reviewed-by: Shawn Rutledge <shawn.rutledge@qt.io>
Fixes a regression introduced with the update to the bidi
algorithm.
Task-number: QTBUG-69633
Change-Id: I7eac45ed3ffb41f89ea3f793eedcfb6fcdace871
Reviewed-by: Eskil Abrahamsen Blomfeldt <eskil.abrahamsen-blomfeldt@qt.io>
Don't show the mark simply because we have unicode code points
larger than 0x590.
Task-number: QTBUG-69665
Change-Id: I9af97383f3bcd52277a5288e7ad06ec240c7e51c
Reviewed-by: Eskil Abrahamsen Blomfeldt <eskil.abrahamsen-blomfeldt@qt.io>
After the behavior of setItemData has been changed following QTBUG-45114,
QStandardItemModel was lacking an interface to clear all the data from a single index.
Task-number: QTBUG-69616
Change-Id: Ide0b5bb6358439fc42c474df8b044fbace6def8d
Reviewed-by: André Hartmann <aha_1980@gmx.de>
Reviewed-by: David Faure <david.faure@kdab.com>
Add it to configure.json and replace all occurrences of QT_NO_THREAD
with QT_CONFIG(thread). Add conditions for other features that depend
on thread support. Remove conditions where we can use the QMutex and
QThreadStorage stubs.
Change-Id: I284e5d794fda9a4c6f4a1ab29e55aa686272a0eb
Reviewed-by: Eskil Abrahamsen Blomfeldt <eskil.abrahamsen-blomfeldt@qt.io>
When glGetError returns GL_CONTEXT_LOST, on XCB + Nvidia at least, the
error does not get cleared until the next successful
glGetGraphicsResetStatus.
We can't handle this properly until the start of the next frame where we
will hopefully have a valid context, but in the meantime we should avoid
locking up completely.
Change-Id: Id438d44d83b926e1f3e4281ca3704231bf1a23cf
Reviewed-by: Allan Sandfeld Jensen <allan.jensen@qt.io>
Change-Id: Id0118e44e1ed44fecdd803dbc57ca0588a1afec0
Reviewed-by: Leena Miettinen <riitta-leena.miettinen@qt.io>
Reviewed-by: Martin Smith <martin.smith@qt.io>
Reviewed-by: Tor Arne Vestbø <tor.arne.vestbo@qt.io>
We now include the phase, which is helpful, and we distinguish between
modern wheel events with a pixel and/or angle delta, and compatibility
events sent from QWindowSystemInterface::handleWheelEvent with the old
Qt 4 single value delta and orientation.
Change-Id: I2efe9fe7a55c43240ec94bfa70cafaac6d52603c
Reviewed-by: Shawn Rutledge <shawn.rutledge@qt.io>
Reviewed-by: Tor Arne Vestbø <tor.arne.vestbo@qt.io>
Expands the existing conversions for ARGB32<->RGB30 to also handle
RGBA8888 to avoid any performance regression of the 16bpc conversion
path.
Change-Id: I34e519a04276b0e7ff00c6125ba06c889045d2ac
Reviewed-by: Eirik Aavitsland <eirik.aavitsland@qt.io>
While the property is deprecated, we should still set it, even in the
legacy free constructor. The window system never sends x and y changes
at the same time, so either coordinate will be null, therefor add them.
This should restore the old behavior.
Task-number: QTBUG-69089
Change-Id: Ie329cb4196f53c70b25934cbbac5e2e48c65d2b3
Reviewed-by: Mitch Curtis <mitch.curtis@qt.io>
This update corrects several minor documentation errors that
cause qdoc warnings. These include incorrect or missing \fn
commands, incorrect uses of \e and \a commands together,
incorrect spellings, etc.
Change-Id: Ib26edef541fa3440025490bcf79cc101623e7f7b
Reviewed-by: Martin Smith <martin.smith@qt.io>
On macOS we pull out all the modifiers up front, which in the case
of incomplete key sequences such as "Meta+Shift+" will result in
an empty string as a result. The cross-platform code does not
handle that case, so we need to exit early.
This fixes an assert in tst_QKeySequence::parseString().
An assert has been added to QKeySequencePrivate::decodeString()
to make the assumption about the 'accel' argument explicit.
Change-Id: I135e62f9051a8b899202e5fb224b5d3c77bf2062
Reviewed-by: Tor Arne Vestbø <tor.arne.vestbo@qt.io>
Adds support for 16bit per color image formats in QImage. This makes it
possible to read and write 16bpc PNGs, and take full advantage of the
16bpc paint engine.
[ChangeLog][QtGui][QImage] QImage now supports 64bit image formats with
16 bits per color channel, compatible with 16bpc PNG or RGBA16 OpenGL
formats.
Task-number: QTBUG-45858
Change-Id: Icd28bd5868a6efcf65cb5bd56031d42941e04099
Reviewed-by: Allan Sandfeld Jensen <allan.jensen@qt.io>
When showing line and paragraph separators at an offset from the start
of the string, the end of string pointer would be incorrectly set, and
we would read past the end of the string. If any part of this memory
happened to match the line or paragraph separator, then we would
overwrite it and have a crash.
I couldn't find any reliable way to test this, since the crash depends on
the contents of the memory after the string allocated by the algorithm.
But with an overflow of 100 000 characters, I found that it crashed every
time I ran the test.
[ChangeLog][QtGui][Text] Fixed potential crash when using
QTextOption::ShowLineAndParagraphSeparators.
Task-number: QTBUG-69661
Change-Id: I17d1996b883560bacdc7ce114c8aeb2b0108faea
Reviewed-by: JiDe Zhang <zccrs@live.com>
Reviewed-by: Michal Lazo <xlazom00@gmail.com>
Reviewed-by: Konstantin Ritt <ritt.ks@gmail.com>
Off-by-one bug in the validity test of the texture type field.
Change-Id: I46ded85a0ad93166aa886e71f0c391f27e79f64f
Reviewed-by: Jesus Fernandez <Jesus.Fernandez@qt.io>
Need to include <QSize> for operator<<(QDebug, const QSize &).
Change-Id: I4857e9b43918243af66cc09ff352619595c081c9
Reviewed-by: Jesus Fernandez <Jesus.Fernandez@qt.io>
I could have placed the class in an unnamed namespace. That would
mark the member function as a local symbol too. But I preferred to
move outside so I could make it static.
Change-Id: Ie01831ddac5446fdbdeefffd154688c0883ed653
Reviewed-by: Edward Welbourne <edward.welbourne@qt.io>
Unnamed namespaces and static are great tools. Use them.
Change-Id: Ie01831ddac5446fdbdeefffd15468b3acb3ced79
Reviewed-by: Kai Koehne <kai.koehne@qt.io>
Reviewed-by: André Hartmann <aha_1980@gmx.de>
Reviewed-by: Edward Welbourne <edward.welbourne@qt.io>
Returns an ARGB32_Premultiplied image when the framebuffer
is grabbed on a transparent QOpenGLWidget or QOpenGLWindow.
Task-number: QTBUG-55245
Change-Id: I4b7778ecc38275be1ed9fb748c77c7e1f6b65a00
Reviewed-by: Tor Arne Vestbø <tor.arne.vestbo@qt.io>
The platform may emit screen changes for child windows before top-level
windows, so we need to update the top level screen as soon as possible.
Change-Id: I090c620725c9c3171f5b038708d78ddfeec8512d
Reviewed-by: Lars Knoll <lars.knoll@qt.io>
Reviewed-by: Tor Arne Vestbø <tor.arne.vestbo@qt.io>
A typo meant the color-table was not fixed. For safety fallback colors
are also made opaque.
Change-Id: I3e609882177604910c4343c86f00221a89af9078
Reviewed-by: Eirik Aavitsland <eirik.aavitsland@qt.io>
The fast image blending is only used for SourceOver composition, but
several of our embedded backends make heavy use of Source composition
which doesn't have a short-cut. This patch adds a blitting short cut
that works in those cases.
Task-number: QTBUG-69724
Change-Id: Icc61a67cc27bc83863153d69cae60dd986d26f69
Reviewed-by: Lars Knoll <lars.knoll@qt.io>
The rest of the RGB64 routines were optimized, but the loading of RGB32
was not as it was originally not used much, but with ARGB32 using the
RGB64 backend, it is essential for decent performance.
Task-number: QTBUG-69724
Change-Id: I1c02411ed29d3d993427afde44dfa83689d117e0
Reviewed-by: Lars Knoll <lars.knoll@qt.io>
The ppm format specifies that the maximum color value field must be
less than 65536. The handler did not enforce this, leading to
potentional overflow when the value was used in 16 bits context.
Task-number: QTBUG-69449
Change-Id: Iea7a7e0f8953ec1ea8571e215687d12a9d77e11c
Reviewed-by: Lars Knoll <lars.knoll@qt.io>
Use platform window directly for setting a mask to prevent bitmap
scaling if pixmap and window DPR are the same.
Amends: 42f788ffe2
Task-number: QTBUG-61948
Change-Id: I5eec85c01f20bdefff7343e83ff10cbcb2c79508
Reviewed-by: Shawn Rutledge <shawn.rutledge@qt.io>
Using QTextCursor::Left and QTextCursor::Right moves the cursor visually to right or
left, which does not work with Right to left text, where moving left means advancing to
the next character, and vice versa.
By using QTextCursor::PreviousCharacter and QTextCursor::NextCharacter we leave it up to
the engine for deciding where to move depending on the context.
Task-number: QTBUG-50619
Change-Id: Ibf0a886f3ff6bf9ca2c953aeff8c235612bbc01d
Reviewed-by: Eskil Abrahamsen Blomfeldt <eskil.abrahamsen-blomfeldt@qt.io>
The emulation was not working since the vertices are clamped before
getting to the fragment shader. So instead just resize the brush if
not supported.
Change-Id: I856e47890cd3021874b77d869a6ff7162cadde10
Reviewed-by: Tor Arne Vestbø <tor.arne.vestbo@qt.io>
Reviewed-by: Laszlo Agocs <laszlo.agocs@qt.io>
Turns out on OpenGL ES, only the GL_RGB10_A2 form is allowed as a
render buffer storage format.
Change-Id: I42915b61835167ae457aae91da7e75065dd3eb21
Reviewed-by: Laszlo Agocs <laszlo.agocs@qt.io>
This way the logic can be reused elsewhere.
At the same time a standard OpenGL ES/3 way of handling BGRA is added,
so we don't depend on extensions, and handling of NPOT and max size
which QSGTexture will need.
Change-Id: I475bc7127f44be3964fdb482c9e86a20db1fbca5
Reviewed-by: Laszlo Agocs <laszlo.agocs@qt.io>
The ascending variable was a leftover from an old implementation. Now
it's not needed anymore. It's safe to remove it, and the condition can
be removed as well.
Amends commit 699e8fe3a6
Coverity-Id: 11004
Change-Id: I003b7016e9bd3bd523fb70ed4de84211ec840a78
Reviewed-by: Simon Hausmann <simon.hausmann@qt.io>
Reviewed-by: Samuel Gaist <samuel.gaist@idiap.ch>
In an unrelated change, it seems \internal \obsolete
can cause unexpected behavior when generating the
documentation. Adding this line break should fix that.
Change-Id: I95eceb109faaf89be8f258fba8c31008fdc4ca57
Reviewed-by: Topi Reiniö <topi.reinio@qt.io>
Add a framework for reading and decoding stored graphical texture file
formats. Includes decoders for the PKM and KTX formats.
This is basically the same texture file reading that was added to
qtdeclarative for 5.11, but has been refactored to be independent of
the scenegraph and opengl.
Task-number: QTBUG-67026
Change-Id: I87d8117550d8a2112f4f58c03e9ac6b3249cbc5a
Reviewed-by: Kai Koehne <kai.koehne@qt.io>
Reviewed-by: Laszlo Agocs <laszlo.agocs@qt.io>
ObjectBoundingMode has inconsistent behavior and is deprecated in
favor of ObjectMode.
Change-Id: I748f6283f3db5869bb9a67c08bf5f16abc6f95b0
Reviewed-by: Tor Arne Vestbø <tor.arne.vestbo@qt.io>
Now all files that use QInternalMimeData include
qinternalmimedata_p.h, and we can remove the transitioning include
from qdnd_p.h
Change-Id: I6c86cb6a5bd73076e5dd3bafc01861b75ab83845
Reviewed-by: Gatis Paeglis <gatis.paeglis@qt.io>