If an included header brings in MacTypes.h it will cause issues,
so rename the enum to be on the safe side.
Pick-to: 6.4 6.3 6.2
Change-Id: I29ec795be74a65d4f2267d8121a514bf192cf969
Reviewed-by: Volker Hilsheimer <volker.hilsheimer@qt.io>
The QObjectPrivate::declarativeData member is stored in a union with
currentChildBeingDeleted. The QObject destructor always sets the
currentChildBeingDeleted member of the union. It also sets the
isDeletingChildren bool, which is the only way to find out which union
member we can safely access.
While the QObject destructor is deleting children and isDeletingChildren
is set, we must not access the declarativeData member of the union.
Add a test case that initializes the function pointers for the
declarative handlers and constructs a situation where an object
emits a signal while it is destroying children.
Fixes: QTBUG-105286
Pick-to: 6.4 6.3 6.3.2 6.2 5.15
Change-Id: Iea5ba2f7843b6926a8d157be166e6044d98d6c02
Reviewed-by: Qt CI Bot <qt_ci_bot@qt-project.org>
Reviewed-by: Mårten Nordheim <marten.nordheim@qt.io>
Otherwise new clients will not be handled when they try to connect
Amends 29a1fe72a0
Pick-to: 6.4
Change-Id: Ifff052d1bf27682df2782faa285a257c9b41d86f
Reviewed-by: Konrad Kujawa <konrad.kujawa@qt.io>
Reviewed-by: Timur Pocheptsov <timur.pocheptsov@qt.io>
The new name describes the behavior in a better way.
[ChangeLog][Build System] The QT_DISABLE_DEPRECATED_BEFORE macro is
renamed to QT_DISABLE_DEPRECATED_UP_TO. The old name is deprecated, but
is still recognized if it is defined during configuration and the new
name is not defined.
Task-number: QTBUG-104944
Change-Id: Ifc34323e0bbd9e3dc2f86c3e80d4d0940ebccbb8
Reviewed-by: Alexandru Croitor <alexandru.croitor@qt.io>
Reviewed-by: Edward Welbourne <edward.welbourne@qt.io>
This fails on Android 12 in CI.
Task-number: QTBUG-105739
Pick-to: 6.4 6.3 6.2
Change-Id: Ibf3deb6b84564f12b5172f2522875fe70f8ce87b
Reviewed-by: Ivan Solovev <ivan.solovev@qt.io>
This fails on Android 12 in CI.
Task-number: QTBUG-105738
Pick-to: 6.4 6.3 6.2
Change-Id: I94fcefae3d88087cd96f4043b015f9469ed629a9
Reviewed-by: Ivan Solovev <ivan.solovev@qt.io>
Android kills this test case which tries to use too much memory,
or it times out.
Pick-to: 6.4 6.3 6.2
Task-number: QTQAINFRA-4748
Change-Id: Ifce92533d50f4c463ee10fe80e7654ad16172a35
Reviewed-by: Ivan Solovev <ivan.solovev@qt.io>
The default camera to plane distance is 1024, when rotating a big image
along the x or y axis, some areas of the screen may move above the
camera, causing the rotation to fail. A new rotation interface has been
added to allow users to specify the distance from the camera to the
plane themselves when rotating the QImage. Also, this support has been
added to QMatrix4x4::projectedRotate.
[ChangeLog][QtGui][QTransform] Added overloads to rotate() and
rotateRadians() that allow specifying of the distance to the rotation
plane.
Fixes: QTBUG-105088
Change-Id: I81f629916ddd9b6ab84e0282191e4284a88a85f5
Reviewed-by: Eirik Aavitsland <eirik.aavitsland@qt.io>
Windows VMs are provisioned with shared folders that are available as
\\${COMPUTERNAME}\testshare(writable)
so we don't need to access a remote SMB server over network anymore just
to test whether our string-parsing code handles UNC paths correctly.
Add a QTest::uncServerName() helper function to the shared filesystem.h
header and use that instead of QtNetworkSettings::winServerName. The
latter is now only used in tst_NetworkSelfTest::smbServer().
Pick-to: 6.4
Change-Id: Id0da66369ad0f4a980d612de2a31a391f1192253
Reviewed-by: Mårten Nordheim <marten.nordheim@qt.io>
Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
Reviewed-by: Edward Welbourne <edward.welbourne@qt.io>
Not just the ones we added to the pending sockets list
Pick-to: 6.4
Change-Id: I0a0016fe39df7ca2fc3f0c4e4111195bc6d90198
Reviewed-by: Konrad Kujawa <konrad.kujawa@qt.io>
Reviewed-by: Timur Pocheptsov <timur.pocheptsov@qt.io>
Reviewed-by: Edward Welbourne <edward.welbourne@qt.io>
If a client doesn't send any data then we would leave the socket open
for as long as it needed, wasting resources. Add timeouts to limit the
amount of time this can happen for.
Since there is a limit on number of sockets that the server will have
queued, having idle sockets stick around forever is a vector for ddos.
Pick-to: 6.4
Change-Id: Ida6251c92c625eeadf2065861b840b14255654b8
Reviewed-by: Ievgenii Meshcheriakov <ievgenii.meshcheriakov@qt.io>
Reviewed-by: Timur Pocheptsov <timur.pocheptsov@qt.io>
Reviewed-by: Volker Hilsheimer <volker.hilsheimer@qt.io>
SecureTransport ignores any content that comes in until it is large
enough to be a handshake. So a plaintext client may be left hanging
while it is waiting for a response.
Pick-to: 6.4
Change-Id: I501ae61d89d516765c7ba5f0d916d9246fde5d4d
Reviewed-by: Timur Pocheptsov <timur.pocheptsov@qt.io>
Build a simple widgets qmake project when targeting iOS in the CI.
This ensure we don't introduce basic regressions in the .pri / .prl
file generation.
Make sure to target the ios simulator, so we don't require any
code signing or provisioning profiles.
Pick-to: 6.4
Fixes: QTBUG-96058
Change-Id: I1a5564e838a5ce3cac89a37a5a4ddee74d3400f3
Reviewed-by: Qt CI Bot <qt_ci_bot@qt-project.org>
Reviewed-by: Jörg Bornemann <joerg.bornemann@qt.io>
And use the new overloads in examples and tests.
[ChangeLog][QtXml][QDomDocument] Deprecated the old setContent()
overloads in favor of the new ones that take ParseOptions and
ParseError.
Task-number: QTBUG-104507
Change-Id: I61b37eba2fe3002c03bddc90f6877676d539f7ec
Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
Add a runtime test for asyncify availability; skip tests
if asyncify is not available. Add new build target which
builds with asyncify enabled.
Change-Id: Idaeff0a24aa01525927b012af2a0ba135c7839c3
Reviewed-by: Tor Arne Vestbø <tor.arne.vestbo@qt.io>
We're not looking to skip faulty tests, but there are cases
where we would like to indicate that a test function exists
but can't run because some precondition is not met.
Pick-to: 6.4
Change-Id: Ifaaafcfa7a55beaaf56d8b25fabbe3dc2566350f
Reviewed-by: Tor Arne Vestbø <tor.arne.vestbo@qt.io>
Reviewed-by: Mikołaj Boc <Mikolaj.Boc@qt.io>
Emscripten's option for enabling asyncify (-sASYNCIFY) is a link-time
option, which means there is no requirement to have a separate asyncify
build, at least for static builds.
Replace the current QT_HAVE_EMSCRIPTEN_ASYNCIFY compile-time option
with a run-time option which checks if the asyncify API is available.
Keep support for configuring with "-device-option QT_EMSCRIPTEN_ASYNCIFY=1"
for backwards compatibility and for the use case where want asyncify
support to be on by default for a given Qt build.
Enable asyncify for the asyncify_exec example.
Pick-to: 6.4
Change-Id: I301fd7e2d3c0367532c886f4e34b23e1093646ad
Reviewed-by: Tor Arne Vestbø <tor.arne.vestbo@qt.io>
Includes:
- setting a custom Info.plist
- Bundling non-image assets
- Bundling image assets using asset catalogs
- Bundling app icons
- Bundling a launch screen
Projects added for both qmake and CMake.
The executable uses testlib to check that non-image assets,
icons and asset catalogs were successfully bundled upon deployment
to a device.
Task-number: QTBUG-104519
Change-Id: Iaab6112e31e1098dcd2548e18b58bed5b64e6f83
Reviewed-by: Jörg Bornemann <joerg.bornemann@qt.io>
Couldn't reproduce flakiness on OpenSUSE KDE/X11 and can't see any
history of flakiness in the last 3 months in our testresults database.
Task-number: QTBUG-62967
Task-number: QTBUG-63262
Change-Id: Id50291798eda922283e04b45205ae9105e9fdab2
Reviewed-by: Volker Hilsheimer <volker.hilsheimer@qt.io>
Reviewed-by: Qt CI Bot <qt_ci_bot@qt-project.org>
Window activation is not working reliably on X11 when combined with
X11BypassWindowManagerHint, see QXcbWindow::requestActivateWindow().
The test itself counts repaints, so qWaitForWindowExposed() shouldn't be
needed.
This way we don't need to QSKIP() the test if window activation fails.
Fixes: QTBUG-98921
Change-Id: I849b7261c757fb7cbcde73f11bbe1a74a862cb9c
Reviewed-by: Volker Hilsheimer <volker.hilsheimer@qt.io>
Removed entries that do not reproduce on OpenSUSE and that are no
longer flaky in our CI according to our testresults statistics database.
Adjusted entry for resizeAnchor testcase which has been seen flaky in
RHEL-8.4 and cursor2 which is very flaky on macOS.
Task-number: QTBUG-105249
Task-number: QTBUG-105247
Change-Id: I3e258f81d6bbf540a4b3dec763fdfd4bdc511847
Reviewed-by: Volker Hilsheimer <volker.hilsheimer@qt.io>
Can't reproduce in OpenSUSE, and no flakiness has been seen in the past
6 months in our testresults statistics database.
Task-number: QTBUG-63260
Change-Id: I465aa4b9f82726e9685f64b0dc235d3235c4bd9c
Reviewed-by: Volker Hilsheimer <volker.hilsheimer@qt.io>
Executing the tst_qgraphicsitem::sorting() testcase individually always
fails on my KDE/X11 desktop. The window never seems to have focus and
the call to qWaitForWindowActive() returns error after a few seconds.
It seems qApp->setActiveWindow(&view) never succeeds in giving focus to
the window containing the widget.
Fixes: QTBUG-105221
Task-number: QTBUG-74760
Change-Id: I148dab09d0fb592376b3902e4ed10799f9a52274
Done-with: Axel Spoerl <axel.spoerl@qt.io>
Reviewed-by: Volker Hilsheimer <volker.hilsheimer@qt.io>
Reviewed-by: Axel Spoerl <axel.spoerl@qt.io>
This led to an infinite recursion in case the annotation was completely
missing. Instead of trying to fix that, I'm simply implementing the
"### Qt6" request from c62f717226 .
[ChangeLog][qdbusxml2cpp] Removed the old compatibility code that
accepted "In" annotations for signal argument names, introduced in Qt
5.8.
Pick-to: 6.4
Fixes: QTBUG-104722
Change-Id: Ie4bb662dcb274440ab8bfffd1709bfc3daf0846d
Reviewed-by: David Faure <david.faure@kdab.com>
The old stack structure used to keep track of windows has been improved
to conform to the actual windowing assumptions: there shall be one root
window, which is always at the bottom. The first created window
immediately becomes the root window. Should the root window be removed,
all windows are non-root, i.e. any of them can become the top-level window
Fixes: QTBUG-105094
Pick-to: 6.4
Change-Id: Ic553244fa9f5bc3ee590b702935e66cfc62d5f8f
Reviewed-by: Morten Johan Sørvig <morten.sorvig@qt.io>
Running tst_qrhi -platform eglfs will pass on RPi4 / Mesa 22.
This does not test Vulkan of course since the platform plugin cannot
create a Vulkan instance.
Running tst_qrhi -platform vkkhrdisplay will enable Vulkan but will
still try OpenGL since the autotest does not query the platform
integration about OpenGL support. Make this nicer by skipping most of
the GL test if the platform integration we have cannot handle OpenGL
stuff anyway.
For some tests the data-driven approach has to be removed since doing
QFETCH without any rows will crash. These two OpenGL-specific tests
now check OpenGL support directly and QSKIP if needed.
While we are at it, fix up the Vulkan instance API version as well.
Pick-to: 6.4
Change-Id: I2891c04540bc2dfd0ccf475629bd23542bff15f5
Reviewed-by: Qt CI Bot <qt_ci_bot@qt-project.org>
Reviewed-by: Andy Nichols <andy.nichols@qt.io>
It purports to be a list of those named in QDateTime's tests, but was
a bit out of date. In the process, sort them into somewhat coherent
order (to make it easier to verify whether one is missing next time I
check) and reformat.
Pick-to: 6.4 6.3 6.2
Change-Id: I16e7ded6f8b00e226513bd06d6174a79f7a0c675
Reviewed-by: Mårten Nordheim <marten.nordheim@qt.io>
The _data function is useless without its test function (and it's not
used in other _data functions).
Pick-to: 6.4 6.3 6.2 5.15
Change-Id: I7aa6006ed1a9d89008577b750af4ea717dae237f
Reviewed-by: Edward Welbourne <edward.welbourne@qt.io>
If a font family has several instances from different foundries,
we disambiguate this by adding the foundry name in brackets behind
the family. But QFontDatabase::hasFamily() would only check for
families().contains(familyName). So if the database contains e.g.
Foo [Bar] and Foo [Baz] then a check for hasFamily("Foo") would
fail.
So we need to actually check for the family name instead. In
doing this, we also skip the extra step of building the list
and then searching it, but just go directly to the source.
This removes the BLACKLISTing of Ubuntu and also introduces a
QSKIP on Unix-based platforms without fontconfig, since there
is no way to know which default fonts are acceptable on those
platforms.
Pick-to: 6.4
Fixes: QTBUG-86967
Change-Id: Id8ad80a1671daf1c14fbad8bb8f4c51ee1c59709
Reviewed-by: Tor Arne Vestbø <tor.arne.vestbo@qt.io>
The caveat being having to manually create HLSL versions of the hull,
domain, and geometry shaders in parallel with the Vulkan GLSL ones,
while keeping the interfaces intact (stage inputs and outputs, cbuffer
layouts, binding points/registers). This is not always trivial but
typically doable in not very complicated case after inspecting the
SPIRV-Cross-generated vertex/fragment code in the .qsb files. Once
written, the HLSL files can be injected into a .qsb file with qsb -r.
or the corresponding CMake syntax. Conceptually this is no different
from how samplerExternalOES support is implemented for Multimedia.
(there the problem is that the shaders cannot be compiled to SPIR-V
to begin with, here it is that we cannot translate from SPIR-V, but
in the end the workaround for both problems is effectively the same)
The manual tests demonstrate this, both the tessellation and geometry
apps work now with D3D out of the box.
On the bright side, the implementation here in the the D3D backend of
QRhi does not need to know about how the shaders got there in the
QShader. So none of the implementation is dependent on this manual
process. If some day qsb would start translating to these kind of
shaders as well, it would all still work as-is.
Change-Id: I32d9ab94e00174e4bd5b59ac814dfedef9f93ad1
Reviewed-by: Andy Nichols <andy.nichols@qt.io>
As discovered in the expanded testing of QTRY_COMPARE() using the same
class, the timer needs a context object and a slot to call.
This amends commit 35ad157d88
Pick-to: 6.4 6.3
Task-number: QTBUG-104441
Change-Id: I41fc23de84ce8c7d6608db0005276a2071974494
Reviewed-by: Jason McDonald <macadder1@gmail.com>
In the process, simplify the latter while adding some actual
time-variation for the QTRY_* loop to navigate round - based on the
extendedcompare test's ClassWithDeferredSetter. Testing remains
primitive, but is at least a bit more thorough.
Pick-to: 6.4
Change-Id: I40be8fb485f3f18f0a4f4bc62ad36cccac691979
Reviewed-by: Qt CI Bot <qt_ci_bot@qt-project.org>
Reviewed-by: Mitch Curtis <mitch.curtis@qt.io>
Reviewed-by: Jason McDonald <macadder1@gmail.com>
These contain output only ever sent to stderr, which tst_selftests no
longer looks at; it merely verifies stderr is empty for all tests
except those expected to produce stderr output, and ignores the stderr
output for these last.
Change-Id: I50fee445d84c2d125e6db5303fc389e87746455e
Reviewed-by: Jason McDonald <macadder1@gmail.com>
Reviewed-by: Qt CI Bot <qt_ci_bot@qt-project.org>
The way the Qt 6.0 QMetaTypeInterface was designed, using a static
inline variable in a template, would normally require the linker and
dynamic linker to merge all copies and choose a single copy as the
official one. But because of hidden visibility and of Windows DLLs,
QMetaType already copes with multiple copies NOT getting merged. So we
may as well ask the linkers not to bother and use simpler, local
relocations to find those symbols.
They are all supposed to still be equivalent and it's an ODR violation
if they're not.
The Apple ld64 linker complains if you use this type of global
relocation:
ld: warning: direct access in function
[...]
to global weak symbol
'QtPrivate::QMetaTypeInterfaceWrapper<int>::metaType'
Fixes: QTBUG-93471
Pick-to: 6.3 6.4
Change-Id: Id0fb9ab0089845ee8843fffd16f98a10aa719434
Reviewed-by: Qt CI Bot <qt_ci_bot@qt-project.org>
Reviewed-by: Fabian Kosmale <fabian.kosmale@qt.io>
Because of the template shenanigans. This is just to make sure.
Pick-to: 6.4
Change-Id: Id0fb9ab0089845ee8843fffd16f989e7d555894f
Reviewed-by: Ulf Hermann <ulf.hermann@qt.io>
QFileDialog::saveFileContent, QFileDialog::getOpenFileContent are now
using local file APIs to access files on any browser that passes a
feature check.
The feature is thoroughly tested using sinon and a new mock library.
Task-number: QTBUG-99611
Change-Id: I3dd27a9d21eb143c71ea7db0563f70ac7db3a3ac
Reviewed-by: Tor Arne Vestbø <tor.arne.vestbo@qt.io>
Reviewed-by: Morten Johan Sørvig <morten.sorvig@qt.io>
This fixes the flakiness seen in OpenSUSE KDE/X11 desktop.
Fixes: QTBUG-70590
Task-number: QTBUG-105177
Change-Id: I7c2431e58b2a60ea04e26d4e70c0f2867d544ff2
Reviewed-by: Thorbjørn Lund Martsum <tmartsum@gmail.com>
Reviewed-by: Axel Spoerl <axel.spoerl@qt.io>
Use activateWindow() that is documented as the right way to raise a window.
Task-number: COIN-892
Change-Id: Ic9aadee0d3a526fd8e46e5b1099b5b0861700207
Reviewed-by: Tor Arne Vestbø <tor.arne.vestbo@qt.io>
I can't reproduce the test failing after hundreds of iterations on
OpenSUSE, and the test hasn't flaked at all in our CI in the last 6
months according to our dashboards.
Fixes: QTBUG-70612
Change-Id: I2397f3db5caf97f674de7d75fd99bd14c14166a4
Reviewed-by: Volker Hilsheimer <volker.hilsheimer@qt.io>
I can't reproduce the issue after hundreds of iterations on OpenSUSE,
and the test hasn't flaked at all in the last 3 months according to our
dashboards.
Task-number: QTBUG-66371
Change-Id: I9c4daf851e09fbcb47a6ab39418e7b213ccd9dfe
Reviewed-by: Volker Hilsheimer <volker.hilsheimer@qt.io>
ownMethodIndex works for all kind of methods, also for constructors.
Therefore, remove the assertion there (that checks for non constructors)
and add a test in qtbase so it does not happen again.
The test broken by the assertion is in qtdeclarative:
tst_QJSEngine::newQMetaObject().
Also rename QMetaMethodPrivate::ownConstructorIndex() to
ownConstructorMethodIndex() as the previous naming implied that
ownMethodIndex() could not be used for constructors.
amends b73ab954df
Task-number: QTBUG-105360
Change-Id: I0244993ed79bee055645b5443f5d02e1c089a6c6
Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
Reviewed-by: Fabian Kosmale <fabian.kosmale@qt.io>
Those were workarounds to passing a comma to a macro, but there are ways
around it. The simplest is to just use variadic macros; another, which
has been applied to Q_DECLARE_METATYPE for a long time, is to define an
alias to the thing you're trying to use.
Change-Id: Ie4bb662dcb274440ab8bfffd17097fbf0c53eabc
Reviewed-by: Marc Mutz <marc.mutz@qt.io>
[ChangeLog][CMake] The target-based variant of qt6_add_resource gained
the option BIG_RESOURCES. This can be used instead of
qt6_add_big_resources, which is not target-based.
Fixes: QTBUG-100268
Change-Id: Ib3fa783cbfbfd10f59c2f952bc88508a91f25e26
Reviewed-by: Alexandru Croitor <alexandru.croitor@qt.io>
The intialSize bug has been fixed in Qt Wayland Client, and thus
this test will now start XPASSing.
Pick-to: 6.4
Task-number: QTBUG-66818
Change-Id: I4b9cb8bd9306a67f04295eb23f09574dad0e97f7
Reviewed-by: Paul Olav Tvete <paul.tvete@qt.io>
Fairly minimal for now, just enough to verify a bug and serve as the
sign of success when it's fixed. Tests fail in ways they shouldn't,
for now; see expected_eventloop.* for details, notably "Earlier test
failed to clean up" messages.
Pick-to: 6.4 6.3
Task-number: QTBUG-104441
Change-Id: I59be4aa5f21fed23b19a0593a8c2f6c9956507df
Reviewed-by: Jason McDonald <macadder1@gmail.com>