Otherwise we get generation errors due to calling GENEX_EVAL on
something that is an invalid target.
Perhaps there will be a better way once
https://gitlab.kitware.com/cmake/cmake/issues/20287 is fixed.
Change-Id: I6af9511cbb9942b9edbc3b3fc7028936308715d8
Reviewed-by: Leander Beernaert <leander.beernaert@qt.io>
Reviewed-by: Alexandru Croitor <alexandru.croitor@qt.io>
This is needed for qtdeclarative examples, otherwise CMake configuration
fails due to missing QML import version info.
Change-Id: Iedde7b6a9e2d5ac7f6d81969ac7d6d874361c02e
Reviewed-by: Leander Beernaert <leander.beernaert@qt.io>
Reviewed-by: Alexandru Croitor <alexandru.croitor@qt.io>
Due to generator expression it is impossible to recursively evaluate the
link dependencies of a target. This is required by QtDeclarative's
qmltyperegistrar.
To overcome this we generate a ${target}_metatypes_dep.txt file which
contain lines with the following pattern:
${PATH_TO_METATYPES.json}=${PATH_TO_METATYPES_DEP.txt}
This can be used to recursively evaluate the dependencies at run time.
Change-Id: Ia4cee0632c16ba9631e0289db906fe9d320844a3
Reviewed-by: Alexandru Croitor <alexandru.croitor@qt.io>
Reviewed-by: Qt CMake Build Bot
Rather than pass the build type in the wrapper, make sure the build
type is a cache var, so it gets picked up when building other repos.
This reverts commit f72ca4cf85.
Change-Id: I5d91ab66249b6c40c5e548b0eec0e467ba0f2ebc
Reviewed-by: Joerg Bornemann <joerg.bornemann@qt.io>
Do not return when no qmldir file is present and no dynamic qmldir
information is set.
Change-Id: I04e458f69e4e4a6ec9b1e7ca7ba0b0f7520996f7
Reviewed-by: Qt CMake Build Bot
Reviewed-by: Alexandru Croitor <alexandru.croitor@qt.io>
If the OUTPUT_NAME of a plugin is the same as the CMake target name,
don't try to create a custom target with the same name. That will
cause configuration errors due to duplicate targets.
Amends f67d8ae2d4
Change-Id: Iaea7c68e22dbc1e345ba10950c312618abba4c21
Reviewed-by: Simon Hausmann <simon.hausmann@qt.io>
Some desktops do not run dbus session and still want to build qt.
Change-Id: I898a3c25c9b47c1a953e426873280ab9e160c669
Reviewed-by: Qt CMake Build Bot
Reviewed-by: Alexandru Croitor <alexandru.croitor@qt.io>
And also to get the original output names (qmake's "TARGET"), so that
the plugin file names are as they were in Qt 5.
Change-Id: I96a060d1a81693652847857372bec334728cb549
Reviewed-by: Qt CMake Build Bot
Reviewed-by: Simon Hausmann <simon.hausmann@qt.io>
In Qt 5, qmake generates CMake Config files which expose the plugins
as imported libraries. The name of these libraries are derived from
the plugin class name. So QCocoaIntegrationPlugin, and not qcocoa.
To keep compatibility between Qt5 and Qt6 CMake target names,
the pro2cmake script should generate plugin target names based on the
plugin class names.
To avoid passing the same name in qt_add_plugin (target and CLASS_NAME),
derive the class name from the target if the class name is
not explicitly specified.
Also add a new OUTPUT_NAME parameter which is used to change the
final file name of the plugin, so that it's compatible with Qt5.
For example to generate a qcocoa.dylib file, instead of
QCocoaIntegrationPlugin.dylib file.
The same OUTPUT_NAME value will be used for generation of plugin .prl
files for qmake consumption.
Change-Id: I4d53e680d7beb62befecd359cdf6bba60a34ff0d
Reviewed-by: Qt CMake Build Bot
Reviewed-by: Simon Hausmann <simon.hausmann@qt.io>
This allows doing debug_and_release builds with Ninja on all
platforms.
The "Ninja Multi-Config generator" is available starting with CMake
3.17.
Desired configurations can be set via CMAKE_CONFIGURATION_TYPES.
Possible values: "Release, Debug, RelWithDebInfo, MinRelSize".
For example -DCMAKE_CONFIGURATION_TYPES="Release;Debug".
The first configuration is the 'default' configuration which is
built when calling ninja with no arguments.
To build all targets of a certain configuration use "ninja all:Release"
or "ninja all:Debug".
To build all targets in all configurations use "ninja all:all".
Note that the first configuration influences which configuration of
tools will be used when building the libraries for all configurations.
In simple terms, when configured with
-DCMAKE_CONFIGURATION_TYPES="Release;Debug" the release version of moc
is used by AUTOMOC.
When configured with -DCMAKE_CONFIGURATION_TYPES="Debug;Release"
the debug version of moc is used by AUTOMOC.
Framework builds and Ninja Multi-Config don't currently work together
due to multiple bugs in CMake, which ends up generating an invalid ninja
file with duplicate rules. There are also issues with placement of the
debug artifacts.
This will be handled in a follow up patch after CMake is fixed.
Task-number: QTBUG-76899
Change-Id: If224adc0b71b7d1d6606738101536146aa866cd7
Reviewed-by: Qt CMake Build Bot
Reviewed-by: Leander Beernaert <leander.beernaert@qt.io>
Reviewed-by: Cristian Adam <cristian.adam@qt.io>
This manifested in Coin when ninja tried to build qdrawhelper_sse2.cpp
before the Core framework headers were copied, resulting in a
fatal error: 'qatomic.h' file not found.
Make sure every SIMD object library has all PRIVATE dependencies of
its parent library PRIVATE dependencies (except for other SIMD object
libraries), to make sure that the framework headers are copied by the
time the SIMD source file is compiled.
Here's an example for clarification. Gui_simd_sse2's LINK_LIBRARIES
property should have all the values of Gui's LINK_LIBRARIES property
(like Qt::Core) filtering out all SIMD object library targets (
like Gui_simd_sse2, Gui_simd_sse3, etc).
Thus we make sure the SIMD object libraries are built after Gui's
dependencies are built.
Note that using INTERFACE_LINK_LIBRARIES to avoid the filtering of SIMD
targets in the generator expression would only work in shared Qt builds.
In static Qt builds where PRIVATE dependencies become PUBLIC, CMake would
insert $<LINK_ONLY:Gui_simd_foo> entries in INTERFACE_LINK_LIBRARIES
which causes CMake to be confused and fail at generation time.
Change-Id: I246c1394b9c9830c0ebd11e6621e56b992a6a1f2
Reviewed-by: Leander Beernaert <leander.beernaert@qt.io>
Reviewed-by: Qt CMake Build Bot
Reviewed-by: Alexandru Croitor <alexandru.croitor@qt.io>
It's now just a pointer to a forward declared class
Task-number: QTBUG-74409
Change-Id: I34df385154dcff2bbba2f6318825ab5258fa6695
Reviewed-by: Laszlo Agocs <laszlo.agocs@qt.io>
insertMulti and unite will silently transform a QMap into a multi-map
which is not behavior we want to keep around anymore and as such is
being deprecated. QMap functions that only make sense in a multi-map
scenario are also deprecated and the implementation is moved to
QMultiMap where it makes sense.
Use QMultiMap if multiple keys are desired and insert(const QMap &)
if a non multi-map-converting unite is desired.
[ChangeLog][QtCore][QMap] insertMulti(), unite(), values(Key),
uniqueKeys(), count(Key) is now deprecated. Please use
QMultiMap instead.
Task-number: QTBUG-35544
Change-Id: I158c938ceefb5aaba0e6e7513b2c26a64d29d521
Reviewed-by: Qt CI Bot <qt_ci_bot@qt-project.org>
Reviewed-by: Lars Knoll <lars.knoll@qt.io>
Same as other versions of MSVC
Fixes: QTBUG-80328
Change-Id: I05c5ffe6d36e0cdfb781080a736c90b6a6d4b2ba
Reviewed-by: Timur Pocheptsov <timur.pocheptsov@qt.io>
* Add see also links from the deprecated function to the replacement.
* Change introduction text to reflect new function name rather than the
old and deprecated width().
* Change see also and inline references to width(), so that they now
refer to horizontalAdvance().
Task-number: QTBUG-65141
Change-Id: Iadfbc517e5df96e32058516f8795bd210cc4c5e4
Reviewed-by: Nico Vertriest <nico.vertriest@qt.io>
Reviewed-by: Venugopal Shivashankar <Venugopal.Shivashankar@qt.io>
qmltypes.prf does the same and the name is nicer.
Change-Id: I3364f7a244a941a4c6178cf87c65e289dc64ca22
Reviewed-by: Maximilian Goldstein <max.goldstein@qt.io>
Reviewed-by: Shawn Rutledge <shawn.rutledge@qt.io>
Reviewed-by: Fabian Kosmale <fabian.kosmale@qt.io>
Additional data should also be taken into account when using move
operator and function swap. This is already implemented for move
constructor.
Task-number: QTBUG-78544
Change-Id: I24ba34b0957a8fba7e15a934f2d08222dc95650f
Reviewed-by: Tor Arne Vestbø <tor.arne.vestbo@qt.io>
A new macro that can be added in the header file parsed by moc to tell moc
to include that file in the generated file
Change-Id: I03ad702c3fcd8380371015f226ee4b7456daf132
Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
Multiple topic commands (in this case, \enum) do not work across
different classes.
Reuse the documentation comment via an \include statement instead.
Fixes: QTBUG-78910
Change-Id: Ife83bdc9bbad650835fafc072180d10037648d0a
Reviewed-by: Paul Wicking <paul.wicking@qt.io>
wildcardToRegularExpression() returns an anchored regexp, so it is
pointless to anchor it again.
Change-Id: If470179d63ae7ca2e7f137c0f403ec5bb5be8aaf
Task-number: QTBUG-81396
Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
Reviewed-by: Oswald Buddenhagen <oswald.buddenhagen@gmx.de>
QSystemLocale::query() is specified to return a QString (wrapped in a
QVariant) for the various tokens used in formatting numbers (zero
digit, signs, separators) but the MS-Win back-end was returning QChar
(wrapped as QVariant) instead, using the first UCS-2 code-point of the
string (even if this was the first of a surrogate pair). The same
error shall be perpetrated by its caller, but we can at least DTRT in
the back-end, ready for the coming fix (in Qt 6) to its caller.
In the process, eliminate some local variables that shadowed a member
variable and adapt number-conversion to cope with surrogate-pair
digits. Optimised the latter for the case where zero is "0".
Change-Id: Idfb416c301add4c961dde613b3dc28b2e31fd0af
Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
The example created two QPropertyAnimation instances that controlled
the same property; this caused a clash for some transitions.
Remove the smoothFlipXRotation and smoothFlipYRotation animations;
they are not needed as equivalent animations are already set as
defaults for the state machine.
Fixes: QTBUG-28081
Change-Id: Ifa7a09d48cd4905df720e3327914320ed74ebae6
Reviewed-by: Paul Wicking <paul.wicking@qt.io>
This can happen in unit tests where a test has TARGET set to "../name",
which requires the target to placed in the parent binary directory.
It is possible to run into a second assignment for OUTPUT_DIRECTORY via
the DESTDIR property (e.g: qdbushmarshall test) which can then result in
two OUTPUT_DIRECTORY values.
However, the first one needs to take precedence or the tests won't
execute properly.
Change-Id: Ib263843fa86c3dd68d92a0989b95f2890335c92d
Reviewed-by: Alexandru Croitor <alexandru.croitor@qt.io>
As it searches through all connections, of which we have multiple for
each network reply.
Fixes: QTBUG-81336
Change-Id: Iba28278edae5f254bf884f427e0944d348b47d03
Reviewed-by: Timur Pocheptsov <timur.pocheptsov@qt.io>
Fix a couple of typos, and add a paragraph explaining
that there is no need of anchor the pattern again; a wildcard
is always anchored.
Fixes: QTBUG-81396
Change-Id: Ia67dc7477a05a450bdcc3def1ebbacce2006da4d
Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
[ChangeLog][QtCore][QResource] Added uncompressedSize() and
uncompressedData(), which will perform any required decompression on the
data, prior to returning (unlike data() and size()).
Change-Id: Ief874765cd7b43798de3fffd15aa053bc505dcb1
Reviewed-by: Mårten Nordheim <marten.nordheim@qt.io>