operator--() would iterate before begin() if the
list was empty. This is UB, and will crash in Qt 6,
where begin()/end() can return an iterator pointing
to a nullptr if the list is empty.
Change-Id: I39c3a8ebb09fcad75d42019b02426ac5ac05eed9
Reviewed-by: Alex Blasche <alexander.blasche@qt.io>
Reviewed-by: Mårten Nordheim <marten.nordheim@qt.io>
...and re-regenerate qmake/CMakeLists.txt.
This removes one special case and is necessary for a subsequent patch
that changes how pro2cmake converts Qt tools.
Change-Id: Ie87b7841f3c29de3f2c8907e82975b6272f096cc
Reviewed-by: Alexandru Croitor <alexandru.croitor@qt.io>
The registry.cpp file is in the library subdirectory.
This doesn't contribute to the qmake or CMake build, but it removes the
need for a special case in qmake/CMakeLists.txt.
Change-Id: I66a566f0d1e0b82791822ca55a7de037369536a7
Reviewed-by: Alexandru Croitor <alexandru.croitor@qt.io>
Make the API more symmetric with regards to both QString and QStringRef.
Having this available helps making QStringView more of a drop-in
replacement for QStringRef. QStringRef is planned to get removed in Qt 6.
Change-Id: Ife036c0b55970078f42e1335442ff9ee5f4a2f0d
Reviewed-by: Volker Hilsheimer <volker.hilsheimer@qt.io>
This avoids issues with some special characters and spaces.
Change-Id: I6b7cedbe2c9663f62fae104488454faebab52ce0
Reviewed-by: Alexandru Croitor <alexandru.croitor@qt.io>
Allows them to not depend on QtOpenGL just to provide the default
backing store OpenGL support backend.
Change-Id: I90d6d9247ce76848d9d03e2d512fb736c81488d3
Reviewed-by: Laszlo Agocs <laszlo.agocs@qt.io>
When writing the qt6_qml_type_registration call, make sure to write
the set(QT_QML_MODULE_INSTALL_QMLTYPES TRUE) statement only if an
explicit path was provided via
QMLTYPES_INSTALL_DIR / QT_QML_MODULE_INSTALL_DIR.
This will remove the QT_QML_MODULE_INSTALL_QMLTYPES property from
many examples and tests in qtdeclarative, thus not installing the
.qmltypes file into the Qt prefix, thus polluting it.
Task-number: QTBUG-84403
Change-Id: I5c64d42915896d14f2591cbb64d73d912dbf7c7d
Reviewed-by: Qt CI Bot <qt_ci_bot@qt-project.org>
Reviewed-by: Joerg Bornemann <joerg.bornemann@qt.io>
Otherwise when configuring a standalone example without specifying a
CMAKE_BUILD_TYPE (so it's empty), building fails because
qt6_generate_meta_types_json_file thinks it's being called with
a multi-config generator.
Change-Id: I360c7dbb19522155d8e72f98836fb663916715a0
Reviewed-by: Joerg Bornemann <joerg.bornemann@qt.io>
Previously configuring a standalone example that had no explicit
INSTALL_DIR option for qt6_generate_meta_types_json_file would fail.
When no explicit location is specified to
qt6_generate_meta_types_json_file via INSTALL_DIR option, default
to installing into a lib/metatypes location relative to the install
prefix.
This is required for supporting calling
qt6_generate_meta_types_json_file when building standalone applications
or libraries (not part of the Qt build).
Make sure not to install the metatypes.json file for executables.
Install it only for libraries (aka modules).
Task-number: QTBUG-84403
Change-Id: Ie0dd75fca0cde71ccb4eb48030871e72d31d1725
Reviewed-by: Joerg Bornemann <joerg.bornemann@qt.io>
Split long signature into multiple lines, and indent some existing
misaligned signatures.
Change-Id: Icaed7b703c3f0b20472400b186ac2a28f1ff1dd1
Pick-to: 5.15
Reviewed-by: Volker Hilsheimer <volker.hilsheimer@qt.io>
Reviewed-by: Paul Wicking <paul.wicking@qt.io>
Because setting QFutureInterface to paused state does not mean that
the computations that are already in progress will stop immediately,
it may be useful to get notified when pause actually takes effect.
Introduced the QFutureWatcher::suspended() signal, to be emitted when
there are no more computations in progress, and no more result ready
or progress reporting signals will be emitted, i.e. when pause took
effect. Added {QFuture, QFutureWatcher}::isSuspended() methods for
checking if pause took effect.
QtConcurrent will now to send QFutureCallOutEvent::Suspended event
when the state is paused and there are no more active threads.
[ChangeLog][QtCore][QFutureWatcher] Added a new QFutureWatcher::suspended()
signal, to be emitted when pause took effect, meaning that there are no
more computations in progress. Added {QFuture, QFutureWatcher}::isSuspended()
methods for checking if pause took effect.
Fixes: QTBUG-12152
Change-Id: I88f2ad24d800cd6293dec63977d45bd35f9a09f0
Reviewed-by: Jarek Kobus <jaroslaw.kobus@qt.io>
CMake sets "lib" as default prefix for Windows-GNU platforms.
Change-Id: I49e3123c385610307c84c584a21f5f3827a6fafd
Reviewed-by: Alexandru Croitor <alexandru.croitor@qt.io>
That allows us to remove the copy of that function in QtSvgWidgets.
Change-Id: I99d54408781c99b877c4df8fc9fc5f4139dcebb2
Reviewed-by: Lars Knoll <lars.knoll@qt.io>
Since ancient times, tst_QDateTime::fromString_LOCALE_ILDATE() has
claimed to be Windows-only, although there is nothing MS-specific
about it; its name also purports to implicate locale, which it
doesn't. Turn it into two data rows for the more general
fromStringDateFormat() test, with no extra #if-ery about it.
Change-Id: I239c0f80f8f7fa42d498a0f801cc8edfb1db3d8c
Reviewed-by: Andrei Golubev <andrei.golubev@qt.io>
Reviewed-by: Mitch Curtis <mitch.curtis@qt.io>
One initializes data "byte by byte" not "byte per byte", at least in
any dialect I'm familiar with.
A byte array can be "created from raw data" but if it was "from a"
thing it'd have to be a datum of some sort.
Change-Id: Id9706b191f08f03418b9ea6f481797d93a278dff
Reviewed-by: Paul Wicking <paul.wicking@qt.io>
In case a certificate chain is missing an intermediate,
for a certificate having "Authority Information Access"
extension it's possible to fetch this intermediate and
build the chain up to the trusted root. Unfortunately,
it's not always possible to install the root certificate
in the system "ROOT" store and then an application
wants to set it in the socket's configuration,
using setCaCertificates(). But this call also
disables CA fetcher ('no on demand root loading').
It makes sense to relax this logic for such
certificates and try to fetch the intermediate CA
and then have the complete chain verified.
Pick-to: 5.15
Fixes: QTBUG-84173
Change-Id: I5b9b4271767eba6f5fd2b5cf05e942360c6aa245
Reviewed-by: Timur Pocheptsov <timur.pocheptsov@qt.io>
Reviewed-by: Mårten Nordheim <marten.nordheim@qt.io>
This file hasn't been touched in years, the current snippets file
is in src/corelib/doc/snippets
Change-Id: I919649a4284805d15ccb76d50fb690f5d3a23455
Reviewed-by: Topi Reiniö <topi.reinio@qt.io>
Reviewed-by: Paul Wicking <paul.wicking@qt.io>
Some fonts misreport the minimum right bearing, and in those cases
we may not be able to do a perfect text layout inside the bounds
set. This is a limitation we have chosen to accept.
To avoid random failure when testing this, we detect the case and
skip the test if we see that it may fail.
Fixes: QTBUG-84415
Pick-to: 5.15
Change-Id: I6b53ea2631c5c6e476e2902b5514829a2141796f
Reviewed-by: Friedemann Kleint <Friedemann.Kleint@qt.io>
Reviewed-by: Lars Knoll <lars.knoll@qt.io>
This also fixes source maps not getting created in debug mode.
Pick-to: 5.15
Fixes: QTBUG-83607
Change-Id: I3ed388c4fef6c286fa452a1c700fa65c2a8f9529
Reviewed-by: Morten Johan Sørvig <morten.sorvig@qt.io>
A common pattern in Qt Quick will be QProperty members that are
connected to a callback that needs to perform something when the value
changes, for example emitting a compatibility signal or marking scene
graph node data dirty.
To make such a pattern more efficient, a new QNotifiedProperty type is
introduced that offers the same API as QProperty<T>, with two changes:
(1) The template instantiation not only takes the property type as
parameter but also a callback pointer-to-member.
(2) Since that member itself cannot be called without an instance
and to avoid storing an instance pointer permanently, the API for
setBinding and setValue are adjusted to also take the instance
pointer. For the former it gets stored in the binding, for the
latter it is used to invoke the callback after setting the new
value.
Change-Id: I85cc1d1d1c0472164c4ae87808cfdc0d0b1475e1
Reviewed-by: Ulf Hermann <ulf.hermann@qt.io>
QString has the overloads taking a long/ulong. QByteArray also has
toLong/ULong(), so add these to make the API symmetric.
Change-Id: I6d1f98ca95fabd32b012f1c3df603dc54e187ec3
Reviewed-by: Mårten Nordheim <marten.nordheim@qt.io>
ExtendedRgb should be treated as Rgb as it can be an automatic upgrade.
Pick-to: 5.15
Change-Id: I2942a1067ed5cacb2f60f303f467887cb44c36dd
Reviewed-by: Eirik Aavitsland <eirik.aavitsland@qt.io>
The function name has been changed upstream (3.18).
Change-Id: I76a26cdc8de71dffa5402a7c7423006a7a01552e
Reviewed-by: Alexandru Croitor <alexandru.croitor@qt.io>
It's only calls were with the PUBLIC argument, so remove the argument
both in the declaration and call sites, and just return the public
dependencies.
Fix up the names of the variables as well.
Amends b56dc55c3a
Change-Id: I830c1894376d0d3a2eb2bd4ffa38a1b3b3066292
Reviewed-by: Joerg Bornemann <joerg.bornemann@qt.io>
Override request for debug info during compiler 'test',
otherwise call to dsymutil will fail call with /dev/null.
Use case here is to pass for example -glldb with CXXFLAGS.
Fixes: QTBUG-62953
Fixes: QTBUG-84467
Pick-to: 5.15
Change-Id: Ief8f987afb40d0b90da732195d67d476e7bb3aff
Reviewed-by: Tor Arne Vestbø <tor.arne.vestbo@qt.io>
Just opened some files with spell checker turned on,
and corrected what was underlined.
Also, see QTBUG-84427.
Change-Id: I702b5bf2cfe1f23c928a6a57f117a2f571ad86ea
Pick-to: 5.15
Reviewed-by: Mitch Curtis <mitch.curtis@qt.io>
For historical reasons we use build and release instead of create and
destroy. This becomes confusing now that more modules in Qt start taking
QRhi into use. Migrate to the more familiar naming, so those who have
used QWindow or QOpenGLContext before will find it natural.
Change-Id: I05eb2243ce274c59b03a5f8bcbb2792a4f37120f
Reviewed-by: Eirik Aavitsland <eirik.aavitsland@qt.io>
Switch strncpy to qstrncpy, which internally uses strncpy_s with MSVC.
This way we will not get the following warning:
qrhid3d11.cpp(933): warning C4996: 'strncpy': This function or variable
may be unsafe. Consider using strncpy_s instead. To disable deprecation,
use _CRT_SECURE_NO_WARNINGS. See online help for details.
Change-Id: Iaed86033b0fc182e68804f311ac382c93c72abda
Reviewed-by: Christian Strømme <christian.stromme@qt.io>
The name CET is locale-dependent; but QLocale doesn't know about
localization of time zone names. Such abbreviated zone names are, in
any case, potentially ambiguous - various zones around the world have
collisions - so they can't be relied on.
QTimeZone's various backends have differing handlings of how to
abbreviate zone names (MS's provides no abbreviated names at all); and
it appears macOS actually follows the relevant localizations.
So it is hopeless to hard-code the expected zone abbreviations.
Changed the tests to consult QTimeZone for the abbreviation and
compare what it gets with the results of checks which should match
this. This is less stringent, but it is at least robustly correct,
thereby getting rid of assorted kludges and #if-ery.
Pick-to: 5.15
Task-number: QTBUG-70149
Change-Id: I0c565de3fd8b5987c8f5a3f785ebd8f6e941e055
Reviewed-by: Tor Arne Vestbø <tor.arne.vestbo@qt.io>
Remove '/' as an example directory. We do not want to retrieve the
directory tree of the entire system.
Change-Id: I1caa7ef659dfe326515a4d81193682dacb373856
Reviewed-by: Paul Wicking <paul.wicking@qt.io>
C&P mistake dropped $$ from qmake variables, my fault.
Will squash manually in 5.15 to avoid introducing a bug there.
Amends fa98adbd04.
Change-Id: I3ce33dba16f512cd20c8d3c6adc4c1a09506c1ea
Reviewed-by: Joerg Bornemann <joerg.bornemann@qt.io>
Previously we checked the LINK_LIBRARIES property of the main module
target, but we should instead use the values of
INTERFACE_LINK_LIBRARIES set on the FooPrivate module.
Because both versionless targets and private targets are interface
libraries, we need to properly differentiate between them when
following versionless targets to their main associated target.
To do that, instead of using string comparison, export an additional
private _qt_is_versionless_target property, and query that.
Also make sure to set and export the _qt_config_module_name property
on the FooPrivate targets.
Also make sure to APPEND to EXPORT_PROPERTIES rather than override
(looking at you QtFeature.cmake).
Task-number: QTBUG-75666
Change-Id: Ia3261e218840e9f5217ab49755e8c876560e294d
Reviewed-by: Cristian Adam <cristian.adam@qt.io>
Needed to avoid linker warnings transformed into errors, when linking
QtWebEngine with qmake mixing.
ld: warning: linking against a dylib which is not safe for use in
application extensions:
The flag is added to libraries and plugins, unless opted out.
CMake equivalent of 944110089d
Task-number: QTBUG-83929
Task-number: QTBUG-75666
Change-Id: I3e9acca4712c9a266bf54c6e35e2fd2c0096692b
Reviewed-by: Tor Arne Vestbø <tor.arne.vestbo@qt.io>
Record the device and inode numbers when found and assume we can
safely re-use the name if those have not changed.
Tidy up some preprocessor trivia in the process and moved
zone-availability check functions to before the system name lookup.
Pick-to: 5.15
Task-number: QTBUG-75585
Change-Id: I3660922ef3c94b553a20f887a676e8921693b30f
Reviewed-by: Mårten Nordheim <marten.nordheim@qt.io>
Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
This was overlooked when enabling setting a custom thread pool
for various concurrent methods.
Fixes: QTBUG-53465
Change-Id: I189a7776fa02bbc3e995538cc154a7246ad1ad7a
Reviewed-by: Sona Kurazyan <sona.kurazyan@qt.io>
This was overlooked when enabling setting a custom thread pool
for various concurrent methods.
Fixes: QTBUG-53465
Change-Id: I8b0a0086e46639639051fe99cf52d049f7bb3bb2
Reviewed-by: Sona Kurazyan <sona.kurazyan@qt.io>
Coverity warned that chunk could be >= tldChunkCount (2), and
tldData[chunk] (array of length 2) would be accessed out of bounds.
This can not happen, but it was unclear.
Clarify logic with comments and asserts, that Coverity will hopefully
understand now.
Change-Id: I2a38c685cfcbc69ed123918e8cbed360b20b1035
Coverity-Id: 178254
Pick-to: 5.15
Reviewed-by: Volker Hilsheimer <volker.hilsheimer@qt.io>
Reviewed-by: Edward Welbourne <edward.welbourne@qt.io>
Reviewed-by: Mårten Nordheim <marten.nordheim@qt.io>
With the recent changes in the utility that generates it, it now has
improved readability and constexpr arrays, usable in static asserts.
It also has an updated list of TLDs.
Change-Id: Ibdc986d667feebeb141ff81f6fddbc05b6be8488
Reviewed-by: Edward Welbourne <edward.welbourne@qt.io>
so that they can be used with Q_STATIC_ASSERT().
Also constify more another array.
Change-Id: I1e7208127e06abb33af9bdc46712657af5dc98fe
Reviewed-by: Edward Welbourne <edward.welbourne@qt.io>
The next time qurltlds_p.h is generated, array sizes shall be explicit.
Also added some helpful comments. And updated copyright date.
Change-Id: I2bc9a78bcc2982845fce75a413e2048b0bfd12a0
Reviewed-by: Edward Welbourne <edward.welbourne@qt.io>
Simplify QTableWidgetSelectionRange by removing the unneeded
user-defined functions - the compiler can generate them by it's own.
Change-Id: Ia96ea29f595851e58c5b714bb316174406d42b8e
Reviewed-by: Shawn Rutledge <shawn.rutledge@qt.io>