We're either using harfbuzz-ng or disable shaping now.
Change-Id: Ia80bc4671efb20eabb35d7560abc774cdad7f424
Reviewed-by: Konstantin Ritt <ritt.ks@gmail.com>
Copy the relevant harfbuzz code over from Harfbuzz into qunicodetools.cpp
This is basically the attribute functions from the different harfbuzz
shapers. Those methods do not require any font support but operate
purely on unicode input data.
Adjusted the code to use Qt's own data structures and enums (QChar::Script
and friends) instead of the harfbuzz equivalents.
The code is 100% copyright The Qt Company, so we can do this without
requiring any attribution.
Change-Id: I8262ba34eae1837f031f07d1b6d9917c0224e160
Reviewed-by: Konstantin Ritt <ritt.ks@gmail.com>
This avoids one additional copy of data that we've been doing before.
Change-Id: I3fae0ebe0cded632b41fdcf7efc01d5c7f2dc181
Reviewed-by: Konstantin Ritt <ritt.ks@gmail.com>
This implements the core value based property binding system with
automatic dependency tracking. More features are to be added later, and
the documentation will need further improvements as well.
Change-Id: I77ec9163ba4dace6c4451f5933962ebe1b3b4b14
Reviewed-by: Qt CI Bot <qt_ci_bot@qt-project.org>
Reviewed-by: Fabian Kosmale <fabian.kosmale@qt.io>
Simplify the handling of simd specific sources. The previous
implementation was causing simd instructions to bleed into the main
library.
The tests were failing because the avx instruction were leaking into
Qt6Gui due to the previous problem. This in turn caused any test which
required Qt6Gui code run to crash since it is not possible to run avx
instruction in the VMs.
This patch also disables PCH for the simd sources as they result in
warnings related related to using PCH header not compiled for the
architecture in question. The latter can cause the build to fail in
conjunction with warnings as errors.
Change-Id: I1be98f2f5e967f33793d6a2e6134a24ef1709566
Reviewed-by: Alexandru Croitor <alexandru.croitor@qt.io>
Reviewed-by: Leander Beernaert <leander.beernaert@qt.io>
DBus does have dbus-1.13.* releases these days, as well as its stable
1.12.* releases, but there's no change in the fragments we've
extracted from its headers, since the last (1.12.12) release we
checked against. We're thus in sync with 1.12.16 and 1.13.12.
Fixes: QTBUG-82748
Change-Id: Ic550e3cd7486db712643711d010f5b45c347a95b
Reviewed-by: Volker Hilsheimer <volker.hilsheimer@qt.io>
This is a follow-up to commit ebb0212133.
The day name data appeared twice in the XML files.
Skip the second copy, saving 8.8% of the intermediate file-size.
This makes no change to generated QLocale data.
Change-Id: Ic2cc543a2a85cbb1d2d47ebac7df4fa9ad6ee0a7
Reviewed-by: Lars Knoll <lars.knoll@qt.io>
qt_builtin_ctz is unfortunately not constexpr on MSVC, so the whole
function cannot be used in constexpr contexts, unless v is exactly 0. As we
don't have std::is_costant_evaluated until C++20, we need to introduce a new
helper function, which always works in constexpr contexts.
Change-Id: I36290acb61e430d6bdb3da112a9b2263be4b9fbf
Reviewed-by: Tor Arne Vestbø <tor.arne.vestbo@qt.io>
Reviewed-by: Lars Knoll <lars.knoll@qt.io>
Wasm does not use minimal, offscreen or qvnc platform plugins.
Change-Id: I3a1919a260280ffdff33b68502d488f71f2b0c13
Reviewed-by: Morten Johan Sørvig <morten.sorvig@qt.io>
qDecodeMYSQLType() did not handle FIELD_TYPE_GEOMETRY and therefore the
type for a POINT column was incorrectly treated as QVariant::String.
Even the type can not (yet) be properly decoded to a QPoint, treating it
as QVariant::ByteArray is the better option here.
Fixes: QTBUG-72140
Change-Id: I12e75b326ae3acb75cb36f2e650464528bd43c0e
Reviewed-by: Andy Shaw <andy.shaw@qt.io>
The data structure relies on stable nodes in QHash, something that
is not guaranteed in Qt 6 anymore.
Change-Id: I9077ed404ee922893099f5eaae76d2dcea414090
Reviewed-by: Tor Arne Vestbø <tor.arne.vestbo@qt.io>
The command is deprecated and has no effect apart from generating
a documentation warning.
Change-Id: I30871bfd6975f8268930cce99993a8579242fdb8
Reviewed-by: Paul Wicking <paul.wicking@qt.io>
The app or its dependencies may link against X11's libGL.1.dylib from
XQuarz, to support GLX on macOS. Doing so may place libGL earlier in
the load order than Apple's OpenGL framework, which results in dlsym
picking symbols from libGL when using the RTLD_DEFAULT lookup strategy,
breaking Qt's OpenGL support in various ways:
QOpenGLShaderProgram: could not create shader program
Warning: "" failed to compile!
To fix this we use RTLD_NEXT, which looks up the symbol in
dependency order of the image that called dlsym, rather than
the global load order.
Change-Id: I1ec3055a4ab0bb96566c7e196d301b30785f2dc0
Reviewed-by: Tor Arne Vestbø <tor.arne.vestbo@qt.io>
This patch adds native iOS file open and directory picking support for
the QFileDialog using the iOS UIDocumentPickerViewController class.
Change-Id: Ia724a59742650a01c62067aed3477f82ab1fd546
Reviewed-by: Tor Arne Vestbø <tor.arne.vestbo@qt.io>
The code had not been touched in a very long time and was overgrown
with weeds from pre-QPA times.
We no longer maintain an indirection through QSystemTrayIconSys,
which was a remnant from Qt 4 times.
The Objective-C helper class used for callbacks has been slimmed
down to just a simple delegate, with the actual work done in the
QCocoaSystemTrayIcon implementation, further reducing indirection.
We no longer use a custom NSView for the status bar item, something
that has been deprecated for a long time. Instead we set properties
on the NSStatusItem's button. This gives us automatic support for
drawing the icon with the right highlight, including in dark mode.
Finally, the code has been updated to modern Objective-C syntax.
Change-Id: I59706081f6b179035b8216a7a6ebc08a47cec127
Fixes: QTBUG-77189
Reviewed-by: Volker Hilsheimer <volker.hilsheimer@qt.io>
Include WordBreakTest.html, since a test uses sample strings from it,
albeit without actually reading the file.
Had to comment out more of the new tests, as at Revision 24, pending
an update to harfbuzz and the text boundary detection code.
Task-number: QTBUG-79631
Task-number: QTBUG-79418
Task-number: QTBUG-82747
Change-Id: I0082294b09d67ffdc6a9b5c15acf77ad3b86f65f
Reviewed-by: Lars Knoll <lars.knoll@qt.io>
This allows QMap to hold more than 2^31 entries on 64 bit systeems.
Change-Id: Ia6abd3441f9bc0c7e1a01b78726b5c32209542fa
Reviewed-by: Mårten Nordheim <marten.nordheim@qt.io>
Allow for more than 2^31 items and large offsets.
Change-Id: I42f7bf20ce0e4af43dbb2e2083abf0e232e68282
Reviewed-by: Mårten Nordheim <marten.nordheim@qt.io>
Provide move semantics for QContiguousCache. Do further cleanup of the
code and avoid special casing for complex typeinfo where it won't
make a difference anyway.
Change-Id: I9bd261aec21be7a050e04f5b3a1f0b8e1d94c064
Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
Reviewed-by: Mårten Nordheim <marten.nordheim@qt.io>
Remove the union being used to hold the d-pointer, as accessing both
members of the union on the same data is technically undefined behavior.
Change-Id: Ia5a063d97538222575a47e9462c0675acdf32aef
Reviewed-by: Sona Kurazyan <sona.kurazyan@qt.io>
Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
To allow seeing the exact compiler flags when build in Coin.
We do the same for qmake builds.
Change-Id: I8c43f35b95d722d914aaeaa8860720a3a0578737
Reviewed-by: Leander Beernaert <leander.beernaert@qt.io>
Reviewed-by: Alexandru Croitor <alexandru.croitor@qt.io>
The exported INTERFACE_LINK_LIBRARIES property now looks a lot more
sane.
Change-Id: I093fcb242607023dd0b103298562b299cb803028
Reviewed-by: Leander Beernaert <leander.beernaert@qt.io>
Reviewed-by: Alexandru Croitor <alexandru.croitor@qt.io>
Return the value from handleWindowSystemEvent so platform plugins can
detect whether it was accepted or not.
Change-Id: I53ffb713afc8e0ec1789107c912433133cfaa11a
Reviewed-by: Tor Arne Vestbø <tor.arne.vestbo@qt.io>
The functions take QStringView now. The ones taking QString can
be implemented inline (BC break). Drive-by change, use
qToStringViewIgnoringNull.
Change-Id: Ia3089c574446418e5ab93e08e21869ef19fbfbfd
Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
QRandomGenerator is now used to seed QHash, so the comment
is wrong.
Change-Id: Ic50fe95ea4169b55290cc758f5aebfbb0a3ea085
Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
The default Info.plist shipped with CMake lacks an NSPrincipalClass
entry, which is crucial for making macOS apps run in full resolution
on retina screens.
We make sure the file is only picked up on macOS, not iOS and friends,
since those platforms require another principal class. If needed we can
extract the value out as a CMake variable and use the same file for all
Apple platforms. Doing so would assume all keys are single-platform
only, so if that's not the case we need platform-specific files.
We should probably extract the package type out as a variable too,
so that the file can be used for both apps, plugins, and frameworks,
but doing so requires setting up that variable somewhere based on
the target type, which CMake doesn't allow in an easy way.
The file itself is based on the file CMake ships, combined with
keys inherited from Qt's existing plist templates for qmake, and
adjusted to match what Xcode generates by default these days.
Change-Id: I3f5109e5fff63cdbd109a99d4008948d4bd2102b
Reviewed-by: Alexandru Croitor <alexandru.croitor@qt.io>
The effect of this is that QIcon::pixmap() will/may
return a pixmap larger than the requested size (with
an appropriate devicePixelRatio set), suitable for
high-dpi displays.
Many use cases, such as painting the image with QPainter,
will be unaffected by this change. User code which e.g.
iterate over image pixels may have to be updated.
Change-Id: I63e867cc1e3f2a0b5cad92e1ffab4fe4de33ae19
Reviewed-by: Tor Arne Vestbø <tor.arne.vestbo@qt.io>
Make the copy explicit.
qhighdpiscaling_p.h:282:24: warning: loop variable 'rect' has type
'const QRectF &' but is initialized with type 'const QRect' resulting
in a copy [-Wrange-loop-analysis]
for (const QRectF &rect : pixelRegion) {
^
Change-Id: I4080ff42c41e464d081ab2b01cb2d010867b041b
Reviewed-by: Friedemann Kleint <Friedemann.Kleint@qt.io>
When shaping is disabled we also skipped the step which set
dontPrint to true for soft hyphens, line separators, and
similar characters. This caused boxes to appear in text with
e.g. line separators.
There is a minor modification to the code that is moved:
In the case on unshaped text and only the CMAP able is used,
the font engine for the soft hyphen can be a fallback engine,
so we need to also set the correct engine index when changing
the glyph index.
[ChangeLog][QtGui][Text] Fixed an issue with QFont::PreferNoShaping
where boxes would appear in place of unprintable characters.
Fixes: QTBUG-81994
Change-Id: Ifc9f4f89d928475ca0487a92b4480bd5db5918fd
Reviewed-by: Konstantin Ritt <ritt.ks@gmail.com>
Reviewed-by: Lars Knoll <lars.knoll@qt.io>
The link is actually a self-reference; setCurrentSection() is setter
for the currentSection property, and has no dedicated documentation.
Change-Id: I4977650566913c590d46aede92d8678b7b7ea291
Reviewed-by: Paul Wicking <paul.wicking@qt.io>
Replace ${QT_SOURCE_TREE} with top level project directory when
encountered in include statements.
This is required to parse tests/auto/testlib/selftests/test/test.pro.
Change-Id: I80f31142cf5a35441d1424c38e21bb097e44cd0f
Reviewed-by: Alexandru Croitor <alexandru.croitor@qt.io>
There's no need to scale the cursor down to 1x, since we're now passing
the correct device pixel ratio on to the NSImage by setting its size.
Letting macOS deal with the scaling produces a higher resolution cursor.
Change-Id: Icdb3d59998f9a32094c2973c3b222cf22b6398ac
Reviewed-by: Timur Pocheptsov <timur.pocheptsov@qt.io>