It is no longer handled separately from Android.
This effectively reverts commit 6d50f746fe
Change-Id: Ic2d75b8c5a09895810913311ab2fe3355d4d2983
Reviewed-by: Assam Boudjelthia <assam.boudjelthia@qt.io>
Passing nullptr as receiver and/or as an event parameter to sendEvent,
postEvent, etc. is meaningless. It's also something that users can check
for. Therefore, it should not be allowed. Note that the current code
already relies on the arguments not to be null, albeit "indirectly"
(e.g. they get dereferenced without any null checks).
Hence: add asserts that check for non-null in all the relevant
codepaths, except for the ones in which there's currently just a
warning; for those, add a Qt 7 note.
Change-Id: Ia4c58551de88a5d1003f09efa448c1330b6cb122
Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
Reviewed-by: Qt CI Bot <qt_ci_bot@qt-project.org>
Reviewed-by: Volker Hilsheimer <volker.hilsheimer@qt.io>
Reviewed-by: Edward Welbourne <edward.welbourne@qt.io>
To bring the plugin on par with xcb and eglfs in this regard.
New code has a better way to query these via
QOpenGLContext::nativeInterface() (or, more correctly, will have a
better way once the ability to query the config and display is added
in a follow up patch), but having some symmetry between the EGL-based
plugins won't hurt.
This is relevant in particular with OpenXR: not knowing the EGLConfig
makes it impossible to use the API on Android:
https://www.khronos.org/registry/OpenXR/specs/1.0/html/xrspec.html#XrGraphicsBindingOpenGLESAndroidKHR
Pick-to: 6.2
Change-Id: I163aed070096a4b58d3f650906c2f70ea31b3231
Reviewed-by: Andy Nichols <andy.nichols@qt.io>
...when starting a render/compute pass.
This matches most other backends in fact, the Vulkan backend has
just certain historical differences, and is complicated due to the
fact that it has the option of using secondary command buffers for
passes that specify ExternalContents (to support the case of wanting
to issue direct Vulkan commands in a code block surrounded by calls
to beginExternal and endExternal).
Not resetting state such as the currently bound index buffer when
starting a pass quickly blows up when two consecutive render passes
use different settings, one targeting the primary while the other
the secondary command buffer. Instead of further complicating the
logic, just reset the relevant state in every begin(Compute)Pass.
Comes with an autotest that is crafted so that it manages to
downright crash when run with Vulkan without the fix to the backend.
Fixes: QTBUG-89765
Pick-to: 6.2
Change-Id: I8dc47bd179c17d45a0556ec31200dc90c4b67ca5
Reviewed-by: Andy Nichols <andy.nichols@qt.io>
The test used to hang on waitForRead(), sometimes, which underneath
involve a poll()+read() syscall pair.
When this happened, the IMAP data came together with the proxy data on a
previous poll()+read() call and the proxy code had already consumed it.
We now wait for data only if data is not already available.
Fixes: QTBUG-96345
Pick-to: 6.2
Change-Id: I084f5d1268a5091ea614fcec91c8d356dcb90d9f
Reviewed-by: Mårten Nordheim <marten.nordheim@qt.io>
The unversioned libcrypto.dylib that's shipped with macOS 10.15 will
result in a crash if loaded, with a message saying that the unversioned
library should not be loaded, as it doesn't provide a stable ABI.
Task-number: QTBUG-95249
Pick-to: 6.2 5.15
Change-Id: I49325e5d675155e90840cc93623549f725bc77b4
Reviewed-by: Timur Pocheptsov <timur.pocheptsov@qt.io>
The functionality now lives in QGuiApplication, and is triggered
by QGuiApplication and QApplication after dispatching the close
event to the window.
The slight difference between how a Qt GUI and Qt Widget app
determines if a window should contribute to the close-on-quit
behavior has been abstracted into a QWindowPrivate helper.
The additional checks that were in place for skipping out of
the whole maybeQuitOnLastWindowClosed machinery have been kept.
Task-number: QTBUG-53286
Change-Id: I81bd474755f9adb3a2b082621e5ecaa1c4726808
Reviewed-by: Qt CI Bot <qt_ci_bot@qt-project.org>
Reviewed-by: Volker Hilsheimer <volker.hilsheimer@qt.io>
Static libraries don't need to export their symbols, and corner cases
when sources are also used in shared libraries, should be handled
manually.
Task-number: QTBUG-90492
Change-Id: I5cb0a3f7e280b042b678bdbe4475f2bbf9f6b9ba
Reviewed-by: Qt CI Bot <qt_ci_bot@qt-project.org>
Reviewed-by: Alexandru Croitor <alexandru.croitor@qt.io>
If qt_internal_generate_cpp_global_exports is called outside the
qt_internall_add_module function scope, install rule that is
generated by qt_internall_add_module won't include generated
cpp export header files. This adds the explicit file-based install
rule for the generated cpp exports.
Since qt_internal_generate_cpp_global_exports now encapsulates all
install rules related to the generated cpp exports, no need to expose
the generated filenames outside the function.
It's expected that module public headers now could be added outside
the qt_internal_add_module function. Tune generating of the module
timestamp by replacing the DEPENDS value with generator expression.
Task-number: QTBUG-90492
Change-Id: I0f086abc8187c5d51117c3a75c47b58580f6913f
Reviewed-by: Alexandru Croitor <alexandru.croitor@qt.io>
This reverts commit 25a7034d78.
The change makes the 5th modifier key broken, which is more
serious than Backspace key doesn't work in CapsLock on.
And we don't have a better solution for both of them now,
perhaps it's better to keep the old behavior in 6.2 LTS.
Task-number: QTBUG-49771
Fixes: QTBUG-95108
Fixes: QTBUG-95289
Pick-to: 6.2 6.2.0 5.15
Change-Id: Ie5d0aafa562b5097e089cafc83ae227c75c6d752
Reviewed-by: Tor Arne Vestbø <tor.arne.vestbo@qt.io>
Instead of qt_mac_applicationIsInDarkMode().
Task-number: QTBUG-94859
Change-Id: Ib64c081adfafb2843a7593d0e35668cce70cffd0
Reviewed-by: Tor Arne Vestbø <tor.arne.vestbo@qt.io>
And implement it on Windows and macOS.
Fixes: QTBUG-83908
Fixes: QTBUG-94859
Change-Id: I7b0c062adf5d4dbaefa64c862ab8ab1348809d71
Reviewed-by: Tor Arne Vestbø <tor.arne.vestbo@qt.io>
This ensures that a command such as
$ ninja tst_qlocale && ninja tst_qlocale_check
will automagically build the syslocaleapp program that the test runs
from a subtest. Similar for testlib's selftests and tst_QProcess.
As a drive-by, pruned some legacy comments from when CMakeLists.txt
files were generated from .pro files.
Change-Id: I67691a8175aaef124d4104cf1898193993408bdf
Reviewed-by: Alexey Edelev <alexey.edelev@qt.io>
Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
Reviewed-by: Andrei Golubev <andrei.golubev@qt.io>
The provided implementation tries to fix positions for the group
separator.
In case of scientific notation it can also converts the value to
normalized form.
It uses QLocale::FloatingPointShortest internally to convert the
double value back to string, so the number of decimals may change
after calling this method.
Change-Id: I963bc5f97b653e2bb912f4b95b09a4d1ee201e7f
Reviewed-by: Edward Welbourne <edward.welbourne@qt.io>
The _qt_is_android_executable property is normally set by the
_qt_internal_create_executable() command. But various other internal
commands don't route through that and go through
qt_internal_add_executable() instead. The former is used only by the
public API, the latter only by the internal API. Refactor both so that
the internal one calls the public one. This ensures all targets receive
the same base settings, including the _qt_is_android_executable
property.
Fixes: QTBUG-96085
Pick-to: 6.2
Change-Id: I157356872c9d942d7be5f1abbbcbac97961b1f40
Reviewed-by: Alexey Edelev <alexey.edelev@qt.io>
Reviewed-by: Alexandru Croitor <alexandru.croitor@qt.io>
The docs are internal still but won't hurt to keep them up-to-date.
At the same time, enhance the QRhiRenderPassDescriptor
serializedFormat() docs as well, with appropriate notes about the
intended usage of the "serialized" data.
Pick-to: 6.2
Change-Id: I8425fff625903468621e3b09d089b345fada85f4
Reviewed-by: Christian Strømme <christian.stromme@qt.io>
Follow what has been done for QRhiShaderResourceBindings. Have a way
to retrieve an opaque blob (that just happens to be a list of integers)
so that a simple == comparison can be used to determine compatibility
even when the objects from which the blob was retrieved are no longer
alive.
The contract is the following:
bool a = rp1->isCompatible(rp2);
bool b = rp1->serializedFormat() == rp2->serializedFormat();
assert(a == b);
Pick-to: 6.2
Change-Id: I45e7d05eeb6dfa2b2de474da0a0644912aaf174a
Reviewed-by: Qt CI Bot <qt_ci_bot@qt-project.org>
Reviewed-by: Christian Strømme <christian.stromme@qt.io>
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>