Commit Graph

67531 Commits (a3a91c947c8fecb29b3ea488e2e0f2a1fbbde2f2)

Author SHA1 Message Date
Giuseppe D'Angelo a3a91c947c PDF: write a TrimBox
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>
2024-05-29 04:23:16 +02:00
Giuseppe D'Angelo 67dffd871f QPdf: do not write a /Filter key if we are not compressing
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>
2024-05-29 04:23:16 +02:00
Tor Arne Vestbø fd97a820df macOS: Add support for safe area margins
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>
2024-05-29 03:27:18 +02:00
Tor Arne Vestbø bee9de0452 iOS: Enable the Qt Print Support module
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>
2024-05-29 03:27:18 +02:00
Lorn Potter d67d49f45e wasm: fix uri-list handling urls
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>
2024-05-29 08:18:06 +10:00
Alexey Edelev 3073b9c4de Ensure that libzstd targets are promoted to global if they were found
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>
2024-05-29 00:18:06 +02:00
Giuseppe D'Angelo 0effdc98dc PDF: fix the encoding for the file name of attachments
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>
2024-05-28 21:17:46 +02:00
Giuseppe D'Angelo e95812df85 QDateTime::fromStdTimePoint: fix the constraint
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>
2024-05-28 21:11:23 +02:00
Giuseppe D'Angelo cbbe28d85c QPdf: cleanup date formatting in the XMP metadata
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>
2024-05-28 21:11:23 +02:00
Marc Mutz d61060dabf QString: toward UTF-8 arg() support [1/4]: port Part to QAnyStringView
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>
2024-05-28 21:11:23 +02:00
Tatiana Borisova 9f4f4efb62 Put conditioned header under appropriate feature configuration
- Add #if QT_CONFIG(itemmodel) for qitemselectionmodel.h usage
in removed_api.cpp

Amends 6324075a2d

Change-Id: If979d954caa6992a1e38675e8309fb33fe6b1ea2
Reviewed-by: Tasuku Suzuki <tasuku.suzuki@signal-slot.co.jp>
Reviewed-by: Ivan Solovev <ivan.solovev@qt.io>
2024-05-28 21:11:23 +02:00
Kai Köhne 469367dc08 Doc: Hint about QtMsgType order
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>
2024-05-28 20:19:14 +02:00
Fabian Kosmale 5573ca3599 qt.conf: add private "merge_qt_conf" option
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>
2024-05-28 20:19:14 +02:00
Vlad Zahorodnii 59b7e143a9 xcb: Correctly report whether QInternalMimeData::retrieveData_sys() fails
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>
2024-05-28 18:19:14 +00:00
Kai Köhne a92f0e1a84 qmake: Do not disable deprecation warnings for MSVC (C4996)
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>
2024-05-28 20:19:14 +02:00
Marc Mutz 54f2229714 QChar: remove QT_IMPLICIT_QCHAR_CONSTRUCTION opt-in
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>
2024-05-28 19:52:06 +02:00
Marc Mutz a6d2e45d57 tst_QString: add more checks for unary arg() calls
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>
2024-05-28 17:52:06 +00:00
Christian Ehrlicher 0efd2e084d QIcon/QIconLoader: misc cleanup
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>
2024-05-28 19:52:06 +02:00
Christian Ehrlicher 94919aea6a Doc: remove all \since 4.x comments in gui/image
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>
2024-05-28 19:52:06 +02:00
Marc Mutz 89f184b403 QLatin1StringView: fix UB in "a"_L1 <> nullptr
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>
2024-05-28 19:07:44 +02:00
Axel Spoerl a910daf526 QDockWidget::setFloating() - reparent floating tab to main window
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>
2024-05-28 15:41:15 +02:00
Giuseppe D'Angelo a9ba0e9634 PDF: emit the Trapped entry in the document info dictionary
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>
2024-05-28 15:25:04 +02:00
Allan Sandfeld Jensen 5a2b222619 Fix alpha scaling in format changing qcolortransform
Fixes: QTBUG-125306
Change-Id: I5da11df7a27d1947772f5b90a717df1e258fde45
Reviewed-by: Giuseppe D'Angelo <giuseppe.dangelo@kdab.com>
2024-05-28 15:22:52 +02:00
Michał Łoś 480d9bb67d Skip tst_QProcessEnvironment::systemEnvironment on VxWorks
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>
2024-05-28 15:22:20 +02:00
Marc Mutz e0d87f70d8 Replace QUuid::toRfc4122() with toBytes() where possible
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>
2024-05-28 12:39:27 +00:00
Giuseppe D'Angelo 19e3ec4e2f QImage: allow for scaling CMYK images
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>
2024-05-28 10:06:08 +02:00
Lucie Gérard 1e0bc86dc0 Add copyright and licensing to .cpp and .h files missing them
Task-number: QTBUG-124453
Change-Id: I4487791114ce8ee6d2e788cc9a5f2ea5ec162f6b
Reviewed-by: Kai Köhne <kai.koehne@qt.io>
Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
2024-05-28 09:47:01 +02:00
Giuseppe D'Angelo e5a5fe7e29 QCmyk32: make it equality comparable
... because it is. It's also convenient for tests.

Change-Id: I1b9e21763f62c446890ddd5970df25fcae9484b7
Reviewed-by: Allan Sandfeld Jensen <allan.jensen@qt.io>
2024-05-28 01:23:42 +02:00
Christian Ehrlicher 8931f2c836 SQLite: Update SQLite to v3.46.0
[ChangeLog][Third-Party Code] Updated SQLite to v3.46.0

Pick-to: 5.15 6.2 6.5 6.7
Change-Id: I9029055f8ba1b3a3156b039f830dcf900c77bfc9
Reviewed-by: Kai Köhne <kai.koehne@qt.io>
2024-05-28 00:02:04 +02:00
Assam Boudjelthia 0c30c8b916 Android: keep QtNative.onNewIntent() public to not break NFC usecase
Fixes: QTBUG-122456
Change-Id: If5b91d12a0ed324458d3d23d78226dbf91e3812c
Reviewed-by: Juha Vuolle <juha.vuolle@qt.io>
Reviewed-by: Tinja Paavoseppä <tinja.paavoseppa@qt.io>
2024-05-27 20:11:42 +00:00
Tasuku Suzuki 0e3aa48c09 Fix build with -no-feature-easingcurve
Amends a4341827ac.

Change-Id: Id0113d7c127365b6efbbdf4758bd6d25a6a33504
Reviewed-by: Ivan Solovev <ivan.solovev@qt.io>
2024-05-27 20:11:42 +00:00
Fabian Kosmale ef2912334c QLibraryInfo: Introduce paths
QLibraryInfo::path only allows a single value, however, at least for
QmlImportsPath we would benefit from having more than one to ease
deployment (note that this is unrelated to  Qml2ImportsPath which was
necessary to support QML 1 and 2 in a single Qt install).

Users inside Qt will ported in follow-up patches where it makes sense.

[ChangeLog][QLibraryInfo] qt.conf now allows providing mutliple paths,
and QLibraryInfo has a new paths method to fetch all of them.

Task-number: QTBUG-124009
Change-Id: I78b3bcfa94c8d975dbd789f6826cda4fc5e60403
Reviewed-by: Alexandru Croitor <alexandru.croitor@qt.io>
2024-05-27 20:50:47 +02:00
Andy Nichols f65d11ecbf visionOS: Handle Spatial Events
This patch enables the handling of spatialEvents from SwiftUI. Since
these events do not have ObjectiveC structs, for now we serialize them
to JSON and pass them to Qt for usage later in Spatial applications.

These events just cover the built-in gestures like pinch "clicking"
etc.

Change-Id: I8368683259eb64277083cf345ca3a5ed9af32ecf
Reviewed-by: Tor Arne Vestbø <tor.arne.vestbo@qt.io>
2024-05-27 16:38:36 +00:00
Tor Arne Vestbø 73a11c9d6a Emit QPrintDialog::accepted(QPrinter*) before QDialog::finished
As part of d8bbb5ee0e the order of
QDialog::accepted/rejected and QDialog::finished was changed so
that the latter came last. This has been the behavior now for
the entire Qt 6 series.

QPrintDialog didn't pick up on this new behavior, and was emitting
the QPrintDialog::accepted(QPrinter*) signal after calling the
dialog's done() method, which resulted in emitting finished before
the QPrintDialog printer-specific accepted signal. Clients such as
the textedit example, who would "clean up" in finished() would then
crash when processing the accepted signal.

We now emit QPrintDialog::accepted(QPrinter*) at the same time as
the dialog's accepted signal. The natural place to do this would be
the QPrintDialog constructor, but that's spread out and duplicated
between all the platform specific print dialog implementations, so
we do it via a single shot connect instead in QPrintDialog::done.

[ChangeLog[Print support] QPrintDialog::accepted(QPrinter*) is now
emitted before QDialog::finished, in line with QDialog::accepted.

Pick-to: 6.7 6.5
Change-Id: Idade32b667bdf7b81845025b8d83f08a551d32bb
Reviewed-by: Axel Spoerl <axel.spoerl@qt.io>
2024-05-27 18:38:36 +02:00
Timothée Keller 8a5fed6da4 Windows QPA: Prevent restoreGeometry from showing hidden windows
When we use GetWindowPlacement, the showCmd parameter will NOT be
SW_HIDE, even if the window is hidden. To prevent showing a hidden window
with SetWindowPlacement, change showCmd if the window is currently hidden.

Amends 21e4116874

Fixes: QTBUG-120415
Pick-to: 6.7
Change-Id: Ib7de369a6d1a530fdeb5ff930097ae06e25761f3
Reviewed-by: Oliver Wolff <oliver.wolff@qt.io>
Reviewed-by: Zhao Yuhang <yuhangzhao@deepin.org>
2024-05-27 15:22:41 +00:00
Ivan Solovev 88702cc87c QDate: fix C++20 builds with MSVC
Commit c4f7dba81e reworked the C++20
QDate constructors and introduced a helper stdSysDaysToJulianDay()
method. However, the QT_POST_CXX17_API_IN_EXPORTED_CLASS was not used
on this new helper function.
As a result, an application which is built with C++20 but uses a
pre-built QtCore that is built with C++17 cannot call QDate constructors
with the new std::chorono types.

An obvious fix is to add the missing macro to the function.
However, we cannot do it directly, because the function is exported
in C++20 builds, and adding the macro will unexport it.

Use QT6_{DECL,CALL}_NEW_OVERLOAD_TAIL macros to add a new overload of
the stdSysDaysToJulianDay() function and mark it as
QT_POST_CXX17_API_IN_EXPORTED_CLASS.

Keep the old function under the QT_VERSION < Qt 7 check to keep BC.

Amends c4f7dba81e.

Fixes: QTBUG-125610
Pick-to: 6.7
Change-Id: I999354da51ee58c3691dbc1c0351be15a18a268b
Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
2024-05-27 16:14:35 +02:00
Viktor Arvidsson 5b7422f74d QWindowsMime: Fix loading of CF_DIB (non-v5)
Drag-dropping and image from for example photoshop didn't work in Qt6
due to a (probably?) copy paste error in the commit
8fa91c75ad

Pick-to: 6.7 6.5
Change-Id: I18dedc09596fe590e915e3aa526131f2d6957d8b
Reviewed-by: Giuseppe D'Angelo <giuseppe.dangelo@kdab.com>
Reviewed-by: Eirik Aavitsland <eirik.aavitsland@qt.io>
2024-05-27 16:14:35 +02:00
Assam Boudjelthia e8e369714b Android: bump default sdk build version for Java to 34
To allow using Android 14 APIs, this affects only Java
code.

Amends 7b84cd62b0.

Change-Id: Ie79df773499976ba5c847be98ff5d21ee55036e9
Reviewed-by:  Alexey Edelev <alexey.edelev@qt.io>
2024-05-27 17:14:35 +03:00
Assam Boudjelthia 4438aa5338 Android: use double quotes with androiddeployqt docs
... to avoid coloring mismatch in the generated doc page
of the tool.

Change-Id: I4334d49632c5f119a874e9112d4f13cd4d60e27a
Reviewed-by:  Alexey Edelev <alexey.edelev@qt.io>
2024-05-27 17:14:34 +03:00
Assam Boudjelthia 89937077da Android: rectify class visibility and cleanup for child windows support
* Make classes that don't need to be public as package private
* Remove dead code that serves no purpose now.
* Use lambdas when needed.
* Use @UsedFromNativeCode for methods called from native code.

Change-Id: Ie34eec079366fb3ef048e0f49e03f507cdf90e97
Reviewed-by: Tinja Paavoseppä <tinja.paavoseppa@qt.io>
2024-05-27 13:53:21 +00:00
Alexey Edelev 7d9d1220f3 Prefer using the non-suffixed libzstd over static one
Recent zstd versions provide the libstd target but not only libzstd_shared
or libzstd_static. Attempt to use it as the WrapZSTD::WrapZSTD counterpart
if the target exists.

Task-number: QTBUG-119469
Change-Id: I47916bfa6f10883d099184a497800277c8026b14
Reviewed-by: Alexandru Croitor <alexandru.croitor@qt.io>
2024-05-27 15:53:21 +02:00
Mårten Nordheim 9f2dc6d17f Fixup (u)int128 to latin support
MSVC compilers that could use both branches ended up
using one branch for some things and another branch for
other things, which didn't mix and caused build failures.

And in the header the #include was inside the Qt namespace
and caused internal build errors during parse.

Amends 9d693dbfb1

Change-Id: I1a77abe1fefd21ea3256f5b2d5a55998257762e5
Reviewed-by: Christian Ehrlicher <ch.ehrlicher@gmx.de>
2024-05-27 13:40:30 +02:00
Soheil Armin f3f383f097 Android: Add autotest to verify the content of an AAR target
This will build a multi-abi Android AAR target and verifies
its content using a customer target "verify_aar" by running
zipinfo on the AAR, and comparing its content with a subset
of files that are expected to be present in the package.

Task-number: QTBUG-125483
Change-Id: I19ad132bbad1a75c40b00de173ca09ad56500076
Reviewed-by: Alexandru Croitor <alexandru.croitor@qt.io>
2024-05-27 07:57:47 +00:00
Tim Blechmann 4656fabd8a Widgets: silence clang's -Wimplicit-fallthrough
clang's fallthrough detection is a little stricter than gcc.

Pick-to: 6.7
Change-Id: If1052275f035a8e8a496cc5a40a21137d18712e3
Reviewed-by: Volker Hilsheimer <volker.hilsheimer@qt.io>
2024-05-27 08:55:58 +08:00
Giuseppe D'Angelo 274f7bfbf5 PDF: fix typo
This work has been kindly sponsored by the QGIS project
(https://qgis.org/).

Change-Id: I9e1c26749579d645699a180dac88a00e8653ed65
Reviewed-by: Tobias Koenig <tobias.koenig@kdab.com>
Reviewed-by: Albert Astals Cid <aacid@kde.org>
2024-05-26 14:56:15 +02:00
Christian Ehrlicher 373ae6cbd2 SQL/IBase: add partial support for SQL_INT128 datatype
Implement partial support for SQL_INT128 datatype which is used for
DECIMAL/NUMERIC columns with a precision > 18. This support is only
available when QT_SUPPORTS_INT128 is defined and for MSVC.
Binding values to columns which need SQL_INT128 is supported but
numbers given as QString will be converted to doubles even if
QSql::HighPrecision is set.

[ChangeLog][SQL][IBASE] Added support for SQL_INT128 datatype.

Task-number: QTBUG-124575
Change-Id: If3fb1eb0f19dc60f000d163f3bf45da7acb08c87
Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
Reviewed-by: Andreas Bacher <andi.bacher@outlook.com>
2024-05-25 22:25:12 +02:00
Christian Ehrlicher e9c6adb992 SQL/IBase: factor out setting numeric values
Factor out setting numeric values for better readability.

Change-Id: I8980c63e87934e3bc3777897e9cd42aef17caf51
Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
2024-05-25 22:25:10 +02:00
Christian Ehrlicher 9d693dbfb1 QLocale tools: add q(u)int128toBasicLatin()
Add q(u)int128toBasicLatin() as helper functions until QString::number()
natively supports q(u)int128.

Change-Id: I920dff145eaa4e849d1f340ca5d5491d2da2821a
Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
2024-05-25 20:25:08 +00:00
Ahmad Samir 28fd273080 QDirListing: begin() should start iteration from square 0
The old behavior was that calling begin() calls
QDirListingPrivate::advance(), if you call begin() again, it would call
advance() a second time. Not the most intuitive of APIs, but it wasn't
any worse/different from QDirIterator Java-style hasNext()/next() (if
you call next() twice, you advance twice).

Now (c)begin() always starts iterating from the very beginning.

Amends c39a0d1e89

pushDirectory(initialEntryInfo) is now called from beginIterating(), so
don't call it in init().

Not using a std::stack because beginIterating() needs to clear the
iterator containers; for some reason on INTEGRITY something like this
won't work (std::stack doesn't have clear()), complaining about the
constructor being explicit:
nativeIterators = {};

The above works just fine on Linux, so instead of having to spell out
the type... just use std::vector directly (back(), pop_back() and
clear()); this is private API so we have full constrol on how the
vectors are used.

Change-Id: Iaaa849f989b2724bf070730f6273263289dd4d9c
Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
2024-05-25 21:41:31 +03:00
Thiago Macieira 56568fdee6 QByteArray::setNum: use assign() instead of clear()+append()
clear() will shed any stored capacity, so that's a waste for the few
people who actually use setNum(). The majority use it from number(), in
which case the clear() is superfluous anyway.

And append() does an extra strlen() check, which we don't need.

This considerably reduces the size of both QByteArray::setNum() in a GCC
LTO build (though the compiler chose to not inline assign()). Moreover,
it now does inline setNum() in the number() functions and in a lot more
places (searching for "qulltoa2" in the disassembly finds it in
QFileSystemEngine::id, for example).

Change-Id: If3345151ddf84c43a4f1fffd17d28f2fc79aa072
Reviewed-by: Mårten Nordheim <marten.nordheim@qt.io>
2024-05-25 15:14:20 +00:00