When introducing new entries for QOperatingSystemVersion,
We should follow the new pattern [1], not the old legacy one.
Amends commit 14278bb250
[1] qtbase/3446313c7a5cd6005089866a7b20c9f28e132a0a
Change-Id: Id3444a1fba1384f9b4a410b3878ad25639b69f3d
Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
Reviewed-by: Mårten Nordheim <marten.nordheim@qt.io>
When use /W4, MSVC warns about the code is not reachable.
It's not reachable indeed, so it's no need to include it
in the final binary, just use the same #ifdef guard to
comment it out.
Pick-to: 6.4
Change-Id: I22a321e2c748bd1c5608475d61ba9a83734c5364
Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
For the full list, please refer to [1].
Needed to change the qstringapisymmetry unit test:
In theory we don't need the array to be static and it did compile
without any problems so far, indeed. However, with this patch applied,
MSVC complains that the lambda function below can't access the array.
I don't understand why, because we use [&] in the lambda and it should
capture all the variables in theory, but in reality it failed to
capture this variable in the end. And making the variable static
solves this issue. Maybe it's a MSVC bug.
Already tested locally. Most Qt repos build without any issues,
only very few repos are not tested, as my local environment
can't build them.
[1] https://docs.microsoft.com/en-us/cpp/build/reference/zc-conformance?view=msvc-170
Change-Id: I658427aa171ee1ae26610d0c68640b2f50789f15
Reviewed-by: Marc Mutz <marc.mutz@qt.io>
Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
Reviewed-by: Jörg Bornemann <joerg.bornemann@qt.io>
Add the options PRE_INCLUDE_REGEXES, PRE_EXCLUDE_REGEXES,
POST_INCLUDE_REGEXES, POST_EXCLUDE_REGEXES, POST_INCLUDE_FILES, and
POST_EXCLUDE_FILES. These are forwarded to
qt_deploy_runtime_dependencies.
Change-Id: I003814bec7f797a0035e52b17fd0231f9ad7ff0d
Reviewed-by: Paul Wicking <paul.wicking@qt.io>
Reviewed-by: Alexandru Croitor <alexandru.croitor@qt.io>
Reviewed-by: Leena Miettinen <riitta-leena.miettinen@qt.io>
We restricted the runtime dependencies we deployed on Linux to libraries
within the Qt installation prefix. This restriction was supposed to
prevent the deployment of all kinds of system libraries, which is most
likely not wanted.
However, the user might link against non-system libraries, and those
should be deployed. The same holds for QML backend libraries that exist
outside the Qt installation prefix in the build directory of the
project.
Now, we restrict deployment to libraries that are not in default system
library directories. This can be overridden with the new
qt_deploy_runtime_dependencies option POST_EXCLUDE_REGEXES.
We add the following options to qt_deploy_runtime_dependencies, which
are then forwarded to file(GET_RUNTIME_DEPENDENCIES):
PRE_INCLUDE_REGEXES, PRE_EXCLUDE_REGEXES, POST_INCLUDE_REGEXES,
POST_EXCLUDE_REGEXES, and POST_INCLUDE_FILES.
Change-Id: I99a98fd91218abedda270609d0bafbb7f3e0feeb
Reviewed-by: Alexandru Croitor <alexandru.croitor@qt.io>
When deploying into some directory structure where CMAKE_INSTALL_LIBDIR
is different from Qt's lib dir, we need to set the RPATH of installed
plugins such that Qt libraries are found.
We do this using CMake's undocumented file(RPATH_SET) command and pray
that this command is safe to use across current and future CMake
versions. For CMake versions < 3.21, we use patchelf, which must be
installed on the host system.
The adjustment of rpaths can be turned on explicitly by setting
QT_DEPLOY_FORCE_ADJUST_RPATHS to ON.
The usage of patchelf can be forced by setting QT_DEPLOY_USE_PATCHELF to
ON regardless of the CMake version.
Change-Id: I62ced496b4c12bf6d46735d2af7ff35130148acb
Reviewed-by: Alexandru Croitor <alexandru.croitor@qt.io>
Otherwise we don't properly test whether the deployed executable can run
without adjusting the environment.
We temporarily adjust the test_widgets_app_deployment test and set
CMAKE_INSTALL_LIBDIR to make the test pass. It would now fail on Linux
distros where CMAKE_INSTALL_LIBDIR defaults to "lib64" but Qt is built
with lib dir "lib". The next commit removes this hack.
Change-Id: I63c79ef1ee23ffaeed881337fde6e9d889ecc0fe
Reviewed-by: Alexandru Croitor <alexandru.croitor@qt.io>
The code was in triplicate. Once is enough.
Pick-to: 6.4
Change-Id: I12a088d1ae424825abd3fffd171ce375892457fc
Reviewed-by: Fabian Kosmale <fabian.kosmale@qt.io>
Reviewed-by: Marc Mutz <marc.mutz@qt.io>
On Apple Silicon, Homebrew is installed under `/opt/homebrew` instead of
`/usr/local`, so I made a minor change clarifying this.
Change-Id: Ifccb51325339f80f8ed3c2a4f8acab485686af7e
Reviewed-by: Alexandru Croitor <alexandru.croitor@qt.io>
Unix systems have got crash loggers in the past 15-20 years, notably
macOS and Linux (abrtd, systemd-coredumpd, etc.). By setting the core
dump limit to zero, those tools should be mostly inhibited from running
and thus not interfere with the parent process' timeouts. Even for
systems without core dump loggers, disabling the writing of a core dump
to the filesystem should also help.
Pick-to: 6.4
Change-Id: I12a088d1ae424825abd3fffd171d112d0671effe
Reviewed-by: Mårten Nordheim <marten.nordheim@qt.io>
QWindow::requestActivate() is not supported.
We have one tst_selftests binary, and will test it with both xcb and
wayland qpa plugin. A runtime check and skip will have different
restult files, which is not implemented in testlib yet.
Task-number: QTBUG-107578
Pick-to: 6.4 6.2
Change-Id: Idc8cb24c6f42a9f0f4dc9493e3fd1a5803ba7ce0
Reviewed-by: Liang Qi <liang.qi@qt.io>
Platforms where we use futex do not allocate.
Windows gained support in 6.2, but the noexcept macro was missed.
Amends 91f6460aff
Change-Id: I76da48fbaac5749fdec4ec76de6a0ff891b78442
Reviewed-by: Marc Mutz <marc.mutz@qt.io>
Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
If a user would copy paste the cmake line shown in the documentation
it would fail to find the package because it has the wrong case.
Change-Id: Ia5354cf408a5744bcb1c13f2624b10a6a1dbea4b
Reviewed-by: Alexandru Croitor <alexandru.croitor@qt.io>
QOCIDriver::hasFeature() missed a 'override' which prevents compiling it
with '-Werror'
Pick-to: 6.2 6.4
Change-Id: I73a30134415947475e8f378fdb51bdd3f7fdd989
Reviewed-by: Volker Hilsheimer <volker.hilsheimer@qt.io>
Allocate the QSplitter on the stack so that it and its child widgets are
cleaned up when the test function finishes.
As a drive-by, replace QString usage with QByteArray to avoid unneeded
conversion from and to latin1, and modernize list construction and for loop.
Pick-to: 6.4 6.2
Change-Id: I2e29961edbab1ec88be356fca6bc100f08894e82
Reviewed-by: Richard Moe Gustavsen <richard.gustavsen@qt.io>
Similar to isPaste (removed in previous commit), m_isListener
is set when handling external clipboard events, and is no
longer needed now that QWasmClipboard::setMimieData() is no
longer called for that case.
Change-Id: Ib44612e3bd1d59bac95b041ccffdd2ae97f5f879
Reviewed-by: Morten Johan Sørvig <morten.sorvig@qt.io>
QWasmClipboard::setMimeData() was used to move clipboard data for
two different cases:
1) On programatic QClipboard::setMimeData() call from application
2) On paste event from the browser
However, we are free to not call it in case 2) above, which means
it can be used to handle programatic setMimeData() exclusively.
Change-Id: I5bb452538027ee8eab36be6e405ae416f350a08e
Reviewed-by: Mikołaj Boc <Mikolaj.Boc@qt.io>
Reviewed-by: David Skoland <david.skoland@qt.io>
Reviewed-by: Lorn Potter <lorn.potter@gmail.com>
These were mostly identical. Use the base clang config
and then specialize for Emscripten in a separate section.
Behavior changes: QT_CFLAGS_OPTIMIZE_SIZE is now -Oz instead
of -Os. Emscripten does not allow -Og, replace that flag
with -O2 -g.
Change-Id: I08163551ad6b84377b99f287983cc1191521055c
Reviewed-by: Aleksandr Reviakin <aleksandr.reviakin@qt.io>
Reviewed-by: David Skoland <david.skoland@qt.io>
We used to explicitly fade out combobox popups on macOS, but even the
cocoa platform plugin no longer implements a fadeWindow function.
Pick-to: 6.4
Change-Id: I5cd61da2c755ec0f312c451f0ea966aa48399385
Reviewed-by: Richard Moe Gustavsen <richard.gustavsen@qt.io>
In Qt 6, after changes such as 121fddcf5a,
we go through the QPA layer to close widget windows properly. Closing
and hiding of windows is now done in when we receive and handle the
window system's CloseEvent.
Such an event to a modally blocked window should be blocked, so that
users can't close a modally blocked window. However, if the event is the
result of a call to QWindow::close, then it should not be blocked.
Luckily, we know that the event is the result of such a call, so let
such events through. This restores compatibility with Qt 5, where it was
possible to first open a new dialog, and then close the previous dialog.
Add a test case.
Fixes: QTBUG-107188
Pick-to: 6.4 6.2
Change-Id: Id812c1fc36aa0e1a10dfb8d3a16a11d387289b05
Reviewed-by: Axel Spoerl <axel.spoerl@qt.io>
Reviewed-by: Shawn Rutledge <shawn.rutledge@qt.io>
Reviewed-by: Tor Arne Vestbø <tor.arne.vestbo@qt.io>
Reviewed-by: Qt CI Bot <qt_ci_bot@qt-project.org>
We've been requiring C++17 since Qt 6.0, and our qAsConst use finally
starts to bother us (QTBUG-99313), so time to port away from it
now.
Since qAsConst has exactly the same semantics as std::as_const (down
to rvalue treatment, constexpr'ness and noexcept'ness), there's really
nothing more to it than a global search-and-replace, with manual
unstaging of the actual definition and documentation in dist/,
src/corelib/doc/ and src/corelib/global/.
Task-number: QTBUG-99313
Change-Id: I4c7114444a325ad4e62d0fcbfd347d2bbfb21541
Reviewed-by: Ivan Solovev <ivan.solovev@qt.io>
It just adds constexpr to it (we're ignoring the range version).
Apply it to QStaticByteArrayMatcher, where it replaces rather
lengthy initialization code.
Pick-to: 6.4
Change-Id: I1d60216fb04c94fa66fce5cc01313b3e9ba856ac
Reviewed-by: Mårten Nordheim <marten.nordheim@qt.io>
The size parameter shadows the size() member function, so rename it to
newSize.
Prepares for a follow-up change that ports from count()/length() to
size().
Change-Id: I0ca8af57d6351f85a568409a8d02b66371bb05e7
Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
Just in case the same test is being run in parallel. We do that by
creating a listening TCP server in the test process. This test is
supposed to test the address reusability, so a clean close on a server
that never accepted a connection should not cause reusability issues.
Change-Id: I12a088d1ae424825abd3fffd171ccfb9fc5c09ee
Reviewed-by: Qt CI Bot <qt_ci_bot@qt-project.org>
Reviewed-by: Mårten Nordheim <marten.nordheim@qt.io>
To try to figure out why QProcess::waitForReadyRead is returning false
so quickly. Though we know it's going to be "Address in use".
FAIL : tst_QTcpServer::addressReusable(WithoutProxy) 'process.waitForReadyRead(5000)' returned FALSE. (Failed to listen: The bound address is already in use
Netid State Recv-Q Send-Q Local Address:Port Peer Address:PortProcess
tcp LISTEN 0 50 127.0.0.1:49199 0.0.0.0:* users:(("crashingServer",pid=40529,fd=4))
)
Pick-to: 6.4 6.2
Change-Id: Ic43a460bfc7c7eb6379405b7a1a064e502b6fef3
Reviewed-by: Mårten Nordheim <marten.nordheim@qt.io>
I don't know when conversion through sequential and associative
iteratables was added, probably some time in the 5.x. QString and
QByteArray got conversions to sequential iteratables for Qt 6.1 with
commit c9a1102269. Since that was
intentional, I'm just documenting reality.
Fixes: QTBUG-107246
Pick-to: 6.2 6.3 6.4
Change-Id: Id8d5e3999fe94b03acc1fffd171b863b1a0ead68
Reviewed-by: Ulf Hermann <ulf.hermann@qt.io>
- We don't support HPUX any more, so no need to talk about it
- Clarify that it's the QSharedMemory destructor that releases the
resources on Unix systems
- Explain the System V and POSIX backends and how to detect them
- Add a note about Android not being supported.
- Add a section about using QFile for shared memory
Change-Id: I413ea647c2a5453b8307fffd17174c8083416529
Reviewed-by: Tor Arne Vestbø <tor.arne.vestbo@qt.io>
Reviewed-by: Mårten Nordheim <marten.nordheim@qt.io>
- a signal does not need to be marked const; but fixing it would be BIC,
so has to wait until Qt 7
- QPointingDevice::GrabTransition should be fully qualified
- wrap the long line while we're at it
Amends 2692237bb1
Change-Id: I5d518bbbcb62d336bae0d59647b16018d83b9479
Reviewed-by: Paul Wicking <paul.wicking@qt.io>
Reviewed-by: Volker Hilsheimer <volker.hilsheimer@qt.io>
In case antialiasing is disabled the QFontEngine::Format_Mono is used
to render in the glyph cache.
In this format the padding needs to be 8-bit aligned.
Fixes: QTBUG-107038
Pick-to: 6.4 6.3 6.2 5.15
Change-Id: Icf69150b6b446099ad05d706ddcab0a57f8fe0c0
Reviewed-by: Eskil Abrahamsen Blomfeldt <eskil.abrahamsen-blomfeldt@qt.io>
This corresponds to Unicode version 15.0.0.
Added the following scripts:
* Kawi
* Nag Mundari
Full support of these scripts requires harfbuzz version 5.2.0,
this version adds support for Unicode 15.0:
https://github.com/harfbuzz/harfbuzz/releases/tag/5.2.0
Fixes: QTBUG-106810
Change-Id: Ib06c526e49b0f01ef9f21123bcf875c6b19f2601
Reviewed-by: Edward Welbourne <edward.welbourne@qt.io>
Currently, emrun will pick the browser to run tests on somewhat
arbitrarily. For predictability and stability, we should use one
browser as a basis, and Chrome seems to be a good fit as wasm features
are generally in good shape on it and it has good support for launching
from command-line.
Change-Id: I1d06a5916ad24ab9df9b0826c0773c652e6d3fcd
Reviewed-by: Morten Johan Sørvig <morten.sorvig@qt.io>
qttestrunner.py needs special logic to handle wasm
tests, which is not implemented yet. Disable the
coin testrunner until that is implemented.
Change-Id: Idfd001df5f6dcf44904940ace9adef5a355886cf
Pick-to: 6.4
Reviewed-by: Morten Johan Sørvig <morten.sorvig@qt.io>
Reviewed-by: Toni Saario <toni.saario@qt.io>
Reviewed-by: Mikołaj Boc <Mikolaj.Boc@qt.io>
If an error is returned from qt_safe_poll inside the event dispatcher
the error is currently printed and ignored.
For most cases this behavior seems to be fine, but when used in critical
systems e.g. automotive or medical, a error might indicate a more severe
problem and the application should be stopped instead.
The system can then decide itself what to do e.g. restarting the
application using a watchdog.
Change-Id: Iaf5abb20bb3941eaeff19d14e41c395c88fa088d
Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
There were two data8 rows; and no data9, so that was easy to fix.
Change-Id: I8191de142e1a3be57bf1ad97e63d5780f2859fea
Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>