Each qt_find_package can specify a PROVIDED_TARGETS option, to inform
which targets will be created by that package.
The call then saves the package name, version, etc on each of the
provided targets.
Currently the provided targets info is not persisted anywhere after
configuration ends.
We will need this for SBOM creation, so that we can collect
information about such dependencies when configuring leaf
repos, where find_dependency calls are implicit, and don't contain
the PROVIDED_TARGETS option, and we need to go from package name to
target name (and any recorded info it the target has).
This is especially relevant for static library builds, where private
dependencies become public dependencies.
Collect the provided targets information at post process time and
persist it for each 'package name + components requested' combination
into the Dependencies.cmake file.
This information will be used in a later change for SBOM generation.
Change-Id: I1693f81b1ad3beaf9b02e44b09a5e977923f0d85
Reviewed-by: Alexey Edelev <alexey.edelev@qt.io>
The QtFindWrapHelper include used in FindWrap scripts can choose to
call find_package() on one of two packages. The packages might set a
VERSION variable. We should set the same version for the FindWrap
package as well.
There are two sources where the version will be queried from. First
from the underlying ${package_name}_VERSION variable.
And if that is empty, from a property that is set by qt_find_package()
The former might be empty because find_package might be called from
a function instead of a macro, which is the case for any find_package
call in configure.cmake files that get loaded by the
qt_feature_evaluate_features function.
Thus we need the indirection via the property that qt_find_package
will set.
Change-Id: I57fd818cb9dedf5e27a6d805e3d817d8d18be36d
Reviewed-by: Alexey Edelev <alexey.edelev@qt.io>
Encapsulate the boilerplate logic of querying a property and setting
it to an empty string instead of NOTFOUND, before appending a value,
removing duplicates and assigning the values back to the property.
Change-Id: I7aefd11e9bdd77090324ec50c682d62181d22076
Reviewed-by: Alexey Edelev <alexey.edelev@qt.io>
Move the implementations into QtPublicCMakeHelpers and just forward
to those public implementations in the old code.
The new public api will be used in the public sbom cmake files.
Change-Id: I979319935611e3f553ebd414f8304f1a3163c4ee
Reviewed-by: Alexey Edelev <alexey.edelev@qt.io>
Calling qt_internal_get_framework_info failed when the target was
an INTERFACE_LIBRARY, because it tried to access properties that
aren't allowed on such a target. Interface libraries can't be
frameworks, so just add an early return guard.
Do the same for qt_internal_apply_apple_privacy_manifest.
Change-Id: I85b73449a0d56b92cd01b032d4ce5db905643c9f
Reviewed-by: Alexey Edelev <alexey.edelev@qt.io>
Because the configs passed to the ALL_CMAKE_CONFIGS option were quoted
cmake_parse_arguments(PARSE_ARGV) would escape the semicolon in
the set value, effectively doing
set(arg_ALL_CMAKE_CONFIGS "Release\;Debug")
Then the
list(GET arg_ALL_CMAKE_CONFIGS 0 first_config)
call would essentially do
set(first_config "Release;Debug")
and the
if(all_configs_count GREATER 1
AND NOT arg_CMAKE_CONFIG STREQUAL first_config)
condition would never trigger because a single config string can never
equal a double config string.
Remove the quotes to ensure correct behavior.
This won't really trigger any behavior change, because we exclude
installation of Debug executables in -debug-and-release builds,
but it will make --trace-expand logs less confusing.
Amends f240d94f14
Pick-to: 6.7
Change-Id: I53179511c7698c90b33cb3ff2762cef680a99815
Reviewed-by: Alexey Edelev <alexey.edelev@qt.io>
With WinUI3 a new layout of the lineedit and buttons was introduced. The
buttons are now aligned horizontally instead of vertically. Trying to
mimic that layout in widgets results in too few space for the text in
the lineedit. This patch increases the minimum width when using the
QWindows11Style for QAbstractSpinBox elements and saves the original
width in a property in case the style is changed at runtime to restore
the original geometry.
Fixes: QTBUG-124235
Fixes: QTBUG-124150
Pick-to: 6.7
Change-Id: I8067b338fa4a2c1efd0a1b0644fb8a563601385b
Reviewed-by: Axel Spoerl <axel.spoerl@qt.io>
By selectively setting the COIN_CTEST_IGNORE_EXIT_CODE we can allow
modules to gradually become significant, without touching qt5.git
Change-Id: Ie5b6e683cd755b1cf46886bb30803a56885a11a6
Reviewed-by: Alexandru Croitor <alexandru.croitor@qt.io>
This deduplicates some of the coin instruction files, and opens up the
possibility for other instructions to determine whether a test run
is significant or not.
The only module still using the coin_module_test_template_v2 template
is the QtMQTT module, so the behavior of ignore the test run has been
kept.
The static library opt out was a remnant from the cmake porting, and
can be removed.
Change-Id: I0f9fcbbd3a5a18bd9c8e0f545b0f0656e03bf388
Reviewed-by: Alexandru Croitor <alexandru.croitor@qt.io>
We need it in QtNetwork.
Change-Id: I6d26592ee79bffc7390ea742892f134e69ad77b1
Reviewed-by: Juha Vuolle <juha.vuolle@qt.io>
Reviewed-by: Mårten Nordheim <marten.nordheim@qt.io>
This exercise found an inconsistency involving char16_t. Filed
QTBUG-125588 to keep track of this and decide how to deal with it.
Task-number: QTBUG-125588
Pick-to: 6.7 6.5
Change-Id: I259fecef34539e8841149570d7411d959b48d876
Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
Reviewed-by: Ivan Solovev <ivan.solovev@qt.io>
Extending the fromCharacter() tests to check for the construction to
be noexcept and implicit turned up a few bugs:
The constructor from char32_t was simply not marked as noexcept, even
though all its operations were. So just mark it noexcept.
The constructor from QChar, otoh, was never called, (certainly not for
rvalues), because QString happens to be constructible from QChar (and
QLatin1Char and QChar::SpecialCharactor), so due to perfect
forwarding, the if_convertible_to<QString> ctor won, allocating a
QString.
This is a regression of Qt 6.5 compared to Qt 6.4.
To fix this, exclude arguments that convert to QChar from matching the
if_convertible_to<QString/QByteArray> ctors, taking care to not match
those arguments that are already compatible_char<>s.
This, in turn, creates a problem for implicit QASV construction from
QLatin1Char and QChar::SpecialCharacter, because now that we've
excluded them from the if_convertible_to<QString> ctor, calling the
existing QChar or QString non-template constructors for these types
would require two user-defined conversions (from said type to
QChar/QString and from QChar/QString to QAnyStringView). That works
for explicit construction, but we need implicit convertability.
So bring out the big guns once more and add a perfectly-forwarding
ctor for anything convertible to QChar. QChar itself is actually
already handled by compatible_char<>, so the old QChar non-template
ctor can go. The extra copy of the QChar argument will be optimized
away by the compiler.
[ChangeLog][QtCore][QAnyStringView] Fixed a regression where
constructing a QAnyStringView from a char-like type (QChar,
QLatin1Char, ...) would first construct a QString and only then
convert that to QAnyStringView.
Amends 812a0d3125.
This change is forward and backward BC and SC, but not
behavior-compatible: certain operations detectably change
noexcept'ness, and some arguments may now cause the resulting
QAnyStringView to have a different encoding (though I really tried
hard to avoid that).
Since it's a regression, I proposed to pick this to the affected
branches, 6.7 and 6.5 (6.6 is already closed at this point).
Pick-to: 6.7 6.5
Fixes: QTBUG-125735
Change-Id: I86f37df5d80bee36db27e529c017cb73995a6831
Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
Requires to mark the existing QString overload as Q_WEAK_OVERLOAD.¹
And since this non-polymorphic class is exported wholesale, we need to
involve REMOVED_SINCE here, too.
¹ While QString and QByteArray don't overload well, the new overload
set makes calls with QByteArray arguments ambiguous, unless the
QString overload is demoted to a weak one.
As a drive-by, change the QUuid argument passing from cref to
by-value, fixing a Clazy warning.
[ChangeLog][QtCore][QUuid] Ported createUuidV3() and createUuidV5()
from QByteArray to QByteArrayView, made them noexcept, and fixed
various ambiguities in the overload set.
Change-Id: I9f71209f2ddb58ace4e15fb68418b1a21d2b3602
Reviewed-by: Ivan Solovev <ivan.solovev@qt.io>
This allows use of the noexcept static function in cases where more
than one piece of data needs to be hashed, and concatenation of said
data would have to allocate memory.
Port QUuid to use the new function, allowing to mark the V3 and V5
create functions noexcept.
As a drive-by, take QUuid by value in the internal helper function,
fixing a Clazy warning.
Task-number: QTBUG-125431
Change-Id: I17938f0be44c91085e2aaa5574953f8dceacc990
Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
Until now, QCryptographicHash had a big drawback over the underlying
C APIs: at least one extra memory allocation: Either you created a
QCryptographicHash object (allocates a Private), and enjoy noexcept
addData() and resultView(), or you used the static hash() function
(which creates a Private on the stack, so doesn't need to allocate
one), but then we needed to return in an owning container.
Enter QSpan and hashInto(), which allow the user to provide a buffer
into which to write, and therefore can be completely noexcept and
(apart from a missing optimization which, however, doesn't affect the
API) deliver near C-API efficiency.
We don't have QMutableByteArrayView, which would deal with the
different types of equivalent char types for us, so we overload for
QSpan<std::bytes>, QSpan<char> and QSpan<uchar>, which makes the
overload set accept roughly what QByteArrayView would accept, too.
Return by QByteArrayView because that has a richer API than QSpan,
which lacks (on purpose) string-ish API.
[ChangeLog][QtCore][QCryptographicHash] Added hashInto().
Task-number: QTBUG-125431
Change-Id: I80ecc7151d3418a36c4d5db6d22d0b82c869b19f
Reviewed-by: Mårten Nordheim <marten.nordheim@qt.io>
These were not covered by the existing tests.
Pick-to: 6.7 6.5 6.2
Change-Id: I909ea3aa5b676904dc72ecf8ce32b73cca1b6af7
Reviewed-by: Ivan Solovev <ivan.solovev@qt.io>
Reviewed-by: Ahmad Samir <a.samirh78@gmail.com>
Create a temporary file instead of trying to use a file from source
directory because that's not available when test was installed via
packaging.
Task-number: QTBUG-118680
Change-Id: Ic152d68c79ac467c0d149cab04ab224c3b64099f
Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
QTZ::displayName() returns an empty string if it doesn't know how to
localize a zone name. In this case, we can't expect it to match the
expected name, which depends on having relevant locale data available.
Task-number: QTBUG-115158
Change-Id: I1cd8c1469399502764c354bf24423298f106f23e
Reviewed-by: Ivan Solovev <ivan.solovev@qt.io>
A PDF name tree is sorted, so just use a sorted data structure for that.
This simplifies the code.
This work has been kindly sponsored by the QGIS project
(https://qgis.org/).
Change-Id: Ib08b14aaf79c9180319efe7fefa9e797a4364d54
Reviewed-by: Albert Astals Cid <aacid@kde.org>
The implementation for QTreeViewPrivate::intersectedRect() calculated
the view rect for every single index which is not needed:
- when the row is spanned, the first item spans the complete viewport
- the x-position of an index in the same column but different row is
the same so no need to re-calculate the boundaries again (similar to
the implementation in QTableView)
This reduces the visualRect() call count from n*m to n+m
Task-number: QTBUG-124173
Change-Id: I651b2ff9b6d4e68a82f32b3f5c3c0e746f88ce5e
Reviewed-by: Axel Spoerl <axel.spoerl@qt.io>
Take by QByteArrayView instead of const QByteArray &.
This work has been kindly sponsored by the QGIS project
(https://qgis.org/).
Change-Id: I2a5b96ba81fc16487e25be3e957c50ea1b11be76
Reviewed-by: Albert Astals Cid <aacid@kde.org>
Reviewed-by: Tobias Koenig <tobias.koenig@kdab.com>
This is necessary for PDF/X-4 conformance (§ 6.12), but does not
hurt specify it always, matching the MediaBox.
This work has been kindly sponsored by the QGIS project
(https://qgis.org/).
Change-Id: Ifc698f271eb1217da15413e4bf25321dea2e955f
Reviewed-by: Tobias Koenig <tobias.koenig@kdab.com>
Reviewed-by: Albert Astals Cid <aacid@kde.org>
Streams may or may not be compressed depending on zlib availability,
so fix this dictionary.
This work has been kindly sponsored by the QGIS project
(https://qgis.org/).
Change-Id: I852569f053a1338d4bc54be5e8fb1e9c7741a5a1
Reviewed-by: Tobias Koenig <tobias.koenig@kdab.com>
Reviewed-by: Albert Astals Cid <aacid@kde.org>
We reflect both the NSView's own safeAreaInsets as well as the screen's
safeAreaInsets mapped to the view. This covers both in-window views that
obscure the view, e.g. toolbars or the titlebar, as well as areas outside
of the window that affect the window if it has geometry that overlaps
these areas (such as the notch on MacBook Pro laptops).
Fixes: QTBUG-125372
Change-Id: I17af7f456ade83eef910ef5b0eaeab7cd8075263
Reviewed-by: Richard Moe Gustavsen <richard.gustavsen@qt.io>
The print support module was disabled for the initial port of Qt
for iOS due to the lack of a native print backend and native
print dialogs, as we have on macOS.
However, even lacking these we should be able to offer the print
to PDF feature, with widget based print dialogs. We can do so
by opting in to the generic Unix print dialogs and backends,
as these do not have a hard dependency on CUPS.
Longer term we should adopt UIPrintInteractionController,
UIPrinterPickerController, and UIPrinter, but that's a bigger
task.
[ChangeLog[iOS] The Qt Print Support module is now enabled,
allowing printing to PDF. Printing to system provided printers
are not yet supported.
Fixes: QTBUG-125581
Change-Id: I5bc143e47c7277b3cea52760672ac4d0c8a7a898
Reviewed-by: Richard Moe Gustavsen <richard.gustavsen@qt.io>
We were only handling the case where uri-list was a file.
This fixes a regression.
Also - add dragging url into the clipboard manual test
Pick-to: 6.7 6.7.1
Change-Id: Ifbd087ffd157463b6b903199e3ff22c2de1c4942
Reviewed-by: Piotr Wierciński <piotr.wiercinski@qt.io>
Reviewed-by: Morten Johan Sørvig <morten.sorvig@qt.io>
Promote all internal zstd targets if they were found by WrapZSTD to
global using PROVIDED_TARGETS mechanism.
Amends 7d9d1220f3
Task-numer: QTBUG-119469
Change-Id: I15ec484304f7bf2b3ee2a533d2badb3bb7797863
Reviewed-by: Alexandru Croitor <alexandru.croitor@qt.io>
A file specification in PDF is a string (§3.10.1 of the PDF 1.6 spec).
As such, it needs to be properly encoded. Right now the code was
doing a naive conversion to latin1 (which was lossy), and was not
considering things like round parenthesis which need to be properly
escaped. Just use printString instead.
This work has been kindly sponsored by the QGIS project
(https://qgis.org/).
Change-Id: Icdcf8b553955d31fe2bc430dea54bb6e68221fc7
Pick-to: 6.7 6.5
Reviewed-by: Albert Astals Cid <aacid@kde.org>
The constraint requires the input time_point's duration to be
convertible to milliseconds. That's inaccurate: we need to check the
duration of the time_point we get from the clock_cast, not the input.
In general, clock_cast is allowed to return arbitrary durations, so
it may not match the input. (It indeed doesn't match for some
standard clocks, like gps_clock.)
Pick-to: 6.7
Task-number: QTBUG-125587
Change-Id: I5a93317c8cdc0a3cef4acab17c656e2e5dac5d8d
Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
Instead of manual formatting, use ISO 8601, which is what XMP wants.
Specifically, XMP part 1 delegates datetime formatting to
Date and Time Formats, W3C submission, September 1997
http://www.w3.org/TR/NOTE-datetime
with a note that the time zone designator need not be present
in XMP.
This work has been kindly sponsored by the QGIS project
(https://qgis.org/).
Change-Id: I0468ca21e1cfde47fabdd764af215a2af2efadae
Reviewed-by: Edward Welbourne <edward.welbourne@qt.io>
Most of the Part internal type (except 'number') was one of two
QAnyStringView-look-alikes originally developed for
QStringView/QLatin1StringView arg() support.
Clean it up to use QAnyStringView directly, thus taking the first step
towards UTF-8 support in QString/View::args().
While we can't encounter UTF-8 Parts with this patch, yet, adjust the
concatenation logic to deal with them already: the concatenation
code-path required by the call to visit(), and the result truncation
due to the potential overestimation of UTF-8 decoded lengths.
Task-number: QTBUG-124365
Change-Id: Idcbcbf10fa8125026115201b963877efe498a18b
Reviewed-by: Ivan Solovev <ivan.solovev@qt.io>
Reviewed-by: Ahmad Samir <a.samirh78@gmail.com>
Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
Reviewed-by: Mårten Nordheim <marten.nordheim@qt.io>
You could get the idea that the underlying int value is indicative
of the severity. Make it more explicit that the order in the text
is the correct one, and reorder for Qt 7.
While at it, remove mentioning of Qt 5.5.
Pick-to: 6.7
Fixes: QTBUG-102347
Change-Id: I5d1b46afb37e50baa209a06c192a943980ca774b
Reviewed-by: Edward Welbourne <edward.welbourne@qt.io>
This is meant to allow the buildsystem to add additional paths (for e.g.
QML imports) while still allowing the application to pick up the paths
where e.g. Qt's plugins are located – without having to query qtpaths or
the build system to locate them first, and to then also add them to
qt.conf.
QLibraryInfo::paths will return a list containing any values provided in
qt.conf, followed by the value that would have been provided if there
were no qt.conf file.
If no value is provided at all for a given key in qt.conf,
QLibraryInfo::path will behave as if no qt.conf file was provided,
instead of using LocationInfo::defaultValue.
For now, this is considered to be internal only, and won't be
documented.
Change-Id: Ic74c66b5cbde605b43336cd88c3f909999381f46
Reviewed-by: Alexandru Croitor <alexandru.croitor@qt.io>
QMimeData::retrieveData() checks whether the returned QVariant value is
valid, i.e. the variant contains some data. If the variant contains an
empty QByteArray, it will be considered valid.
So retrieveData_sys() should return QVariant() in case data with the
specified mime type cannot be retrieved.
Fixes: QTBUG-125531
Pick-to: 6.7 6.5 6.2 5.15
Change-Id: I0a668ca7ad5b2c5430335e8554cc597747287173
Reviewed-by: Liang Qi <liang.qi@qt.io>
Commit 0a76b6b in Qt 5.5.0 did move C4496 that warns about use of API
marked with __declspec(deprecated), [[deprecated]] to level 4,
effectively disabling the warning for Qt users. This was done to work
around msvc warnings for standard API Microsoft considers insecure,
like std::copy.
Anyhow, this change also meant that users won't see warnings for other
deprecated API - including warnings about deprecated API in Qt, which
is especially crucial for the Qt 6 transition.
The original issue was fixed in Qt headers already in Qt 5.6.1 (see
commit 31c7b24aa5). Also the CMake integration never set C4496,
so it should be safe to remove this now.
[ChangeLog][qmake] qmake does not disable the MSVC compiler warning
about deprecated API by default anymore (C4996). This means the
compiler will now warn about use of deprecated API, be it from Qt
or from other headers. You can manually revert this by adding
QMAKE_CXX_FLAGS_WARN_ON += -wd4996
to your .pro file.
Fixes: QTBUG-85227
Change-Id: I5a578d34370e0e5e8a91f8a31e96b9c532dde8b5
Reviewed-by: Oliver Wolff <oliver.wolff@qt.io>
Reviewed-by: Joerg Bornemann <joerg.bornemann@qt.io>
Users had eight Qt releases to adjust their code, remove the opt-out
now.
[ChangeLog][QtCore][QChar] Removed the QT_IMPLICIT_QCHAR_CONSTRUCTION
opt-in. The respective QChar constructors (`(int)`, `(uint)`,
`(uchar)`, `(uchar, uchar)`) are now always explicit.
Change-Id: I2cca1f98d486840f9e6bcd6c07678f0dd81832e5
Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
Add missing checks for integral overloads uint, short and ushort and
character overloads char and char16_t (the latter being a reproducer
for QTBUG-125588).
Pick-to: 6.7 6.5 6.2
Task-number: QTBUG-125588
Change-Id: I479e4c8c3cd86c3f85ab3c9d44b79158b0a48476
Reviewed-by: Ivan Solovev <ivan.solovev@qt.io>
Cleanup QIcon:
- factor out actualSize() calculation
- factor out deleting invalid pixmap entry
- don't overflow on int*int calculation
- use quint8 for state and mode in cacheKey calculation
- sync cacheKey calculation
- make QIconPrivate::pixmapDevicePixelRatio() static
Change-Id: I7716b6f69687b6e5c910a0cb180b32b2de9a015d
Reviewed-by: Volker Hilsheimer <volker.hilsheimer@qt.io>
Remove all \since 4.x comments in gui/image - this is no longer of
interest.
Change-Id: Ic2d7252293f1951fb202ea907999301581671081
Reviewed-by: Volker Hilsheimer <volker.hilsheimer@qt.io>
Reviewed-by: Inkamari Harjula <inkamari.harjula@qt.io>
Found by ubsan: if rhs is nullptr, then we fed a nullptr as the second
argument of memcmp(), which is UB.
Fix by catching an empty rhs before we reach that line.
Amends e52d50a03d (which, despite
pick-to's to the contrary, never made it into 6.2 or 5.15).
Change b977ae371a fixed this for
UTF-8/UTF-8 comparison from 6.5 on, but 6.4 ad 6.3 remain vulnerable
there, but they're closed, so can't be fixed anymore.
Pick-to: 6.7 6.5
Change-Id: I12fa986aa82a7440a9d53fad19a15e9420233e0b
Reviewed-by: Ivan Solovev <ivan.solovev@qt.io>
setFloating() called on the 2nd last dock widget in a floating tab
didn't cause reparenting to the main window. The dock widget remained
parented to a QDockWidgetGroupWindow, while no longer being part of
floating tabs. The QDockWidgetGroupWindow would therefore have only
one tab, which is an inconsistent state and causes crashes.
Factor out the implementation of setFloating() to a new
QDockWidgetPrivate::setFloating(). Reparent to the main window, if
the dock widget is part of floating tabs.
Add test functionality in tst_QDockWidget::setFloating().
Turn createFloatingTabs() into a macro, in order to QSKIP() in the test
function's scope.
Fixes: QTBUG-122394
Pick-to: 6.7 6.5
Change-Id: I3719785f310b131446cdea908f09b7195c992b3e
Reviewed-by: Volker Hilsheimer <volker.hilsheimer@qt.io>
Since we don't have any API to specify trapping info, mark
the document as untrapped. (PDF/X-4 requires the entry, and
requires it to be true or false. The default would be "unknown"
but that's not allowed by X-4.)
This work has been kindly sponsored by the QGIS project
(https://qgis.org/).
Change-Id: Id8c3a4356ba5bb74877473549e55ccbb6839b07e
Reviewed-by: Albert Astals Cid <aacid@kde.org>
This tests assumes existence of `PATH` environment variable. This
variable is not a special variable on VxWorks (it's neither set nor
evaluated by command line), causing this test to fail.
Skip this test as it's not applicable on VxWorks.
Pick-to: 6.7
Task-number: QTBUG-115777
Change-Id: I431b3f0a0ff9efefffc356bb5c7e11fdfac78690
Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
They're content-equivalent, except that the latter doesn't have to
allocate a return value on the heap.
Pick-to: 6.7
Change-Id: Ifcae47b487c80c2bac02900f08393b386cfe806c
Reviewed-by: Mårten Nordheim <marten.nordheim@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>