We get a local reference from New*Array, and then construct a QJniArray
from that, which will create a new global reference, without deleting
the local reference.
Instead, go through QJniObject::fromLocalRef, and release the local
reference also in case of failure.
Pick-to: 6.8
Change-Id: I88108315240133369efab30e55fdbea17a17a26d
Reviewed-by: Assam Boudjelthia <assam.boudjelthia@qt.io>
Reviewed-by: Zoltan Gera <zoltan.gera@qt.io>
Other functions that creates QString instances from buffers document
that the size argument represents the number of characters to copy. This
patch adds this statement to QString::fromWCharArray too, but makes it
explicit that the size represents the number of code units.
Pick-to: 6.8
Change-Id: If3c0ebe299281a3c0ffc2d9e609b89df2578811d
Reviewed-by: Nicholas Bennett <nicholas.bennett@qt.io>
Any QJsonValue can be written as JSON now, not just objects and arrays.
Change-Id: I7076ecf23091d382caab2f27bc7874c4cf0a81bd
Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
QJsonValue can now parse all its types (arrays, strings, objects,
numbers, booleans, and null) at the top-level. QJsonDocument will still
return an error when parsing types that aren't objects or arrays.
[ChangeLog][QtCore][QJsonValue] QJsonValue now follows RFC 8259 and is
thus able to parse any JSON value, not just arrays and objects.
QJsonDocument remains at the level of RFC 4627 in that only arrays and
objects can be parsed.
Fixes: QTBUG-62502
Change-Id: I10f3895a7646953a6f6b5f132196267e700782a1
Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
It's a type.
Drive-by removal of the template alias, which wasn't necessary as we
only ever use this in one place.
Change-Id: I2fbcc3bcc8d7bc1d193ffffdbf1c7fc89f3c2641
Reviewed-by: Ivan Solovev <ivan.solovev@qt.io>
This removes the last file-scope static variable by moving the
stringdata into a merged MetaObjectContents resulting structure. We now
only have two class-scope private static inline member template
variables. It also removes the wish to merge the strings' integer data
into the regular uint array, since effectively they are now merged.
Eventually, this should lead to moving the strings into the XxxxData
classes so moc doesn't have to collect them early. I don't have a
solution for this yet but have some ideas.
I've left the StringData class behind because I've found it useful for
QMetaObjectBuilder::toCode().
Generated code for QDeviceClosedNotifier (qtextstream.cpp), c++filt'ered:
.section .rodata,"a",@progbits
QDeviceClosedNotifier::qt_staticMetaObjectStaticContent<(anonymous namespace)::qt_meta_tag_ZN21QDeviceClosedNotifierE_t>:
.long 13 # 0xd
.long 0 # 0x0
.long 0 # 0x0
.long 0 # 0x0
.long 1 # 0x1
.long 14 # 0xe
.long 0 # 0x0
.long 0 # 0x0
.long 0 # 0x0
.long 0 # 0x0
.long 0 # 0x0
.long 0 # 0x0
.long 0 # 0x0
.long 0 # 0x0
.long 1 # 0x1
.long 0 # 0x0
.long 20 # 0x14
.long 2 # 0x2
.long 10 # 0xa
.long 1 # 0x1
.long 43 # 0x2b
.long 0 # 0x0
.long 24 # 0x18
.long 21 # 0x15
.long 46 # 0x2e
.long 11 # 0xb
.long 58 # 0x3a
.long 0 # 0x0
.asciz "QDeviceClosedNotifier\000flushStream\000"
.zero 1
.section .data.rel.ro,"aw",@progbits
QDeviceClosedNotifier::qt_staticMetaObjectRelocatingContent<(anonymous namespace)::qt_meta_tag_ZN21QDeviceClosedNotifierE_t>:
.quad QtPrivate::QMetaTypeInterfaceWrapper<void>::metaType
.quad QtPrivate::QMetaTypeInterfaceWrapper<void>::metaType
.globl QDeviceClosedNotifier::staticMetaObject
QDeviceClosedNotifier::staticMetaObject:
.quad QObject::staticMetaObject
.quad QDeviceClosedNotifier::qt_staticMetaObjectStaticContent<(anonymous namespace)::qt_meta_tag_ZN21QDeviceClosedNotifierE_t>+88
.quad QDeviceClosedNotifier::qt_staticMetaObjectStaticContent<(anonymous namespace)::qt_meta_tag_ZN21QDeviceClosedNotifierE_t>
.quad QDeviceClosedNotifier::qt_static_metacall(QObject*, QMetaObject::Call, int, void**)
.quad 0
.quad QDeviceClosedNotifier::qt_staticMetaObjectRelocatingContent<(anonymous namespace)::qt_meta_tag_ZN21QDeviceClosedNotifierE_t>
.quad 0
Change-Id: I484c9165989ae4eaeea1fffd196c08947c083cb5
Reviewed-by: Fabian Kosmale <fabian.kosmale@qt.io>
First step in moving it inside of the qt_create_metaobjectdata()
function and passing as a parameter to QtMocHelpers::metaObjectData().
Change-Id: Ie2d2603b12daab33d36bfffd297d91af46e26c3d
Reviewed-by: Fabian Kosmale <fabian.kosmale@qt.io>
That way, there are fewer types that get stored as global variables,
possibly reducing the number classes detailed in the debug symbol table.
Core Gui Widgets
Before 84 122 208
After 45 72 110
This breaks NRVO by returning a different type than the local variable,
but since this is all running at constexpr time, it doesn't really
matter.
We need to pass the unique type to the metatype resolver, so the copyTo
functions are modified to take it as a template parameter.
Change-Id: I4083f1d1c2c44ed6dd22fffd9840da7741b723d8
Reviewed-by: Fabian Kosmale <fabian.kosmale@qt.io>
Most consumers feed the pixmaps into a QIcon, pulling out pixmaps
of sizes 32, 64, 128, 256, 512, so consumers of that QIcon will
not see low-resolution pixmaps for the common sizes like 64x64.
However if someone uses standardPixmap directly, or request an
icon with size 512x512, we won't have a high-DPI pixmap.
Unlike QStyle::standardPixmap we don't have a QWidget/QWindow
argument we can use to resolve the target DPR, so we have to
assume the pixmap can be used anywhere, and use the highest
DPR we've seen so far, via QGuiApplication::devicePixelRatio().
Change-Id: I3f41299b180f9361e3c7b1cd1f9bf4b1d00344da
Reviewed-by: Volker Hilsheimer <volker.hilsheimer@qt.io>
Which uses the platform theme under the hood, but returns QIcon
instead of QPixmap.
We now also render the platform pixmaps as 64x64 to more easily compare
the rendering to the other APIs.
Change-Id: I1418c8c144747b25d4cc39cad887560931ea7a1d
Reviewed-by: Volker Hilsheimer <volker.hilsheimer@qt.io>
Amend b92b7c69a93e1df61ec1bf59580eae51662c1ea6, which has set
PM_ButtonMargin to 4 and caused a baseline deviation.
Change-Id: I4097e6a4789a5e123442ad3954b9de41b0f82ad3
Reviewed-by: Christian Ehrlicher <ch.ehrlicher@gmx.de>
Amends 3e1d5843f3, in which I failed to replace "#ifdef" with "#if
defined" when adding condition to turn off QEXPECT_FAIL for VxWorks in
tst_QLineEdit::testQuickSelectionWithMouse test function. This ends up
with additional warning from compilers ("extra tokens at end of #ifdef
directive" from both clang and gcc), and ignoring check for
Q_OS_VXWORKS, causing 3e1d5843f3 patch effectively not changing
anything.
Fix this by replacing "#ifdef Q_PROCESSOR_ARM_32" with proper "#if
defined(Q_PROCESSOR_ARM_32)".
Task-number: QTBUG-115777
Task-number: QTBUG-131362
Change-Id: I915789ece497879d557e95bc7ded51116d6ea167
Reviewed-by: Volker Hilsheimer <volker.hilsheimer@qt.io>
Discovered by an Android 'phone configured with inconsistent system
locale and UI language list. The system locale specified more than the
en of what likely subtags expand to en-Latn-US and the single entry in
the UI language list was en-NO, so we fell back to adding the former,
but added the bcp47name() of the locale alongside the locale ID of the
CLDR entry for the system locale. The BCP47 name omits tags that what
remains will imply given likely-subtag rules, some of which may be
included in the CLDR entry's ID. This lead to an inconsistency
contradicting a later assertion.
Since we generally do want to search more specific names before less,
stick with the more specific ID from CLDR and use the name derived
from it as the uiLanguages entry to match, fixing the assertion. The
later post-processing of the list shall add the remaining
less-specific entries at suitable positions.
Change-Id: I1f1554dfb4c0198b04f8276fcb5d7869c9e58aac
Reviewed-by: Eimen Oueslati <eimen.oueslati@qt.io>
Reviewed-by: Nils Petter Skålerud <nils.petter.skalerud@qt.io>
Reviewed-by: Volker Hilsheimer <volker.hilsheimer@qt.io>
Qt used to accept a canvas created by user code. This
is no longer supported and user code should provide a
div container element instead.
Make this an error case with a qFatal()
Change-Id: I5c5ceef85916632bd95347546a8098b9a650afa6
Reviewed-by: Piotr Wierciński <piotr.wiercinski@qt.io>
Reviewed-by: Tor Arne Vestbø <tor.arne.vestbo@qt.io>
The stream insertion operator for QDebug is not overloaded
to handle std::set
Overload the stream insertion operator for QDebug
to handle std::set
[ChangeLog][QtCore][QDebug] Added support for std::set.
Fixes: QTBUG-130574
Change-Id: I8e1589589c8f23318bf5073609995f7da4ea1108
Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
You *should* be using LTO if you want performance, but these functions
are trivial enough that it makes sense to inline them.
The !QT_CONFIG(thread) support seems wrong and is probably leaking
memory for the QAdoptedThread for the main thread. But since that only
happens because the program is exiting anyway, it's a case of "leak" in
quotes and one I don't care about.
Pick-to: 6.8
Change-Id: I2bb6e519239ea33cc521fffd71f57574f940ed62
Reviewed-by: Fabian Kosmale <fabian.kosmale@qt.io>
This combines the 4-byte padding hole between the integers and
QThreadData::eventLoops with the 4-byte tail padding, reducing the size
of the structure from 152 bytes to 144 (on 64-bit systems).
Change-Id: I0d87543952cbbbb0bd0bfffd6997a7c3fe4f81a6
Reviewed-by: Fabian Kosmale <fabian.kosmale@qt.io>
This patch temporarily adds QEXPECT_FAIL to testFullScreenDimensions
test on Android 15.
Reason for this is that the testFullScreenDimensions from tst_Android
had been flaky on Android 15 and recently it had started to fail
continuously. QEXPECT_FAIL keeps CI status same between Android 14 and
15, before this test case is fixed.
Task-number: QTBUG-131338
Pick-to: 6.8 6.5
Change-Id: I32a610283b5b9f1502251d1dcc940897b389f092
Reviewed-by: Assam Boudjelthia <assam.boudjelthia@qt.io>
Print an error log when the build command fails that make it clear
that the build has failed and not necessarily the test.
Also, it seems according to the code, that if the build command fails
and --skip-install-root is set, the build command is run again.
Prepare the build command after parsing the args considering all the
other args and simply run the final build command in main() to simplify
things.
Pick-to: 6.8
Change-Id: I2f5a9d26bcea78349e1ef1cec4f717c37afd0225
Reviewed-by: Petri Virkkunen <petri.virkkunen@qt.io>
Group the Qt::CustomizeWindowHint specific flags separately, to make
it clear that they only apply if Qt::CustomizeWindowHint is set, and
give the QWindow preview window a title.
Add option to visualize the safe areas of the window.
Change-Id: I25ae7229b47ceaaa02f4be5a8210dbe44f54b6fa
Reviewed-by: Friedemann Kleint <Friedemann.Kleint@qt.io>
Fixes
(Alt + '~') + 'a' -> ã
(Compose) + '\'' + e -> é
A key change is to look at "isComposing" for events
Related bugs:
QTBUG-107139
QTBUG-124932
QTBUG-117096
Fixes: QTBUG-130887
Pick-to: 6.8
Change-Id: I0d4641d89952e0b4117226994a91e40039ad8a03
Reviewed-by: Morten Johan Sørvig <morten.sorvig@qt.io>
After introducing QHttp2Connection earlier we ended up having some
duplication. For 6.9 let's be brave and get rid of that :)
This patch drops all the code that can now be handled by
QHttp2Connection, and uses that directly.
Fixes: QTBUG-129211
Change-Id: Ie82b532452010b06f33e29457da8fb698898a29f
Reviewed-by: Mate Barany <mate.barany@qt.io>
For now QLocale shall ignore variant, and it's probably usually empty,
but Android provides it so we may as well include it. Including script
matters in many cases, where a language can be written in more than
one.
Change-Id: I3ae392053e9e655fe89e6d3f8740a0d1d7f335af
Reviewed-by: Lars Schmertmann <lars.schmertmann@governikus.de>
Reviewed-by: Assam Boudjelthia <assam.boudjelthia@qt.io>
Also adds a helper function QBaselineTest::finalizeAndDisconnect()
that calls the finalize command, prints the optional report URL
and disconnects to the server.
Pick-to: 6.8
Change-Id: Iabdba77f9eebad3e3f3fa67ab8977d1e49c49fb4
Reviewed-by: Eirik Aavitsland <eirik.aavitsland@qt.io>
- Split the orderFormatter into two parameters: actualOrderFormatter
and expectedOrderFormatter
Ammends 454f010e58b4f17df5d2683233e92448097d2dd1
Change-Id: I4ec468a0c0a4daea41c5ba2ce5ccfff0378460b8
Reviewed-by: Marc Mutz <marc.mutz@qt.io>
Reviewed-by: Ivan Solovev <ivan.solovev@qt.io>
Now that we have a separate feature, we can fix QTBUG-99063 by disabling
the doc_snippets feature globally.
Task-number: QTBUG-99063
Change-Id: I77ba875633ed89fdd8b8481ea0fddc7e91cbb9ca
Reviewed-by: Alexey Edelev <alexey.edelev@qt.io>
With an openglcompositor, only first QEglFSWindow is set
with a flag, HasNativeWindow and when it is destroyed,
the openglcompositor is destroyed, too.
For now, when using openglcompositor, Qt will not check
HasNativeWindow for its nativeWindow because it is not
possible to add a HasNativeWindow flag in an existing
window. And the openglcompositor will be destroyed after
the all the QEglFSWindows are closed.
Fixes: QTBUG-129576
Pick-to: 6.8 6.5
Change-Id: I620a904a03d29e8db1738d9392f716b3ebf5b553
Reviewed-by: Laszlo Agocs <laszlo.agocs@qt.io>
Invalid build dir values were passed to the WORKING_DIRECTORY option
to the qt test apis.
We shouldn't be passing the option at all, it makes no difference for
the case of calling ctest --build-and-test, because we already specify
the build dir in the command line of ctest.
Amends bc5b7e218f7259f440449e69c42518467bc5907b
Pick-to: 6.8
Change-Id: I0fe5b20a4beaefbd129849699c873c6a558d8996
Reviewed-by: Joerg Bornemann <joerg.bornemann@qt.io>
There is the same return-statement right before.
Pick-to: 6.8 6.5
Change-Id: I7890c386e50733aefbba57ed9f6df09763c54bc3
Reviewed-by: Laszlo Agocs <laszlo.agocs@qt.io>
At least Chrome 130 (after explicitly enabling "Experimental WebAssembly
JavaScript Promise Integration (JSPI)" in <chrome://flags/>) no longer has
WebAssembly.Function, but has WebAssembly.Suspending. Which appears to be in
line with what is documented in the 2024-06-04 post at
<https://v8.dev/blog/jspi-newapi> "WebAssembly JSPI has a new API".
Change-Id: I6c777801482758864438879057917e2c5faa28a8
Reviewed-by: Morten Johan Sørvig <morten.sorvig@qt.io>
On VxWorks, which uses clang as its sole compiler and ARM32 as one of
its platforms, check for partial selection of text on simulated mouse
move passes in tst_QLineEdit::testQuickSelectionWithMouse test function,
in line 5053. This causes "QEXPECT_FAIL" preceding this check to fail
the test due to XPASS.
According to message in QEXPECT_FAIL, this ifdef is intended not only
for platforms based on ARM32, but also for gcc_arm7 target. Since
VxWorks for 32 bit ARM uses clang, it might be assumed that this is the
same for any other platform that uses clang as a compiler.
Unfortunately, due to unknow actual reason for this issue, I can't make
such general assumption, so to stay on a safe side, only VxWorks should
be excluded from ARM32 platforms using this "QEXPECT_FAIL".
Exclude VxWorks from platforms that expect failure in text selection
check in tst_QLineEdit::testQuickSelectionWithMouse test function.
Task-number: QTBUG-115777
Task-number: QTBUG-131362
Change-Id: Id10f0462e5416935c01a41f173c48c17803531c9
Reviewed-by: Volker Hilsheimer <volker.hilsheimer@qt.io>
Reviewed-by: Axel Spoerl <axel.spoerl@qt.io>
Test functions:
- writeDatagramToNonExistingPeer
- multicastTtlOption
- multicastLoopbackOption
- readyRead
are failing on VxWorks in its nightly COIN run. We do not know the root
causes of these failures.
We need to run tests on COIN for VxWorks as significant, and fails in
QUdpSocket test functions prevents it, to reduce growing number of
regressions and allow iterative introduction of VxWorks as a supported
platform.
Blacklist QUdpSocket test functions failing on VxWorks.
Task-number: QTBUG-115777
Task-number: QTBUG-130078
Change-Id: I47c18f6d53406d4ecacfd35fb27ef883b561951d
Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
Reviewed-by: Axel Spoerl <axel.spoerl@qt.io>
JSON values are now written directly by QJsonValue instead of
QJsonDocument. Only objects and arrays are currently supported to be
written.
Change-Id: I413db14c69e8d6e9f06431051c8d716d1fb9d4eb
Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
It's highly unlikely you're going to have more than 2 billion pending
events for a thread, but this is the right thing to do.
Pick-to: 6.8
Change-Id: Ia162b024815c3b970d71fffd3bc022621b2e07b4
Reviewed-by: Fabian Kosmale <fabian.kosmale@qt.io>
Reviewed-by: Ahmad Samir <a.samirh78@gmail.com>
Instead of redefining ATSPI_DBUS_* constants that
are already defined in libatspi, just use those
from libatspi's atspi/atspi-constants.h header directly.
They are available in that public header since this
libatspi 2.1.5 commit [1]:
commit 1caa8f4613c87fec43406285a6597fd6f6408457
Author: Mike Gorse <mgorse@linux-l2tz.site>
Date: Wed Jul 27 16:54:19 2011 -0500
Move DBus interface name constants into atspi-constants.h
Move DBus interface name constants into a public header, so that they can be
used by application-side AT-SPI code (ie, at-spi2-atk).
Also, replace QSPI_REGISTRY_NAME and QSPI_OBJECT_PATH_ROOT
with the corresponding libatspi constants
ATSPI_DBUS_NAME_REGISTRY and ATSPI_DBUS_PATH_ROOT.
[1] 1caa8f4613
Change-Id: Idc7384fa70f36973260cb89dd1cf0fe9b5d16c73
Reviewed-by: Volker Hilsheimer <volker.hilsheimer@qt.io>
The stream insertion operator for QDebug is not overloaded
to handle std::unordered_set
Overload the stream insertion operator for QDebug
to handle std::unordered_set
[ChangeLog][QtCOre][QDebug] Added support for std::unordered_set.
Fixes: QTBUG-130481
Change-Id: I75a1f62f9ecb6b06ba45cc00d789cd3f3886b4c7
Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
JSON values are now parsed by QJsonValue instead of QJsonDocument. For
parsing, this removes the need for QJsonDocument entirely.
Fixes: QTBUG-109870
Change-Id: I2f9bae3a53e5d445cc9e8437c63a53a2c7b3593e
Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
Link to the newer permission API and note that the private
API can still be used for permission types not covered by
QPermission.
Pick-to: 6.8
Fixes: QTBUG-130372
Change-Id: I093edd72bc50372eba3b06105087ccd4884b0bac
Reviewed-by: Tor Arne Vestbø <tor.arne.vestbo@qt.io>
Reviewed-by: Nicholas Bennett <nicholas.bennett@qt.io>
They look blurry if we do, paint only the rest antialiased.
Amends 032db29bbc8c98462494d7a4e942af7a990e43f8.
Change-Id: I480f10943214f94afa52454de43c3b7f836a6def
Reviewed-by: Axel Spoerl <axel.spoerl@qt.io>
The C++ standard forces¹ us to overload the hidden friend qHash()
implementation instead of defaulting `seed` to zero. That doesn't mean
we need to reflect that technicality in the docs, esp. if it forces us
to deviate from the standard phrasing of qHash() functions to say
something about the default value of `seed` (which would, for a
defaulted argument, be shown in the docs).
Present the qHash() function in the canonical form to QDoc. This is a
(forwards and backwards) BC way to solve the issue. Going forward, the
correct fix should be to have qHash() functions call a private
hash(seed) member function instead, to fulfill the pointless
requirement of [1].
¹ [dcl.fct.default]/4, last sentence
Amends c2310f8e03cf30222cea59b3c556d060e1710015.
Pick-to: 6.8
Task-number: QTBUG-129574
Change-Id: I7890a0df092c9780601fc4c25e23d70d92db47e1
Reviewed-by: Ivan Solovev <ivan.solovev@qt.io>