- Fix the number of months in each duration
- Move the user Country enum to use QLocale::Territory
- Properly calculate the cost per month to match the UI label
- Use QLocale to format the price display text
- Fix some misspellings and grammar in the doc
Pick-to: 6.2 6.5
Change-Id: I78a64f344073070cd94d5cb4a8a4c7c13afa337f
Reviewed-by: Paul Wicking <paul.wicking@qt.io>
This example shows how to use QtConcurrent::run by calling a global
function and printing the thread ID. As the documentation already
explains the functionality very well, I don't think this example is
necessary.
https://doc.qt.io/qt-6/qtconcurrentrun.html
Task-number: QTBUG-111165
Pick-to: 6.5 6.5.0
Change-Id: I42a718cdaabdaeeab39b933d12c67d11978c95da
Reviewed-by: Ivan Solovev <ivan.solovev@qt.io>
This example only demonstrates the use of blockingMapped. Considering
that the QtConcurrent::mapped~ functions are already included in the
wordcount example, and have very similar APIs to the
QtConcurrent::filter~ functions, which are included in the
progressdialog example, this no longer serves a useful purpose.
Task-number: QTBUG-111165
Pick-to: 6.5 6.5.0
Change-Id: Ibc526e1a9fb17070e376e45151e9c2bdbc69bd32
Reviewed-by: Ivan Solovev <ivan.solovev@qt.io>
Updated the example to align with the Qt6 Example-Guideline.
https://wiki.qt.io/Qt6/Example-Guideline
Task-number: QTBUG-111165
Pick-to: 6.5 6.5.0
Change-Id: Ibd9e7ce0d4dee90f6a693b81516d2f5b86345b1d
Reviewed-by: Mårten Nordheim <marten.nordheim@qt.io>
QAIM::match() supports different matching modes. The wildcard match mode
was never meant to be specifically a filepath globbing wildcard, but
rather a generic one -- something like "*" should match into a
string like "a/b/c". This is a regression from Qt 5, where
QRegExp::Wildcard was ported to only allow for path globbing
rather than generic matching.
[ChangeLog][QtCore][QAbstractItemModel] QAbstractItemModel::match()
now uses more generic wildcard matches rather than file path globbing.
Please refer to the documentation of
QRegularExpression::wildcardToRegularExpression() for more information
about the differences.
Change-Id: I28b8a76b01fdd9c5dd8f99528fac1c7b704564bc
Fixes: QTBUG-104585
Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
Amends 76c63936d3 by adjusting the test case.
We still just test that we can open a file based on a filename that we came
up with ourselves.
Also, update usage documentation and make the snippet a bit more relevant.
Change-Id: I5bf00210d74e2a73d5a71a09a5beb1b3f6f8e225
Reviewed-by: Axel Spoerl <axel.spoerl@qt.io>
Reviewed-by: Tor Arne Vestbø <tor.arne.vestbo@qt.io>
In an attempt to avoid situations like the linked bug-report from
happening again, discard cached entries with no headers and ignore
entries where the payload is smaller than what the header specified (if
it specified anything).
In a future revision we might want to add a length to the cache's
metadata, potentially with a checksum trailing the content.
Task-number: QTBUG-111397
Pick-to: 6.5 6.4 6.2
Change-Id: Ie40149ffdaff7886bcd44cbd45605bdb7918e105
Reviewed-by: Konrad Kujawa <konrad.kujawa@qt.io>
Reviewed-by: Timur Pocheptsov <timur.pocheptsov@qt.io>
QTemporaryFile is not designed to promote temporary files
to non-temporary files. So, it, quite importantly, does not
care if the content of the files are flushed to disk before
renaming it into its 'final' destination. This is what
QSaveFile is for.
This was much more time-consuming than intended since I had to debug
this quirk about calling size().
Pick-to: 6.5 6.4 6.2
Fixes: QTBUG-111397
Change-Id: I15b300f6a5748ad3a0be983545ea621269a12ecd
Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
Add support for shader input output interface blocks in Metal
tessellation pipelines. This feature is builtin to other rhi supported
tessellation backends (OpenGL/Vulkan).
Metal tessellation is implemented as compute pipelines for vert and
tesc, and a render pipeline for tese and frag. The shader conversion
from GLSL is handled by SPIRV-Cross, which has a particular way of doing
things. Rhi must setup the vertex inputs for the tese - frag render
pipeline to read from buffers written by the tesc compute pipeline,
following SPIRV-Cross conventions. This includes ensuring correct
memory alignment per MSL Specification.
In order to enable input output interface blocks, reflection of struct
members of QShaderDescription::InOutVariable is required. Reflection of
QShaderDescription::BuiltinVariable array dimensions is also required to
support variable size tese builtin input gl_ClipDistance.
An acompanying patch to QtShaderTools is required.
Change-Id: Id94e86caef211485afc187bb79fe3d0619d02cf0
Reviewed-by: Qt CI Bot <qt_ci_bot@qt-project.org>
Reviewed-by: Laszlo Agocs <laszlo.agocs@qt.io>
QPropertyAlias might be deprecated, but using it should still not fail
to compile.
Pick-to: 6.5
Fixes: QTBUG-111735
Change-Id: I486cddb424b60cd3e5c539e26afca3726e29bb09
Reviewed-by: Ivan Solovev <ivan.solovev@qt.io>
Templates have different overload characteristics from normal
functions, and treating q_no_char8_t and q_has_char8_t::QUtf8StingView
separately is never necessary, as one implicitly converts into the
other.
Add docs for the new UTF-8 compare() functions.
Amends b977ae371a.
Found in API review.
Pick-to: 6.5 6.5.0
Change-Id: I58b4b28a3eccde1976d71cfa3412b734d46f314d
Reviewed-by: Volker Hilsheimer <volker.hilsheimer@qt.io>
Without this plumbing we have no way of knowing if the QMessageBox
has a checkbox set, and can't decide to skip the native dialog,
leaving the user without the expected checkbox.
As the suppression checkbox on macOS can be customized, we can use
this plumbing to actually provide native dialog support for generic
check boxes.
This mechanism can also be used by QErrorMessage, which now matches
behavior between native and non-native dialogs in terms of the label
of the checkbox and its initial state. We might want to tweak this
in the future, since user's might expect the suppression label and
state to match the system default, but that's something we can
expose from the platform theme if so, and should apply equally
to the non-native dialog.
Fixes: QTBUG-111803
Pick-to: 6.5.0 6.5
Change-Id: Ied9fc34383fe79fbd8437592ad1c1993b9396178
Reviewed-by: Volker Hilsheimer <volker.hilsheimer@qt.io>
If a composite widget is put behind one of it's contained children via
QWidget::setTabOrder, then our logic might replace the composite widget
with the contained child. In that case, we'd end up with a broken tab
chain, possibly resulting in incomplete clean-ups and triggering asserts
when shutting down the UI.
Handle this by stopping the last-child searching logic at the respective
other widget, and by not allowing both widgets to be the same.
Augment test case, and apply some minor refactoring to the code.
Pick-to: 6.5 6.2
Change-Id: I7d97dfa85315b6c01daa283253025d94a1727048
Reviewed-by: Axel Spoerl <axel.spoerl@qt.io>
The choice of whether to show a message again is per message,
so when showing a new message we need to reset the check box
back to its default checked state, otherwise the user might
mistakenly dismiss more than the indented message.
[ChangeLog][Widgets] QErrorMessage will now reset the check
box for showing a message again for each new message shown,
as each individual message has its own suppression state.
Pick-to: 6.5 6.5.0
Change-Id: I86d4bb5eabdb5b7a478c03516108a5edf87fcbe3
Reviewed-by: Volker Hilsheimer <volker.hilsheimer@qt.io>
This is related to QTBUG-110978, but not a complete fix.
Task-number: QTBUG-110978
Change-Id: I91b757addde8213ba3d356a590f6e4cf68187c31
Reviewed-by: Alexandru Croitor <alexandru.croitor@qt.io>
current Qt version doesn't even support Android sdk 14 and below.
Pick-to: 6.5
Change-Id: I5e06e375d446639211d97f4792401f0f9f8d62f8
Reviewed-by: Juha Vuolle <juha.vuolle@qt.io>
Removed side panel and swipe to remove examples as part of patchset
3bc6f344a8f10699313c3e0c9236dd6945edd895 and updated docs to reflect
that change.
Fixes: QTBUG-110989
Pick-to: 6.5.0
Change-Id: I6241dd9842b1584e3dd25057591fe29eaa34d579
Reviewed-by: Mitch Curtis <mitch.curtis@qt.io>
The parameter names were previously "lhs" and "rhs", which is incredibly
abstract for a testing framework. One of the parameters will tend to be
a baseline value to compare against while the other is the result of
some action we want to test. Thus I suggest they be renamed "computed"
and "baseline".
This way we can, hopefully, retain the semantic that the 'left'/first
argument is the computed ('actual' in QCOMPARE) value while the
'right'/second argument is the baseline ('expected' in QCOMPARE.)
Change-Id: I3e0fdce2a3f1faca06fdf7184ef6e0eb9724d990
Reviewed-by: Ivan Solovev <ivan.solovev@qt.io>
The new method has been renamed from markDirty to notify.
Fixes: QTBUG-111267
Pick-to: 6.5 6.5.0 6.4
Change-Id: Ib7926a315cfd11ca6930c785290089b7031d34ff
Reviewed-by: Fabian Kosmale <fabian.kosmale@qt.io>
The pages are supposed to use the \keyword command to provide a target
for the versioned command name.
Pick-to: 6.5 6.5.0
Change-Id: Ic91f5becc80985622a691aba96ce2c4e2984078e
Reviewed-by: Volker Hilsheimer <volker.hilsheimer@qt.io>
They were only set by QCocoaWindow::setContentBorderThickness(),
which was removed in 19fc78e967.
Pick-to: 6.5
Change-Id: Ia1b429c56c9627506023b76bddf878a4321d5f0b
Reviewed-by: Doris Verria <doris.verria@qt.io>
It semantically applies during platform window initialization, and
doesn't depend on the logic of choosing an appropriate NSWindow class.
Pick-to: 6.5
Change-Id: Ia24a2deafc78ed4c79df766b6372ad64de2d0dde
Reviewed-by: Doris Verria <doris.verria@qt.io>
The opacity is a property of NSWindow.
There's no point in pulling out the opacity from QWindowPrivate,
as QWindow has a public accessor for it. And we don't need to
guard the call with a check for non-1.0 opacity. If we want
logic to avoid redundant calls to the platform APIs, they
should be in the setter.
Pick-to: 6.5
Change-Id: Ic9b8d1051f30d3b7e09dae14b9f22ca899d05865
Reviewed-by: Volker Hilsheimer <volker.hilsheimer@qt.io>
ODBC can (similar to DB2) return more than one native error code for an
error but only the last one was recorded which may made the error
diagnostic more complicated. Therefore return a concatenated list of
native error codes the way it's done for DB2.
[ChangeLog][SQL][ODBC] QSqlError::errorCode() might return a semicolon
separated list of native error codes.
Fixes: QTBUG-45087
Change-Id: I70d02adeb33e72897f13e0c72fbbd2c60f307e2f
Reviewed-by: Volker Hilsheimer <volker.hilsheimer@qt.io>
A glob pattern has different semantics depending on whether
it's used in "filepath mode" (FNM_PATHNAME) or not.
QRegularExpression only implemented the former, but the latter
is also useful, and possibly more "intuitive" for certain use
cases (e.g. offering users a simplified version of regexps that
however still need "*" to match a "/").
Add this support. The problems highlighted by QTBUG-111234 have
not been addressed, I've just amended a bit of documentation
relating backslashes.
[ChangeLog][QtCore][QRegularExpression] Support for non-filepath
wildcards has been added to wildcardToRegularExpression().
Fixes: QTBUG-110901
Task-number: QTBUG-104585
Task-number: QTBUG-111234
Change-Id: If9850616267980fa843bda996fcb4552b5375938
Reviewed-by: Eike Ziller <eike.ziller@qt.io>
Reviewed-by: Samuel Gaist <samuel.gaist@idiap.ch>
Reviewed-by: Volker Hilsheimer <volker.hilsheimer@qt.io>
Not relevant for the CI as that does not run with any real Vulkan
implementation. (and Lavapipe works if that's used)
As the investigation in the Jira issue shows, there is no proper
conclusion yet on why rendering to a slice of a 3D texture breaks
the content of other slices that have image data written to them
before that render pass targeting the slice. It would seem that
transitioning to COLOR_ATTACHMENT_OPTIMAL has some unexpected
consequences for slices that are not targeted by the render pass
with Mesa on Intel.
(NB rendering to a given 3D texture slice works via
VK_IMAGE_CREATE_2D_ARRAY_COMPATIBLE_BIT; and how often this is needed
in practice is unclear, typical volume rendering cases will anyway
likely just upload data to the slices of a 3D texture, not rendering
to them)
The problem is still clearly visible in the tex3d manual test (when run
on affected Linux machines), this we keep unchanged for the time being
so that the issue can be examined further. However, the autotest is
changed to prevent the issue from occurring (render to slice first,
then upload to other slices) since it causes confusion when the test
is run locally on various developer machines.
Pick-to: 6.5
Task-number: QTBUG-111772
Change-Id: I4dc4c2413f8c518f377a33065992ad786a5ff44f
Reviewed-by: Andy Nichols <andy.nichols@qt.io>
Separate 1D mipmap generation support from rendering into an 1D texture.
Those are two independent features, so have a separate feature flag for
both instead of using just one.
This will then be symmetric with the 3D texture features, where now we
have a new flag to report support for generating mipmap for 3D textures.
(whereas 3D texture as a render target is already covered by
RenderTo3DTextureSlice)
Change-Id: Ie5e1f056a7d1c341d90cd7fc522877a3f2da3290
Reviewed-by: Andy Nichols <andy.nichols@qt.io>
MOC was failing to compile due to invalid arguments passed by the CMake
scripts. Notably, because of the "-D" without option that might "eat"
the command behind it.
On Wasm, the empty "-D" argument was eating up the following "-o",
leaving MOC clueless about the "extra" arguments that actually followed
the "-o".
Cleanup the passed arguments in _qt_internal_create_moc_command
to avoid passing -D or -I without macroname or include path.
Also, it seems that -D was passed multiple times: fix the remove
duplicates feature of _qt_internal_create_moc_command to recognize all
duplicates: instead of removing duplicates and then joining the argument
lists together, first join them and then remove the duplicates.
Fixes: QTBUG-111717
Change-Id: Ibf8cd69f162e50afa43bc27e8c242240b92b1a25
Reviewed-by: Qt CI Bot <qt_ci_bot@qt-project.org>
Reviewed-by: Ulf Hermann <ulf.hermann@qt.io>
Reviewed-by: Alexandru Croitor <alexandru.croitor@qt.io>
Reviewed-by: Fabian Kosmale <fabian.kosmale@qt.io>
The NSAlert does not stay open when ran from a nested event loop,
so we need to fall back to the cross platform dialog. The window
modal dialog does not have this issue.
Fixes: QTBUG-111524
Pick-to: 6.5 6.5.0
Change-Id: I63fba0a092018bb19edeef78c06587455d752235
Reviewed-by: Timur Pocheptsov <timur.pocheptsov@qt.io>
Hide divs that are responsible for resizing the window and changing the
appearance of the cursor on this window if this window is not resizable.
Fixes: QTBUG-111618
Change-Id: I1948eaedf02fdd2a5289ae314521b3fd74ad7811
Reviewed-by: Mikołaj Boc <Mikolaj.Boc@qt.io>
The polyfill for file input on WASM now makes use of the supplied
filter list.
Some changes were introduced in the abstraction for filters so that
they are usable both for the new file API and the legacy file input.
Change-Id: Id6341be4d6a1647e17382d13da7be42491cfaf80
Reviewed-by: Morten Johan Sørvig <morten.sorvig@qt.io>
Manual tests are supposed to display UI and be assessed manually, but
currently they use the auto test runner by mistake.
Use the normal wasm shell to fix this and make them work like usual
applications.
Fixes: QTBUG-111753
Change-Id: I9d3c0ad56e913b73737c5b72087e82980989d8b8
Reviewed-by: Morten Johan Sørvig <morten.sorvig@qt.io>
Reviewed-by: Alexandru Croitor <alexandru.croitor@qt.io>
The note that QSqlDatabase::exec() is deprecated was added more than 12
years ago so it's time to also mark the function as such.
Change-Id: Ic5e7c31b3ff5b21e16e2640548cba1a4baaeeb1c
Reviewed-by: Volker Hilsheimer <volker.hilsheimer@qt.io>
Apple lets us know that:
warning: 'sprintf' is deprecated: This function is provided for
compatibility reasons only. Due to security concerns inherent
in the design of sprintf(3), it is highly recommended that you
use snprintf(3) instead.
Pick-to: 6.5
Change-Id: I3130b3c7b636466b5e77adc5cb05ad4ce1faee11
Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
We test moc's support for [[deprecated]], so don't warn about it.
Pick-to: 6.5
Change-Id: Ifda2b81c14cb9802db4bb1d0a1eb17d978ad492a
Reviewed-by: Fabian Kosmale <fabian.kosmale@qt.io>
Supressing the linking warnings on macOS are relevant when we are
using AppleClang and not upstream Clang.
The provided arguments do not apply to llvm-ar and llvm-ranlib.
Change-Id: I8b664c01802b47077eb0ab80dab7681ee0bfcaa9
Reviewed-by: Tor Arne Vestbø <tor.arne.vestbo@qt.io>
When doing a top-level build with ExternalProject examples, it doesn't
make sense to make qtbase examples depend on e.g. qtdeclarative
plugins. Instead the qtbase example should only depend on plugins
built in qtbase.
Create per-repo custom targets that depend on all plugins built within
that particular repo.
Create an additional per-repo target which depends on all
plugins built in that repo, as well as plugins from dependent repos.
Use the latter as a dependency for examples built as part of the
current repo.
Repo dependencies are parsed from dependencies.yaml.
Pick-to: 6.5
Fixes: QTBUG-110913
Change-Id: I149860cc549caf53271c9ea296eb7bac2a663715
Reviewed-by: Alexey Edelev <alexey.edelev@qt.io>
Reviewed-by: Amir Masoud Abdol <amir.abdol@qt.io>
Reviewed-by: Joerg Bornemann <joerg.bornemann@qt.io>
Recent Emscripten 3.1.27 reduces the stack size to 64KB,
which is way to small for Qt-based applications.
Restore the previous stack size (5 MB) by setting STACK_SIZE.
Change-Id: I6c25e31b32dc1d551fa423655fcef4891830bcd1
Reviewed-by: Piotr Wierciński <piotr.wiercinski@qt.io>
Reviewed-by: Lorn Potter <lorn.potter@gmail.com>
remove toHex() as it's not used at all and qTableName() with two params.
Also remove some SQLite 2 specific stuff
Change-Id: If285febdfbee5833f7174d70f386bd54674bd539
Reviewed-by: Qt CI Bot <qt_ci_bot@qt-project.org>
Reviewed-by: Volker Hilsheimer <volker.hilsheimer@qt.io>
Comparing the first character ahead of a strcmp() call is unlikely to
result in faster code than just calling strcmp() right away these days.
Any compiler worth its salt should have a specialization of strcmp()
that uses platform-specific tricks to produce the best performance.
Change-Id: I80b74e698a6636d056b44cbef372edcb417534eb
Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
Reviewed-by: Qt CI Bot <qt_ci_bot@qt-project.org>
Reviewed-by: Fabian Kosmale <fabian.kosmale@qt.io>
This code predates the public history. I don't know exactly how this
worked before, but I guess it's because the QT_USE_NAMESPACE in our
headers.
If there's _any_ get() function at the global scope, then name lookup
stops there and considers _only_ that function. And if that happens to
have a compatible signature, good night.
Use unqualified lookup instead. That will find the QT_NAMESPACE one,
ignoring other overloads at global scope. And when non-namespaced,
will emit an ambiguity error in the presence of another matching get()
function at global scope.
Task-number: QTBUG-111598
Pick-to: 6.5 6.4 6.2 5.15
Change-Id: Iea141ea543193394ba527b414caf31c1f3a2355b
Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>