I couldn't find any examples in Qt's documentation of this when I was
trying to use it in a project.
Pick-to: 5.15 5.12
Change-Id: Ic7b7b71f219b2c1012829980866940b9a77bd11f
Reviewed-by: Venugopal Shivashankar <Venugopal.Shivashankar@qt.io>
- Add examples of how to create QRgb values
- Link to qRgba()
Pick-to: 5.15 5.12
Change-Id: I2a86b1c8e00137ba868426b8157a3aa0d924d7a6
Reviewed-by: Venugopal Shivashankar <Venugopal.Shivashankar@qt.io>
If the thread pool was not created, or already deleted, make sure
the QImage routines can still run as they could before.
Fixes: QTBUG-87320
Pick-to: 5.15
Change-Id: I4105a68b6ae0637faf82cdda5f5ae44298759396
Reviewed-by: Eirik Aavitsland <eirik.aavitsland@qt.io>
[ChangeLog][QCosmeticStroker] Avoid a heap-buffer-overflow found by oss-
fuzz as issue 25243.
Pick-to: 5.12 5.15
Change-Id: I36112f183241679e172ad1ee531e1b929d6f3815
Reviewed-by: Eirik Aavitsland <eirik.aavitsland@qt.io>
Xdg-desktop-portal will reject any OpenFile request if there is an empty
filter. We will just simply skip it to avoid the rejection so users get
a file dialog.
Pick-to: 5.15
Change-Id: I85c056f46b22cdbc9e14010bc3c49206b6f8f002
Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
The original restriction to UniformBuffer was due to the GL backend
where there is no GL buffer object for QRhiBuffers with usage
UniformBuffer. However, we can still implement this for cases when
there is a true GL buffer object underneath. With other backends it
should all work as-is already.
This becomes useful when one has buffers with usage Vertex that need
full updates every frame. (f.ex. instance data)
Unfortunately this involves renaming the function. But while at it, add
an autotest case as well.
Change-Id: Iff59e4509a8bae06654cc92fe8428bd79eb012fb
Reviewed-by: Andy Nichols <andy.nichols@qt.io>
Set noexcept on functions where it applies.
Change-Id: I5efa632bd1652e1215e9c6d3b06dc40c948420d3
Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
The qsb files seem to be out of date for those two.
Change-Id: Id832e872667cac4d364e13c440011109a6dbdc7f
Reviewed-by: Andy Nichols <andy.nichols@qt.io>
...instead of doing a loop in setShaderResources() just for this.
Change-Id: Iac8d4517783967c6b8bca4926cceca918f7dcdec
Reviewed-by: Andy Nichols <andy.nichols@qt.io>
Draw 25000 cubes while doing a uniform buffer update for each.
Change-Id: I2216641c8bf7c6ea147fe3edd679317b472e1f04
Reviewed-by: Andy Nichols <andy.nichols@qt.io>
Avoid accessing the shared pointer table without using atomic.
Cleans up the shared table on exit for leak tracking utilities.
Pick-to: 5.15
Change-Id: Ia2d6d79dea1c8be02bae2d8111e290f49eedf409
Reviewed-by: Giuseppe D'Angelo <giuseppe.dangelo@kdab.com>
Moved the logic of finding a result in ResultStore to separate function
and parameterized it with QMap<...>. This is a pre-step to make find
procedure uniform regardless of the storage we are looking in (either
visible or pending as of now)
Change-Id: I41641d70751925f223e992f52fbc7814085c452d
Reviewed-by: Sona Kurazyan <sona.kurazyan@qt.io>
Pending results were never cleared by result store. This led to memory
leaks when the results never transitioned to "visible" results
Change-Id: I674302eb51542ad5f4d918da68d616428c73ae9f
Reviewed-by: Sona Kurazyan <sona.kurazyan@qt.io>
The value of NTDDI_VERSION is computed from _WIN32_WINNT. It makes
sense to keep these two in sync.
The value used to create the PCHs for _WIN32_WINNT is 0x601, and
qwindowspointerhandler.cpp requires for MinGW 0x603. Since the
precompile header value cannot be undefined while compiling the
source file, it's better not to use the PCH for this particular
source file.
These problems surface in a static build, in a regular build for
some reason the PCH for plugins is not used.
Change-Id: Id724490deb9c695ac00b26cd300f9d2382019ea2
Reviewed-by: Alexandru Croitor <alexandru.croitor@qt.io>
Reviewed-by: Joerg Bornemann <joerg.bornemann@qt.io>
It was previously casting enum values to int, which produced unhelpful
answers when a test failed. Better to have them as enum values that
get printed as their names, which are actually informative.
Change-Id: I1bf2971b1426bdbbc321bb48f45ee3e5799e76ec
Reviewed-by: Andrei Golubev <andrei.golubev@qt.io>
Reviewed-by: Mårten Nordheim <marten.nordheim@qt.io>
The script told me the wrong path to pass as first argument, so
correct that; and the README didn't mention the need to run it.
CLDR v37 makes no change to the actual generated data, though.
Tweaked wording of a comment in the script.
Task-number: QTBUG-84669
Change-Id: I56b510c666f414d9719cef650aeec6192c4fde6e
Reviewed-by: Andrei Golubev <andrei.golubev@qt.io>
Reviewed-by: Mårten Nordheim <marten.nordheim@qt.io>
This is confusing, especially because it's not used in the whole snippet.
Pick-to: 5.15
Change-Id: Ibd59646da2c77ac19a38441021c5e99f52015c95
Reviewed-by: Alexandru Croitor <alexandru.croitor@qt.io>
Adding mode flags doesn't make sense if you don't create a file
but only open if for reading.
Change-Id: I9307b07cbbcddea565fff9258de7f7beb373a8ad
Reviewed-by: Alexandru Croitor <alexandru.croitor@qt.io>
gcc 9.3 gives a warning when compiling with -O2:
‘strlen’ argument missing terminating nul [-Werror=stringop-overflow=]
This seems to be caused by a gcc bug that is not present in gcc 8
and fixed in gcc 10:
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=91490
Change-Id: Ice3c18efb7a41097521ecee22d060f175083c579
Reviewed-by: Giuseppe D'Angelo <giuseppe.dangelo@kdab.com>
As there is no other way of obtaining information about Qt's paths at the
moment, windeployqt is still querying qmake for these information. For a
cross compiled Qt, the proper target mkspec has to be set in this case.
Change-Id: I0b7b7719c9055d432576185ac4f7572a5ba1dd6b
Reviewed-by: Alexandru Croitor <alexandru.croitor@qt.io>
Reviewed-by: Joerg Bornemann <joerg.bornemann@qt.io>
The mkspec works with msvc 2019 as well. As 2017 is no
longer supported, we should reflect this reality in the
mkspecs naming.
Change-Id: Ib1165343d43fd50eebc5e4e598e653ddc4a9b1ab
Reviewed-by: Joerg Bornemann <joerg.bornemann@qt.io>
WindowsXPStyle cannot be instantiated via style factory
since 5.0. The derived class QWindowsVistaStyle still uses
much of its code, though.
Remove the XP-specific code as determined by
- Adding debug output with the enums added to WindowsXPStyle's
functions
- Run the widgets gallery example in Vista style
- Run the widgets gallery example in XP style
- From the lines not appearing in both logs
(comm -3), remove the code present in WindowsXPStyle
drawComplexControl() QStyle::CC_ComboBox
drawComplexControl() QStyle::CC_ScrollBar
drawComplexControl() QStyle::CC_SpinBox
drawControl() QStyle::CE_ComboBoxLabel
drawControl() QStyle::CE_HeaderSection
drawControl() QStyle::CE_ProgressBarContents
drawControl() QStyle::CE_PushButtonBevel
drawPrimitive() QStyle::PE_FrameLineEdit
drawPrimitive() QStyle::PE_IndicatorBranch
drawPrimitive() QStyle::PE_IndicatorProgressChunk
drawPrimitive() QStyle::PE_PanelItemViewItem
drawPrimitive() QStyle::PE_PanelLineEdit
sizeFromContents() QStyle::CT_SpinBox
standardIcon() QStyle::SP_CommandLink
standardPixmap() QStyle::SP_ArrowRight
standardPixmap() QStyle::SP_CommandLink
styleHint() QStyle::SH_Header_ArrowAlignment
Change-Id: Ic6a19cabf39d1089328a7cb1afdc282a60a7cf21
Reviewed-by: Oliver Wolff <oliver.wolff@qt.io>
When loading the tool packages from the host Qt we must ignore
QT_NO_CREATE_TARGETS. Otherwise tool targets like Qt6::moc are not
available.
Task-number: QTBUG-85080
Change-Id: I2c8c8e68863f28a4f1d9cd2f70090455c49d8df2
Reviewed-by: Alexandru Croitor <alexandru.croitor@qt.io>
QDateTime's addDays(), addMonths() and addYears() neglected to check
for validity before doing their job, with the result that they could
produce "valid" (but wildly inappropriate) results if used on an
invalid date-time. Added tests for this case (and the boundary).
Change-Id: I7b0d638501cb5d875a678cde213547a83ed7529e
Reviewed-by: Andrei Golubev <andrei.golubev@qt.io>
Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
QDateTime's range of possible values is wider than anyone generally
needs, but let's not do confusing things when someone does overflow
it.
Change-Id: Ifbaf7a0f02cd3afe7d3d13c829bf0887eba29f7f
Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
Reviewed-by: Andrei Golubev <andrei.golubev@qt.io>
Previously, a QDate representing more than about 0.3 gigayears before
or after the epoch would overflow the millisecond count and produce a
"valid" date-time that didn't represent the date and time passed to
its constructor. Changed to detect such overflow and produce an
invalid date-time instead, if it happens.
Corrected some tests that wrongly expected to be able to represent
extreme date-time values with every time-spec. The (milli)seconds
since epoch are from UTC's epoch, so converting to another offset,
zone or local time may give a value outside the actual range. Added
some tests for the actual exact bounds.
Task-number: QTBUG-68855
Change-Id: I866a4974aeb54bba92dbe7eab0a440baf02124f0
Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
Reviewed-by: Andrei Golubev <andrei.golubev@qt.io>
Also correct two comments which lied about the year being tested.
Change-Id: I5be491a2b2c1e0c3b49d6ff9a8de852e17321cff
Reviewed-by: Andrei Golubev <andrei.golubev@qt.io>
Reviewed-by: Mårten Nordheim <marten.nordheim@qt.io>
As suggested by the message from QTestLib. This, indeed, fixed the
sadistic test. Also, make sure resources are not leaked.
Pick-to: 5.15
Fixes: QTBUG-87009
Change-Id: Id693a5a562ea5ebacc853e5fc0ab9654ba851e72
Reviewed-by: Mårten Nordheim <marten.nordheim@qt.io>
Reviewed-by: Qt CI Bot <qt_ci_bot@qt-project.org>
QIcon::pixmap does automatic scaling to DPR by default, so
use QIconEngine API to access internal pixmaps directly instead.
Pick-to: 5.15
Task-number: QTBUG-83806
Change-Id: I3ccbed8387811a87bbea3f5d4ad9963e1be28a49
Reviewed-by: Dmitry Shachnev <mitya57@gmail.com>
Reviewed-by: Shawn Rutledge <shawn.rutledge@qt.io>
Currently
A a;
QVariant::fromValue(&a).value<const A*>() == nullptr;
Still casting non const to const is safe, and worked in Qt5.
After this change
A a;
QVariant::fromValue(&a).value<const A*>() == &a;
Change-Id: I257049d084c712b00a338a2943d379aa478e0981
Reviewed-by: Fabian Kosmale <fabian.kosmale@qt.io>
Change types returned and accepted by capacity-related QArrayDataPointer
functions to qsizetype:
1) QArrayData (underlying d-ptr) works with qsizetype
2) QArrayDataPointer::size is of type qsizetype
3) All higher level classes that use QADP (e.g. containers)
cast capacity to qsizetype in their methods
Additionally, fixed newly appeared warnings through qtbase
Change-Id: I899408decfbf2ce9d527be7e8b7f6382875148fc
Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
It was there for binary compatibility reasons, but it's not needed anymore
Change-Id: I659dadc710a5bcdbcba74f13fd4db6044a497cd2
Reviewed-by: Timur Pocheptsov <timur.pocheptsov@qt.io>
Enables linking to them using QDoc \l command
Task-number: QTBUG-85517
Change-Id: I23073a5c7b2f06a8ecf66116c538dcd3fff08f61
Reviewed-by: Leena Miettinen <riitta-leena.miettinen@qt.io>
Tests were never built by default, except for -developer-build.
Examples were build, but aren't anymore by default if you
run cmake directly.
Let the default be figured out by cmake, and only set
BUILD_EXAMPLES and BUILD_TESTING if the user has
expicitly passed them via -make or -nomake.
Task-number: QTBUG-87217
Change-Id: I37321d96cc1e9e184a711a858c860b0205d5b74f
Reviewed-by: Joerg Bornemann <joerg.bornemann@qt.io>
3.17.0 is released since a while. ANyhow, the requirement for
3.17 for simulator_and_device builds is already mentioned
at the start.
Change-Id: Ic8813bb60b010feb97a47b878124c3e75658813d
Reviewed-by: Alexandru Croitor <alexandru.croitor@qt.io>
If we do not use it for anything, do not spend time on comparing
and copying it either.
Change-Id: I3632792847010e5b73c48eb1ca88f5806f3ccd45
Reviewed-by: Andy Nichols <andy.nichols@qt.io>
The block to update the cached state needs to be run also
when the texture parameters have changed.
Change-Id: Ifa80c142c6ff31c95a718a1a900ff3db0bbfe4bc
Reviewed-by: Andy Nichols <andy.nichols@qt.io>