Conan CI builds can built a qt repository in a repo-target-set
configuration. An example of that is qtscxml.
When building standalone tests, qt_build_tests includes a repo
specific TestsConfig.cmake file to call find_package on the modules
that were built as part of that repo.
That doesn't quite work with a repo-target-set build which is enabled
when the repo is built with a QT_BUILD_SINGLE_REPO_TARGET_SET value.
The TestsConfig.cmake file would be overridden with different contents
on each configuration.
Fix that by including the QT_BUILD_SINGLE_REPO_TARGET_SET value as
part of the TestsConfig.cmake file to be generated and included.
This means that when configuring the standalone tests, the same
QT_BUILD_SINGLE_REPO_TARGET_SET value should be passed, so that the
correct packages are found.
Add some debug statements to allow checking which TestsConfig.cmake
file is loaded when the standalone tests are configured with
--log-level=DEBUG.
Adjusts to 4b09522c23
Amends de3a806def
Amends e7f188b2d2
Pick-to: 6.2
Task-number: QTBUG-96253
Change-Id: I7c22aaad88fe8e6fce23046543363316203f6e8d
Reviewed-by: Qt CI Bot <qt_ci_bot@qt-project.org>
Reviewed-by: Joerg Bornemann <joerg.bornemann@qt.io>
tests/auto/tools/moc/CMakeFiles/tst_moc.dir/tst_moc.cpp.o: in function `tst_Moc::os9Newline()':
qtbase/tests/auto/tools/moc/tst_moc.cpp:1225: undefined reference to `Os9Newlines::staticMetaObject'
tests/auto/tools/moc/CMakeFiles/tst_moc.dir/tst_moc.cpp.o: in function `tst_Moc::winNewline()':
qtbase/tests/auto/tools/moc/tst_moc.cpp:1239: undefined reference to `WinNewlines::staticMetaObject'
Pick-to: 6.2
Change-Id: I629d67c1190e09b26dc09e41cb7170cb0eadf1cb
Reviewed-by: Fabian Kosmale <fabian.kosmale@qt.io>
This reverts commit c7ddaa9f58.
Reason for revert: Broke integrations
Change-Id: I21ffb3b16e361a48a5d9b7a528d150e51519623c
Reviewed-by: Tor Arne Vestbø <tor.arne.vestbo@qt.io>
Get LineHeightType once and reuse the value. There still are 2 calls
to lineHeightType from inside the QTextBlockFormat::lineHeight but
leaving them cause they need a bigger change.
Change-Id: I4016a5e483a0358d43f73d174a74545d4f3be338
Reviewed-by: Konstantin Ritt <ritt.ks@gmail.com>
Reviewed-by: Eskil Abrahamsen Blomfeldt <eskil.abrahamsen-blomfeldt@qt.io>
Restructure the Qt Resource System page to make the content more
accessible, and coherent:
- Focus less on the .qrc file format, but the overall use cases
- Treat CMake as first-class citizen
- Make it more obvious when to use :/, and when qrc:/
Some details that were deemed unnecessary were removed:
- details about the internal naming of the .cpp file when
qmake is used.
- References to QDir::addSearchPath() and the search path list were
removed. They relate IMO only indirectly to the Qt resource system.
- A lot of the explanation around Q_INIT_RESOURCE/Q_CLEANUP_RESOURCE
were dubious at best.
Pick-to: 6.2 6.2.0
Fixes: QTBUG-95126
Fixes: QTBUG-94977
Fixes: QTBUG-59394
Task-number: QTBUG-88044
Change-Id: I04b64f2366631b2106f047de121daf5fdb01073d
Reviewed-by: Alexey Edelev <alexey.edelev@qt.io>
Added specifically to support the deprecated CVOpenGLTextureCache on
macOS, because Qt Multimedia still needs a way to use that when the
applications requests using OpenGL instead of Metal.
Follow what we did for GL_TEXTURE_EXTERNAL_OES, and add a flag that
simply makes all our glBindTexture calls use the
GL_TEXTURE_RECTANGLE[_ARB] target.
Pick-to: 6.2
Change-Id: If818b13a9f520cdb8bdc16de84a3ca0e18ad6c33
Reviewed-by: Lars Knoll <lars.knoll@qt.io>
In the effort of repairing broken links as per QTBUG-96127,
a series of RFC links referring to `tools.ietf.org/html/*` were modified
to point to the new address that the site redirected to.
To simplify executing a similar task and to diminish the duplication of
manually inserted urls, the already existing `rfc.qdoc` file, containing
`\externalpage` commands directing to RFC locations, was enhanced with
links to all RFCs that were mentioned in the current documentation, so
as to aggregate this common category of links.
All links pointing to a `ietf` domain inside QDoc documentation blocks
were then changed to use the newly provided external-references.
Task-number: QTBUG-96127
Pick-to: 6.2
Change-Id: I2a52eb6aa8c9e346f64ef1a627b039220d9f6c2a
Reviewed-by: Mårten Nordheim <marten.nordheim@qt.io>
By going via QWidget::close() we ensure that if there's a QWidgetWindow
backing the dialog (which is almost always the case), we will plumb down
to QWindow::close(), resulting in QEvent::Close events to the QWindow.
Since we don't want QDialog subclasses to receive a call to a closeEvent
override that they didn't receive before (and which they might interpret
as rejection or cancellation), install a temporary event filter that
eats the QCloseEvent resulting from the call to close().
Task-number: QTBUG-53286
Change-Id: Ie8f6f0cb3160acfd5865dc74f0a7b6d87f838724
Reviewed-by: Tor Arne Vestbø <tor.arne.vestbo@qt.io>
Functions that use qt_internal_add_module under the hood might need to
generate cpp exports, e.g. qt_internal_add_qml_module. Append cpp
exports related arguments to the qt_internal_add_module arguments set.
Task-number: QTBUG-90492
Change-Id: I4fd539bd1d8be4d3e57ed5b1b88dd2dbc2f5ca24
Reviewed-by: Craig Scott <craig.scott@qt.io>
The link was replaced with an equivalent one from the Internet Archive's
Wayback Machine, as it is the one used in
RFC-6265 (https://datatracker.ietf.org/doc/html/rfc6265#ref-Netscape) to
deliver the same information.
Task-number: QTBUG-96127
Pick-to: 6.2
Change-Id: I3d8b7ac511e040c1b4651b59ddedfa580c45ce90
Reviewed-by: Mårten Nordheim <marten.nordheim@qt.io>
The `rfc.qdoc` file was modified to order the external RFC link by RFC
number.
Furthermore, the links were modified to use the `datatracker.ietf.org`
domain to be consistent with the recent changes to the old
`tools.ietf.org` links.
Task-number: QTBUG-96127
Pick-to: 6.2
Change-Id: I865e7ea131264d0b123f34d796b7ec8007931adc
Reviewed-by: Mårten Nordheim <marten.nordheim@qt.io>
Move the status setting and resetting back into handleClose so that we
don't end up with it being set if handleClose is never called in response
to a close attempt. This can happen when QWindow's platform window has
already been destroyed.
Since QWindow::close handles that case gracefully and returns true,
we can safely call it multiple times.
Add test coverage to verify that we get exactly those close event
calls that we want.
Change-Id: Ica77bf17c26d923c3b79b1e5a688addbc88a6277
Reviewed-by: Tor Arne Vestbø <tor.arne.vestbo@qt.io>
Reviewed-by: Volker Hilsheimer <volker.hilsheimer@qt.io>
QWindow::mask() returns a region in device independent
geometry which can’t be used directly by the platform
plugin.
Pick-to: 6.2 5.15
Task-number: QTBUG-94770
Change-Id: I76279bc74cfabe315178327938f485f4447568be
Reviewed-by: Tor Arne Vestbø <tor.arne.vestbo@qt.io>
The shortcut hides the application, which works in native apps such as
Xcode or Safari also while a popup menu (or combobox drop down) is open.
This essentially reverts 29104c85db, which
introduced the blocking of CMD+H to prevent the popup stack in the Cocoa
plugin from going out of sync. With that stack gone after the previous
commits, this is no longer a problem.
Task-number: QTBUG-82626
Task-number: QTBUG-96450
Task-number: QTBUG-58727
Pick-to: 6.2
Change-Id: I35603d971741f03b793b7839b183b7ab37200647
Reviewed-by: Tor Arne Vestbø <tor.arne.vestbo@qt.io>
Since popup handling is now done exclusively by Q(Gui)Application, we
don't need to keep track of the popup stack in the Cocoa plugin anymore.
Fixes: QTBUG-96450
Change-Id: I869f36f52bc2210b6c92efd9425502de4122c553
Reviewed-by: Tor Arne Vestbø <tor.arne.vestbo@qt.io>
For QGuiApplication with QWindow, no other QPA plugins do
so, and for QApplication with QWidgets, QApplication implements popup
functionality consistently.
Task-number: QTBUG-96450
Change-Id: I47489296e0e470d8948ca7858d0a2608c58b2975
Reviewed-by: Tor Arne Vestbø <tor.arne.vestbo@qt.io>
After 70b94eea10, all popups are closed
on mouseDown within the window frame. As with native applications, the
popup is closed on press, and before the press is delivered to the frame
(ie before the jewel is shown as depressed).
The previous notification handlers for window moving, minimizing, and
closing can now be removed, together with the alternative implementation
of closePopups that relies on the Cocoa plugin maintaining its own
popup stack.
This reverts 048e66a11d.
Task-number: QTBUG-96450
Task-number: QTBUG-77833
Change-Id: I165f3caa64bf9a7b4c4d5455ca33e87029d75f73
Reviewed-by: Tor Arne Vestbø <tor.arne.vestbo@qt.io>
This removes more dependencies to the Cocoa plugin managing its own
popup stack.
Task-number: QTBUG-96450
Change-Id: Id01577739af525a34728f27b790b9aaac29705f2
Reviewed-by: Tor Arne Vestbø <tor.arne.vestbo@qt.io>
QPA plugins might have to close popups for events that are not delivered
to QWindow or QWidget instances. For instance, the Cocoa plugin has to
explicilty close popups when the user clicks into the window frame.
Expose this functionality through a virtual in QGuiApplicationPrivate,
and move the QApplication implementation from a static helper into the
override.
Task-number: QTBUG-96450
Change-Id: I52be5710c8d7515b9ae2e4bbadb069df4b3ed546
Reviewed-by: Tor Arne Vestbø <tor.arne.vestbo@qt.io>
Deferred CMake calls are executed in the order they are created.
Sometimes, a deferred call created after a call to qt_add_executable()
or qt_add_library() needs to be executed before target finalization.
For example, a file may be written using a deferred write, but the
finalizers might need that file to exist.
Provide an internal _qt_internal_delay_finalization_until_after()
command that can be called to let finalization know it has to defer
to later. Target finalizers will check an internal property for IDs
recorded by that command and will re-defer itself if it detects that
any of those haven't run yet.
Task-number: QTBUG-96290
Pick-to: 6.2
Change-Id: Ia791e99339bab351eff0d675a552393e524490e8
Reviewed-by: Fabian Kosmale <fabian.kosmale@qt.io>
Reviewed-by: Joerg Bornemann <joerg.bornemann@qt.io>
The check for styleMask == NSWindowStyleMaskBorderless to decide whether
to clear the NSWindow background was broken, as NSWindowStyleMaskBorderless
has the value 0, but is only supposed to be compared to its companion
NSWindowStyleMaskTitled (with value 1). A window can perfectly well be
NSWindowStyleMaskBorderless and NSWindowStyleMaskMiniaturizable e.g.,
so by comparing directly to NSWindowStyleMaskBorderless instead of
masking to the first bit first we ended up making miniaturizable
windows non-translucent.
We now check the Qt::FramelessWindowHint directly, and also whether
the window is opaque. Ideally we'd have QWindow flags that could
plumb WA_NoSystemBackground from Qt Widgets, as well as a background
color property on QWindow to control the system background, but
in the meantime we'll have to use the FramelessWindowHint heuristic.
The QWidget docs have been updated to reflect this.
Task-number: QTBUG-95042
Pick-to: 6.2
Change-Id: I0d40eecace60883c205ebb8c76cef1092cdf1144
Reviewed-by: Morten Johan Sørvig <morten.sorvig@qt.io>
Having logging in the test's log widget is nice, but we don't want
to silence the normal logging, as that might confuse someone who
expects to see normal log messages, not knowing there's a dedicated
log widget in the test.
Pick-to: 6.2
Change-Id: I7828f740cfb8cc2eae8da98b9b8facd4a57fa37b
Reviewed-by: Morten Johan Sørvig <morten.sorvig@qt.io>
Reviewed-by: Volker Hilsheimer <volker.hilsheimer@qt.io>
Call emscripten_set_main_loop like the old GUI event
dispatcher did, with one difference that requestAnimationFrame
updates are now no longer handled by the event dispatcher.
Change-Id: If02d90ae9c45d7b38999567d733a237af842cded
Reviewed-by: Tor Arne Vestbø <tor.arne.vestbo@qt.io>
This function implements the isTopLevel() logic, which
we now don’t have to duplicate at each call site.
Change-Id: Ic8b857aa7cd3c3c23d5e950d9f50b66c81ba3ccf
Reviewed-by: Morten Johan Sørvig <morten.sorvig@qt.io>
Reviewed-by: Tor Arne Vestbø <tor.arne.vestbo@qt.io>
Ensure that expired threads have actually finished before attempting
to restart them. Calling start() on a thread that is not yet finished
does nothing.
Add a regression test into tst_qthreadpool that attempts to trigger
reuse of expired threads and verifies that all submitted tasks
execute.
Fixes: QTBUG-72872
Pick-to: 6.2
Change-Id: I2109b628b8a4e91491115dc56aebf3eb249646b5
Reviewed-by: Allan Sandfeld Jensen <allan.jensen@qt.io>
Reviewed-by: Edward Welbourne <edward.welbourne@qt.io>
QLocale treats a null QVariant returned from the QSystemLocale::query()
as a signal to fall back to CLDR implementation.
In Qt 5 QVariant(QString()).isNull() was returning true, so we could
easily return an empty QString() to fall back to CLDR.
In Qt 6 the QVariant() behavior has changed.
This patch makes sure that all the helper methods in macOS system locale
implementation return a null QVariant() when they fail to provide any
reasonable value.
Task-number: QTBUG-84877
Pick-to: 6.2
Change-Id: I85be3b1463b1366f737e912c99bc11e37af98c62
Reviewed-by: Edward Welbourne <edward.welbourne@qt.io>
Reviewed-by: Mårten Nordheim <marten.nordheim@qt.io>
Reviewed-by: Tor Arne Vestbø <tor.arne.vestbo@qt.io>
This patch adds support for previously missing Narrow format, as well
as standalone day name handling for QAndroidSystemLocale
Task-number: QTBUG-84877
Pick-to: 6.2
Change-Id: Ib74fb8f0e12f03ab96022abaf26ac9039ffaa60b
Reviewed-by: Edward Welbourne <edward.welbourne@qt.io>
Reviewed-by: Assam Boudjelthia <assam.boudjelthia@qt.io>
QLocale::system() was not making use of QLocaleFormat::Narrow, always
treating it in the same way as QLocaleFormat::Short.
This patch fixes the issue for day and month names.
The implementation falls back to CLDR if system locale fails to
provide some data.
Pick-to: 6.2
Task-number: QTBUG-84877
Change-Id: Ia37e59dbf02d7a5e230f2767d294b9ab7de37f33
Reviewed-by: Mårten Nordheim <marten.nordheim@qt.io>
Reviewed-by: Edward Welbourne <edward.welbourne@qt.io>
Reviewed-by: Qt CI Bot <qt_ci_bot@qt-project.org>
Construction of the static QLocalePrivate called defaultIndex()
and systemData() in an implementation-dependent order, but
defaultIndex() needs to be called after systemData().
So move the systemData() call that's used to ensure it all stays
up to date to before the static initializer.
Pick-to: 6.2
Change-Id: I801b678c01b4e4ddd4de16e9aead7167ec4477f3
Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
Reviewed-by: Edward Welbourne <edward.welbourne@qt.io>
Reviewed-by: Mårten Nordheim <marten.nordheim@qt.io>
The return code NoQtSection was not being handled at all, so hasMetaData
remained equal to false. This was probably not intended, but has been
like that since Qt 5.0. See previous commit for details.
Change-Id: I42eb903a916645db9900fffd16a4445eff9a082c
Reviewed-by: Oswald Buddenhagen <oswald.buddenhagen@gmx.de>
Reviewed-by: Allan Sandfeld Jensen <allan.jensen@qt.io>
For ELF platforms with a GCC-compatible compiler, the QElfParser has
been ignoring the .rodata section ever since Qt 5.0 commit
7443895857 ("Remove support for Qt 4 style
plugins"). That change removed handling of return value
QElfParser::NoQtSection from the ELF parser, which meant that the
plugins without a .qtmetadata section were never considered plugins. In
other words, for those systems, the __attribute__ macro is mandatory.
For systems with a GCC-incompatible compiler, there were only two in Qt
5.x's lifetime: Oracle/Sun Solaris with SunCC and IBM AIX with IBM xlC
compiler. Neither compiler supports C++17 according to [1], so they
can't be in use in Qt 6. IBM xlC now comes with a Clang-based front-end
for users who need Qt 6 and the OpenIndiana distribution of Open Source
Solaris has been using GCC since 2012.
So make the macros mandatory from now on.
[1] https://en.cppreference.com/w/cpp/compiler_support#C.2B.2B17_features
Change-Id: I42eb903a916645db9900fffd16a443745446cc64
Reviewed-by: Lars Knoll <lars.knoll@qt.io>
There's no need to keep this variable in the class.
Pick-to: 6.2
Change-Id: I2de1b4dfacd443148279fffd16a35775d56d3e45
Reviewed-by: Oswald Buddenhagen <oswald.buddenhagen@gmx.de>
There's no sense in continuing to parse. We'll never be able to load
such a plugin anyway. This simplifies the code generation a lot because
now all the read<T> calls become unconditional qFromUnaligned<T>, which
is just a memcpy(), which for primitive types the compiler will simply
emit a memory load into a register.
Task-number: QTBUG-96327
Pick-to: 6.2
Change-Id: I2de1b4dfacd443148279fffd16a3574daf010635
Reviewed-by: Oswald Buddenhagen <oswald.buddenhagen@gmx.de>
Reviewed-by: Lars Knoll <lars.knoll@qt.io>
That way, we can add the NOLINTNEXTLINE comment to suppress clang-tidy,
which otherwise flags all usage of const_cast in C++ code.
Change-Id: Ie72b0dd0fbe84d2caae0fffd16a247b96d223772
Reviewed-by: Rui Oliveira
Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
Reviewed-by: Volker Hilsheimer <volker.hilsheimer@qt.io>
- Exclude Green Hills compiler from Catch2's POSIX signal handling.
GHS, at least on INTEGRITY, doesn't support full POSIX signals.
Task-number: QTBUG-96176
Pick-to: 6.2 6.2.0
Change-Id: Ifec06dca43ed766cb7335e40fc357d0d7bc463a6
Reviewed-by: Edward Welbourne <edward.welbourne@qt.io>
Having I/O operators defined for incomplete types causes hard
to diagnose problems when types with template conversion
operators are used as arguments to signals or slots.
Removing qfloat16 operators is not possible before Qt 7
because of backward compatibility.
Task-number: QTBUG-93499
Change-Id: Ifa296bb58c45a06abf79dbe5666a666adaa8eab9
Reviewed-by: Edward Welbourne <edward.welbourne@qt.io>
System headers were jumbled in with Qt headers. Separate those out and
use standard names for Qt headers. Tidied some #if-ery.
Change-Id: Ic8c61797303567eeaef48e2560e91924ddb380f0
Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
QLocale and QString tests had copies of a TransientLocale; we've
recently improved the QLocale one. Rather than duplicating those
rather complicated improvements, finally share a common version.
In the process, I noticed that setlocale() only returns the prior
value when passed nullptr as the new value; so rework the
implementation to get that right, so that it now correctly restores
the prior locale. That, in turn, means there's now a later call to
setlocale(), when we actually set the changed setting, which may
invalidate the earlier return; so copy it to a QByteArray before the
second call.
Included Ivan Solovev's improved version of how to reset the locale,
since TransientLocale needs it.
Pick-to: 6.2
Change-Id: I4cb1efbda42f0e2cdd934e04b3b3732ce0f45a06
Reviewed-by: Ivan Solovev <ivan.solovev@qt.io>
Reviewed-by: Mårten Nordheim <marten.nordheim@qt.io>
Found by CodeChecker.
The getChar() method can return a garbage value if called on an empty
buffer. Considering that QByteDataBuffer is an internal class and that
there seems to be no current usage of this method, just add a Q_ASSERT
to make sure that the buffer is not empty.
Task-number: QTBUG-96303
Pick-to: 6.2
Change-Id: Iab0aee596aabafe999996f83177ca8bba16a58b6
Reviewed-by: Mårten Nordheim <marten.nordheim@qt.io>
Reviewed-by: Ievgenii Meshcheriakov <ievgenii.meshcheriakov@qt.io>
Reviewed-by: Edward Welbourne <edward.welbourne@qt.io>
Qt 6.x does not need to be able to read the old Qt 5-based binary JSON
metadata. The QT_WARNING_DISABLE_DEPRECATED was needed in 5.15 while we
used the then-deprecated functions to decode.
Pick-to: 6.2
Change-Id: I2de1b4dfacd443148279fffd16a39ee074da3ef4
Reviewed-by: Qt CI Bot <qt_ci_bot@qt-project.org>
Reviewed-by: Oswald Buddenhagen <oswald.buddenhagen@gmx.de>
Our plugins are code generated by moc, so always C++. I don't know when
the last time it was that you could declare plugins from C.
Pick-to: 6.2
Change-Id: I2de1b4dfacd443148279fffd16a35e466f8a4c20
Reviewed-by: Oswald Buddenhagen <oswald.buddenhagen@gmx.de>
An enum shows the proper values in the debugger...
Pick-to: 6.2
Change-Id: I2de1b4dfacd443148279fffd16a3a5848196983c
Reviewed-by: Oswald Buddenhagen <oswald.buddenhagen@gmx.de>
It was disabled during the CMake port, but appears to work now.
Change-Id: I2de1b4dfacd443148279fffd16a3a166a3e10671
Reviewed-by: Oswald Buddenhagen <oswald.buddenhagen@gmx.de>
Reviewed-by: Qt CI Bot <qt_ci_bot@qt-project.org>