We can not use the same blend routines for ARGB32 as we use for
ARGB32PM. It needs to blend transparent colors differently.
Pick-to: 6.5
Fixes: QTBUG-91262
Change-Id: I6b75fa8096b92452655dcad94478ae2a74415939
Reviewed-by: Eirik Aavitsland <eirik.aavitsland@qt.io>
(cherry picked from commit bb854606ec8f95787dfd2a4d1b6bcaddbcf4d042)
Reviewed-by: Qt Cherry-pick Bot <cherrypick_bot@qt-project.org>
I'm surprised that this passed the CI on Windows, because
Q_AUTOTEST_EXPORT is Q_DECL_EXPORT, which is __declspec(dllexport) and
all dllexport'ed functions must be defined in the current DLL, not
imported from elsewhere. This is similar on Unix systems with the
no_direct_extern_access mode, because then Q_DECL_EXPORT behaves like on
Windows.
That means Qt modules can't call a Q_AUTOTEST_EXPORT function
from another module (only tests can). Solve this by providing a function
that is properly exported with Q_CORE_EXPORT.
Amends commit 3d08816f4c4245f08a53307775fe3c4ed31a7a32.
Task-number: QTBUG-28246
Task-number: QTBUG-31103
Change-Id: I2ba317ab34bda8c18954fffd28395f7354cb54f2
Reviewed-by: Tor Arne Vestbø <tor.arne.vestbo@qt.io>
(cherry picked from commit fbe61def33a2708e35e5e6a796e88976b04941f7)
Reviewed-by: Qt Cherry-pick Bot <cherrypick_bot@qt-project.org>
Both APFS and HFS+ can be both case-sensitive and case-insensitive
(the default), and the mounted file system may be any other file
system than these two as well, so hard-coding to case-sensitive
is not sufficient.
Task-number: QTBUG-28246
Task-number: QTBUG-31103
Change-Id: Ibdb902df3f169b016a519f67ad5a79e6afb6aae3
Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
(cherry picked from commit 3d08816f4c4245f08a53307775fe3c4ed31a7a32)
Reviewed-by: Qt Cherry-pick Bot <cherrypick_bot@qt-project.org>
The test has started to be rather flaky, and QCOMPARE provides better
diagnostic messages when failing, printing both the actual and the
expected value.
Pick-to: 6.5
Change-Id: I262e8e85de596ff3502e02ae26a1dd2724af92de
Reviewed-by: Tor Arne Vestbø <tor.arne.vestbo@qt.io>
(cherry picked from commit d736a5e00030058f90a5f83316581e86e434c119)
Reviewed-by: Qt Cherry-pick Bot <cherrypick_bot@qt-project.org>
If a window is positioned with setFramePosition, we reflect that to
the platform window via QPlatformWindow::setGeometry(), but with the
QWindowPrivate::positionPolicy set to WindowFrameInclusive. On the
platform side the position policy is read from QWindowPrivate to
determine how to interpret the incoming geometry.
When the resulting geometry is applied to the native window,
it's reflected through QPlatformWindow::geometry() and reported
back via QWSI::handleGeometryChange() as client geometry, ie.
without the frame margins.
If the platform layer later interprets this geometry in
combination with the window's positionPolicy, it will incorrectly
position the frame top left at the point of the client geometry's
top left.
It would make sense to reset the window's positionPolicy at
the point of QGuiApplicationPrivate::processGeometryChangeEvent,
but doing so might break situations where there's another in
flight geometry request.
What we can do as a first step is reset the positionPolicy when
the platform window is destroyed. This ensures that the next
time the platform window is created it will be placed at the
same position, even if the initial position was requested via
the setFramePosition() API.
Change-Id: Ic555f19884ccd68c46421d0fe666717170ba7638
Reviewed-by: Oliver Wolff <oliver.wolff@qt.io>
Reviewed-by: Tor Arne Vestbø <tor.arne.vestbo@qt.io>
Reviewed-by: Volker Hilsheimer <volker.hilsheimer@qt.io>
(cherry picked from commit 11a09a9bd0a7e899a918b078a94c6c3b82240dee)
Reviewed-by: Qt Cherry-pick Bot <cherrypick_bot@qt-project.org>
gcc version 13.2.0 (Ubuntu 13.2.0-23ubuntu4) seems to remove some
code in release builds that is embedded in a macro in qtransfrom.cpp.
This patch changes the macro into a function such that it is not
removed by gcc.
It seems like the switch statement is (wrongly) optimized away if it is
embedded in the QTransform::map(QPolygonF) overload. nx and ny are
always 0 (as initialized by QPolygonF) after the macro (but only within
the QTransform::map(QPolygonF) function.
The bug happens only in a release build. Added debug messages of nx and
ny created no output, adding qDebug() << t, which made the macro work.
It seems that a complex combination of macro and switch statement can
tigger the bug in gcc. So rewriting the macro as a function works around
the bug.
Fixes: QTBUG-127723
Change-Id: I7e0b02cde276e591cf773f4e18dd505134421957
Reviewed-by: Allan Sandfeld Jensen <allan.jensen@qt.io>
(cherry picked from commit 11b70b66de627d3bd0ef4193d5cfa624c88ac96a)
Reviewed-by: Qt Cherry-pick Bot <cherrypick_bot@qt-project.org>
The ODF writer would ignore the default font set on the document
and just output default values according to spec, such as "Sans"
for the font family.
With this patch, any settings set explicitly on the default font
will be taken into account, granted that they are not overridden
by any properties in the QTextCharFormat.
[ChangeLog][Text] The ODF backend to QTextDocumentWriter will now
respect the default font set on the QTextDocument.
Fixes: QTBUG-124570
Change-Id: Ia937420f7f721bbf3264661160cb0a593907358c
Reviewed-by: Eirik Aavitsland <eirik.aavitsland@qt.io>
(cherry picked from commit 77a9a208227ecf750d620b3048053fd4fc4299a4)
Reviewed-by: Qt Cherry-pick Bot <cherrypick_bot@qt-project.org>
In Qt 5.0 timeframe, support for downscaled reading was added to the
png handler, as a help for devices with very limited memory. Instead
of decoding the whole image into memory and then scaling it down (as
happens for most image formats if scaled reading is requested), a
separate reading function was added that would perform line-by-line
decoding and downscaling.
Although this provides a transient memory saving during decoding, it
has a number of drawbacks:
- The scaling routine is simplistic and can create artifacts for
images with transparency, ref. the linked bug report
- The scaled result from the png handler is in general different from
the result of using the common QImage smoothscaling function
- The line-by-line scaling function is generally slower than the
common smoothscaling function, since the latter is optimized using
SSE/NEON extensions
- It adds a redundant implementation of image scaling to the code base
Hence we drop this functionalty going forward. This effectively
reverts 44a9c08eff0647f398863de55e2b62dbd6541e27.
[ChangeLog][QtGui][Image I/O] The PNG handler no longer implements
progressive downscaling during decoding when scaled image reading is
requested.
Fixes: QTBUG-121724
Change-Id: I7b524b12c174c64201b98945ee2fa062ed127f87
Reviewed-by: Eskil Abrahamsen Blomfeldt <eskil.abrahamsen-blomfeldt@qt.io>
(cherry picked from commit a2a315eaa28edf9c649e13c951fdb1154e3ddf48)
Reviewed-by: Qt Cherry-pick Bot <cherrypick_bot@qt-project.org>
Instead of build dir, where it can clash when multiple tests runs
are being done from the same build dir in parallel.
Due to the way platform plugin argument parsing works we can't
pass the full file name of the config, as on Windows this would
include C:, which QGuiApplication will split into two, thinking
they are two different platform plugin arguments.
Instead we chdir into the temp dir, and create the file there,
passing the file name as a relative path as before.
Change-Id: Ia4ea82280e35f4f52b7de74bbf53b2a48ecbaecd
Reviewed-by: Morten Johan Sørvig <morten.sorvig@qt.io>
(cherry picked from commit fd68f894b969b016201e032ba23dac431c19b90a)
Reviewed-by: Qt Cherry-pick Bot <cherrypick_bot@qt-project.org>
The CSS spec defines the font-size as being a length, which is a
combination of a real number and a unit. This applies to the 'px'
unit as well, so by treating px values as integers when parsing
we were failing to parse not only '12.5px' but also '12.0px'.
The code now uses QMetaType::fromType<qreal> but then sets the
resulting pixel type on the QFont as an integer, as QFont does
not support fractional pixel sizes.
Other code paths in the CSS parsing machinery use QString::toInt(),
either directly or via intValueHelper() or lengthValue(). The font
code path can potentially be ported over to these other APIs for
consistency, but to keep the patch simple this is left for a
follow-up.
Pick-to: 6.5 6.2 5.15
Change-Id: I972cfe0f3fa3c785efa18c7593d6a497ff28911c
Reviewed-by: Eskil Abrahamsen Blomfeldt <eskil.abrahamsen-blomfeldt@qt.io>
(cherry picked from commit 5731e3e185d3a69502b2bc4f1fee48c156b34c3c)
Reviewed-by: Qt Cherry-pick Bot <cherrypick_bot@qt-project.org>
There is a bug in GNOME 46.0 on Ubuntu 24.04 Wayland when showing
a maximized or fullscreen window.
Task-number: QTBUG-127920
Change-Id: I49c0f53b16f501072cbbe92ddd79ff21fb9adb27
Reviewed-by: Axel Spoerl <axel.spoerl@qt.io>
(cherry picked from commit 66591b658f4270252f8bf342dac7e2a9bcad34a0)
Reviewed-by: Qt Cherry-pick Bot <cherrypick_bot@qt-project.org>
The test did not account for the fact that kerning can alter the
distance between subsequent characters, so sum of horizontal
advances does not accurately measure the width of the string when
kerning is enabled.
This caused the test to fail with e.g. with the font Ubuntu Sans.
This amends 0ffdbb2126 .
Pick-to: 6.7 6.5 6.2
Fixes: QTBUG-127512
Change-Id: Id3ae7a6c79c84edd603db2fc0fed07777fa67741
Reviewed-by: Liang Qi <liang.qi@qt.io>
(cherry picked from commit e7ac6667f27369c25719ebedefd2d5344fd93bfd)
Reviewed-by: Qt Cherry-pick Bot <cherrypick_bot@qt-project.org>
The framePositioning test was split out from the positioning test, but
without the existing skips. Turns out we do need the same skips, so
add them.
Change-Id: Ib5d1cdf474a3a88a154c7cdc8df346668c8053d6
Reviewed-by: Tinja Paavoseppä <tinja.paavoseppa@qt.io>
(cherry picked from commit 6f46f85899b425729d595af6461c6dbe3f4f7e1c)
Reviewed-by: Qt Cherry-pick Bot <cherrypick_bot@qt-project.org>
This amends 31ec108dd08d6381a15e49b6fbec9337705c3b2a .
framePositioning() was split from positioning(), which was skipped
before.
Pick-to: 6.7 6.5
Change-Id: I23dcfbe6012bb44c9b7c343b963e7338ddd16f28
Reviewed-by: David Edmundson <davidedmundson@kde.org>
(cherry picked from commit e2165f0198ec09c5c0faa6bdb3dbec3b9ca482ab)
Reviewed-by: Qt Cherry-pick Bot <cherrypick_bot@qt-project.org>
When building qt with QT_NO_DEBUG/WARNING/INFO_OUTPUT set, then the
qDebug/Warning/Info macros expand to `QMessageLogger::noDebug`. That
helper is not defined to take a logging category or category function,
so using `qDebug(lcX, ...)` breaks the build. The correct way to emit
categorized logging is to use the qCDebug/Warning/Info macros.
Task-number: QTBUG-125589
Pick-to: 6.7 6.5
Change-Id: I968b0e826871a09023c11fec9e51caa5a2c4dc0b
Reviewed-by: Jonas Karlsson <jonas.karlsson@qt.io>
(cherry picked from commit 1e1c68017338c89265d6664a27f4137fc8960473)
Reviewed-by: Qt Cherry-pick Bot <cherrypick_bot@qt-project.org>
We no longer support fake fullscreen mode on macOS, and haven't for
a long time.
Pick-to: 6.7 6.5
Change-Id: Ic2eb6065239c4e5be5ab2011a6da50272c77460a
Reviewed-by: Volker Hilsheimer <volker.hilsheimer@qt.io>
(cherry picked from commit 4079ecfb9b3dc794212a81154e18145256741cfd)
Reviewed-by: Qt Cherry-pick Bot <cherrypick_bot@qt-project.org>
When the QCocoaWindow is created it picks up the QWindow geometry,
and applies that to the NSWindow it creates. But since we haven't
created an NSWindow yet for the first step, our logic to adjust the
window geometry when the positionPolicy is WindowFrameInclusive is
a noop. As a result the NSWindow gets a client geometry corresponding
to what the user requested as the frame geometry.
To fix this we hook into [QNSWindow setContentView:], where we apply
QWindow properties to the NSWindow after creation.
The tst_QWindow::positioning test has been split out into a separate
framePositioning test.
Pick-to: 6.7 6.5
Change-Id: I85fe6ad10aee8346202de3d55d6b2cd89915c5df
Reviewed-by: Timur Pocheptsov <timur.pocheptsov@qt.io>
(cherry picked from commit 31ec108dd08d6381a15e49b6fbec9337705c3b2a)
Reviewed-by: Qt Cherry-pick Bot <cherrypick_bot@qt-project.org>
The color space meta data was retained through most image conversion
functions, but missed in the optimized code path for 90/180/270 degree
rotations.
Fixes: QTBUG-126575
Pick-to: 6.7 6.5
Change-Id: Icbd5aa71e88b4d2d79b00b3cadfe850e6714637b
Reviewed-by: Allan Sandfeld Jensen <allan.jensen@qt.io>
(cherry picked from commit bea8beef85d1b5a163021ba4a671bbaddcc1738d)
Reviewed-by: Qt Cherry-pick Bot <cherrypick_bot@qt-project.org>
The plugin was built into the base directory of any build that included
its CMakeLists.txt. Subsequently it was required by any project built
against this version of Qt and linked against QtGui. Since it couldn't
be found in the usual places to look for plugins, all those builds
failed.
Amends commit 87896c03c1
Task-number: QTBUG-126393
Change-Id: I4c577c60459d5f6cb654714ce6e97f87c1f6f640
Reviewed-by: Volker Hilsheimer <volker.hilsheimer@qt.io>
Reviewed-by: Jøger Hansegård <joger.hansegard@qt.io>
(cherry picked from commit b01dd59d764cf5787b36075cc273a9a56be55a8e)
Reviewed-by: Qt Cherry-pick Bot <cherrypick_bot@qt-project.org>
Use QCss::Declaration::brushValues to parse the values into a list. This
will not only lead to correctly parsing the values, but also prevent an
an assertion from firing when ValueExtractor::extractBorder is called.
Fixes: QTBUG-126381
Pick-to: 6.7 6.5 6.2
Change-Id: Ic6f3d722ffe0d72dcb5faa9916a23c804211ce49
Reviewed-by: Santhosh Kumar <santhosh.kumar.selvaraj@qt.io>
(cherry picked from commit a37ca7c85933979351d99f1bb22191763a78de46)
Reviewed-by: Qt Cherry-pick Bot <cherrypick_bot@qt-project.org>
From and to algorithms were accidentally reversed before submitting
final patch.
Change-Id: I16e0afda26b77047facf4f65065224c8f3dce6c6
Reviewed-by: Laszlo Agocs <laszlo.agocs@qt.io>
(cherry picked from commit 1b1f613b56fce643a7565e9280acc90e171caf7c)
Reviewed-by: Qt Cherry-pick Bot <cherrypick_bot@qt-project.org>
Combine all into a single flexible apply method.
Also fixes a few issues with RGB colorspace on gray input. Blocking CMYK colorspace on Grayscale and ElementListProcessing RGB on grayscale out.
Fixes: QTBUG-125303
Change-Id: I3987010062fbb5aa708aeb1cc239f3ce9413e34f
Reviewed-by: Allan Sandfeld Jensen <allan.jensen@qt.io>
We need to be able to have true popup windows in Qt Quick and Controls,
including handling the press-drag-release sequence to select one entry
from a menu or combobox. After the mouse press, a new window is created.
On some platforms (such as xcb), the new window gets window system grabs
of both keyboard and mouse (QApplicationPrivate::openPopup() calls
grabForPopup() and it actually works); while on others, the pre-existing
window continues to get the whole sequence of mouse events until the
release. In the latter case, Qt needs to forward events from the
original window to the popup. Until now, the list of popups was
QApplicationPrivate::popupWidgets.
Now we track the open popups as a list of QWindows rather than QWidgets,
in QGuiApplicationPrivate::popup_list, and add a set of static functions
to manage that list. Functions such as QApplication::activePopupWidget()
QApplicationPrivate::openPopup() and closePopup() are rewritten to make
requests to QGuiApplicationPrivate.
276943c8b7 made
QGuiApplicationPrivate::closeAllPopups() virtual. That is now reverted,
because we're putting QGuiApplication in charge of popup management
and trying to minimize widget-specific behavior. So far,
QApplicationPrivate::closePopup() is still overridden to take care
of focus changes.
So far, QtGui does not take care of closing popups when the user
clicks outside: the active popup window gets those events, and needs
to close itself if the click occurs outside. An attempt to move this
logic raised some issues with legacy widget test cases.
Using a touchscreen to press on QMenuBar and open a QMenu, drag to
a menu item and release, is temporarily broken for now. The plan is
to fix it in a subsequent patch.
Task-number: QTBUG-68080
Task-number: QTBUG-69777
Change-Id: I02b5034987b5ee8909917d305f414c8b0db9c7f5
Reviewed-by: Richard Moe Gustavsen <richard.gustavsen@qt.io>
For backwards compatibility reasons, font files have multiple different
ways to specify vertical metrics (ascent, descent, etc.).
For OpenType, the main two are the usWin* and sTypo* metrics in the OS/2
font table. The usWin* metrics are typically used as the clipping bounds
of the font (so no character will ever draw outside these bounds). The
sTypo* metrics thus make it possible to specify a different set of
metrics for use in text layouts which is smaller than the clipping
bounds (or bigger), so that you can have fonts where some characters
overlap with preceding or subsequent lines.
However, GDI (and thus many applications) use usWin* also for line
spacing, which lead to the sTypo* metrics being untrustworthy in some
fonts and later to the introduction of the USE_TYPO_METRICS in the OS/2
table version 4. The idea of this flag is to tell the font system that
the sTypo* metrics can be trusted and should be preferred over the usWin*
metrics.
But the OpenType specification states that sTypo* metrics should *always*
be preferred and modern font systems such as FreeType and DirectWrite
will respect this. This in turn has lead to fonts where the
USE_TYPO_METRICS flag is untrustworthy instead, i.e. the sTypo* metrics
are preferable, but the USE_TYPO_METRICS has accidentally not been set.
Qt trusts the USE_TYPO_METRICS flag and uses the usWin* metrics whenever
this is unset. Since QFontMetricsF::height() (ascent+descent) in this
case includes the line gap metric, a lot of components have been written
to use it for size without adding any margins over the text. So changing
the default now would break a large amount of components, including the
ones in our own Windows style.
Most fonts should work correctly, by setting the USE_TYPO_METRICS flag
if the typo metrics are intended to be used. For those that do not, we
introduce a PreferTypoLineMetrics style strategy.
[ChangeLog][QtGui][Fonts] Added QFont::PreferTypoLineMetrics for using
the recommended line spacing metrics of the font, even if the font has
not explicitly set its USE_TYPO_METRICS flag.
Fixes: QTBUG-125585
Change-Id: Ib2f7df404fe719186d78733bda26da712f1ab85a
Reviewed-by: Eskil Abrahamsen Blomfeldt <eskil.abrahamsen-blomfeldt@qt.io>
Also write gray, CMYK and mAB RGB color space profiles.
Fixes: QTBUG-125302
Change-Id: Id3b3b64537b9c08f1d40b8243c228ad111d08289
Reviewed-by: Laszlo Agocs <laszlo.agocs@qt.io>
The test passes locally, and if individual functions should fail, then
skip those.
Change-Id: Ib9123bacaff2a83c2bc378b37201fd1d75dfdb45
Reviewed-by: Assam Boudjelthia <assam.boudjelthia@qt.io>
So far, the keys of icon engine plugins were only interpreted as the
suffix of icon files, loaded via QIcon(filename). However, an icon
engine could provide a lot more flexibility if it could implement an
entire theme.
Match the list of keys a plugin can register itself with also against
the current theme name. If a matching plugin is found, use that plugin
to create the icon engine. Store the factory from the plugin to avoid
costly lookups for each icon.
Extend the QIcon test case by adding a custom plugin that supports two
themes. Since the plugin and icon engine creation infrastructure
doesn't communicate which theme the plugin was created for, use
QIcon::themeName to record the current theme when the engine gets
created.
[ChangeLog][QtGui][QIconEnginePlugin] The keys registered by an
QIconEnginePlugin implementation are now also matched against the
current theme (system or user theme), allowing engine providers
to implement entire themes through a plugin.
Change-Id: I8a5e30ff8b5bb7c78b5204e82760e4328671e4c1
Reviewed-by: Axel Spoerl <axel.spoerl@qt.io>
The codepaths for image scaling are a bit convoluted, so some "surgery"
is needed. QImage::scaled() delegates to transformed(), building a
suitable scaling matrix.
transformed() checks if the matrix is a scaling matrix, and then
has several dispatches.
If smooth scaling was requested:
* if the image format is supported by smoothScaled() without needing a
conversion, delegate to that;
* otherwise, if the transform is "non paintable" or the source image is
big enough, then again call smoothScale. "non paintable" here means
that we're scaling more than 2x down, and QPainter wouldn't do a good
job.
Otherwise, images in color formats (>= RGB32) are converted by applying
the needed transformation on a QPainter and draw the source image with
that transformation.
Otherwise, if the matrix is invertible (a scaling matrix with non-zero
scaling always is, it's a diagonal matrix), then dispatch to
qt_xForm_helper.
--
Amend this reasoning to support CMYK images:
* Make smoothScaled support CMYK without conversions. To do so,
make qSmoothScaleImage scale CMYK as if it was a ARGB image.
* Make transformed() call smoothScaled() for CMYK images
* In transformed(), consider CMYK as nonpaintable, because we can't
paint over a CMYK image.
* In the non-smooth codepath, also check that we don't try to paint over
CMYK, and always go through qt_xForm_helper instead.
Note that we still don't support any other transformation for CMYK.
Add a test, adapting the exiting one for RGB.
Change-Id: Ic72d78923a17fb3963aa22c57265904c716792b0
Reviewed-by: Allan Sandfeld Jensen <allan.jensen@qt.io>
In Qt 5, we had QVector<QRect> QRegion::rects(), but it was
deprecated, because just iterating over the QRegion as a container of
QRects was more efficient (QRegion has a SSO for the case of one
rectangle). With QSpan, we can now bring it back with the same
efficiency as iteration, supporting Qt 5 code that never made the move
away from rects() and new code that wishes to make the conversion into
rectangles more explicit. Re-add the Qt 5 tests, which show that the
function is nearly a drop-in replacement for the Qt 5 rects() (QSpan,
at the time of this commit, doesn't have relational operators, yet).
Also add a QSpan overload of setRects(). The old (ptr, n) function
(now obsoleted, but not deprecated) allowed nullptr + n != 0, which
QSpan doesn't accept, so print a warning in that case. Also, QSpan can
hold more than INT_MAX elements on 64-bit platforms, but QRegion's API
was never ported from int to qsizetype, so we need to catch oversized
spans used as inputs, too.
[ChangeLog][QtGui][QRegion] Added QSpan overload of setRects();
re-added Qt5's rects(), but returning QSpan instead of QVector now.
Fixes: QTBUG-124712
Change-Id: I24570c886cbf77abd8d1f4a3f42ae53c892cd9ff
Reviewed-by: Volker Hilsheimer <volker.hilsheimer@qt.io>
Reviewed-by: Edward Welbourne <edward.welbourne@qt.io>
While common script typically adapts the surrounding script, it is
possible for strings of only punctuation (for instance) to remain
undetermined. In addition, Qt considers Latin and Common the same in
font matching, so in order to get merging for latin, we need to
conflate them in the application fallback API as well.
This also adds a couple of missing clears of caches (clearing
the font cache itself when adding a new fallback, since the
fallbacks are kept as part of the cached font engine + clearing
the fallback cache when adding a new application font, since the
new application font may be a fallback candidate).
Note: This also adds some missing removeApplicationFont() calls
from other tests, since these were causing issues with the
new test.
Task-number: QTBUG-124914
Change-Id: Idbfa0f6b492a9194eca67b57101e674f7b8a4ec4
Reviewed-by: Eirik Aavitsland <eirik.aavitsland@qt.io>
Use new term in examples, code comments, error messages and and mime types.
Task-number: QTBUG-122253
Change-Id: I355452d6eb02a7a0ffbb20acf82ddb8ebbfa4837
Reviewed-by: Joerg Bornemann <joerg.bornemann@qt.io>
Remove the code that was already commented out by
37a25fce94 for Qt versions ≥ 6.6.
Pick-to: 6.7
Change-Id: I40a3e974430add17b52307781d092bd4f58c0c35
Reviewed-by: Tor Arne Vestbø <tor.arne.vestbo@qt.io>
Reviewed-by: Juha Vuolle <juha.vuolle@qt.io>
Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
Reviewed-by: Mårten Nordheim <marten.nordheim@qt.io>
SVG has special properties for stroke styling. Those are usually
supported by different browsers, because SVG documents can be
used inside HTML files. This kind of styling is already supported
by QPen and all need to be done is some plumbing to save and
retrieve those values in QTextDocument when it is stored as HTML.
Change-Id: I291efab5483ac5e852d117e762e203257c64b47f
Reviewed-by: Eskil Abrahamsen Blomfeldt <eskil.abrahamsen-blomfeldt@qt.io>
We rely on setParent for parenting top level windows into our desktop
manager view, so we can't condition the call on having a parent window,
like we do on other platforms.
This was a regression from 988039729f.
Fixes: QTBUG-125142
Pick-to: 6.7
Change-Id: I2884d77db09cba5371ccd77eabda7ce38c0292de
Reviewed-by: Timur Pocheptsov <timur.pocheptsov@qt.io>
Add support for the max-width css attribute in image. This allows images
to be responsive: it adapts their size to the size of the QTextDocument
so that they never grow bigger than the QTextDocument pageSize.
This is implemented for the image handler used in QTextEdit and other
QtWidget text related classes.
[ChangeLog][QtGui][CSS] The max-width style can now be applied to
<img/> to set the maximum width in pixels or percentage.
Task-number: QTBUG-12283
Change-Id: Ic94e16279a1240ab4a509823de59dc0bfc920bb9
Reviewed-by: Shawn Rutledge <shawn.rutledge@qt.io>
Now developer build tests compile, but some are not working.
Functional fix will come later via separate tasks.
Task-number: QTBUG-122999
Change-Id: I70487b46c1b32ba4279cb02a4978e4f55ac0d310
Reviewed-by: Alexey Edelev <alexey.edelev@qt.io>
Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
Collapse the border and add some padding for the table cells.
[ChangeLog][QtGui][Text] QTextTableFormat now defaults to
collapsed tables with no spacing between cells.
Change-Id: Ibebc92820447bd5fd9c0b905261dc4426b74358c
Reviewed-by: Shawn Rutledge <shawn.rutledge@qt.io>
As part of df359bcb70 the semantics and
interaction between QEventLoopLocker and QGuiApplication was changed,
based on the assumption that these two mechanisms were independent
and should not affect each other.
This had a surprising regression where the use of QEventLoopLocker in
combination with the QCoreApplication::isQuitLockEnabled() automatic
quit would end up quitting the app, even if it had open windows, for
example when the last job of some internal job queue finished.
It could be argued that if the app has open windows that should not
be closed, they should ignore the Close event, and that an application
with running QEventLoopLocker jobs should maintain an active window
showing the progress of those jobs, but still, this is regression
that we want to fix.
We now bail out if !lastWindowClosed() in QGuiApplication's
canQuitAutomatically, which is triggered from QEventLoopLocker's
isQuitLockEnabled() behavior. And we do so regardless of whether
quitOnLastWindowClosed is set or not, as the latter property
determines the behavior when closing a window, not the behavior
when a QEventLoopLocker goes out of scope.
Similarly, we now block quitting of the application when triggered
by quitOnLastWindowClosed() if a QEventLoop is active, regardless of
the isQuitLockEnabled(), as the latter property is determining
whether we should trigger a quit, not whether we should block them.
[ChangeLog][Important behavior changes] Fixed a regression where
the last QEventLoopLocker going out of scope would quit the app,
even if there were open windows, if quitOnLastWindowClosed was
false.
[ChangeLog][Important behavior changes] Fixed a regression where
closing the last window would quit the app, even if there were
active QEventLoopLockers, if isQuitLockEnabled was false.
Fixes: QTBUG-124386
Pick-to: 6.7 6.5
Change-Id: I84fd0ddea78a2f417f3a17b326113c880079cf85
Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
Reviewed-by: Volker Hilsheimer <volker.hilsheimer@qt.io>
This introduces an optional, slightly more expensive approach
to font merging which takes the full string into account,
instead of just going character by character.
This addresses the issue that you may sometimes get multiple fonts
to cover one string of text in a single language. With Chinese,
this is especially an issue because many fonts will only support
parts of the very large character set.
The new algorithm detects if the string was incompletely covered
by the font and tries the fallback fonts in order to find the best
match. This is obviously more expensive, especially if no perfect
match is found and we have to check all the fallbacks in the list,
but it is opt-in and only enabled if the ContextFontMerging flag
is set.
Task-number: QTBUG-121131
Change-Id: I8c7874d0918640bd83418e3c4726c89f43a220a3
Reviewed-by: Eirik Aavitsland <eirik.aavitsland@qt.io>