To not disturb the qmake build we kept syncqt.pl in <src>/bin but
installed it to libexec. This is not necessary anymore.
This also removes the need for having syncqt.pl in both, bin and libexec
in the build dir of qtbase.
Pick-to: 6.1
Fixes: QTBUG-91076
Change-Id: I44b014ea41e3f00c420e02fd5c76f11169340b8c
Reviewed-by: Kai Koehne <kai.koehne@qt.io>
C4180, C4458 were disabled already in 2012, in commit 6668f5becf.
C4577 was disabled due to QtScript being compiled without exception
support in commit 97d7d80e73.
Anyhow, Qt Script is now officially gone in Qt 6, and Qt headers
do work just fine with C4180. Finally, C4458 is nowadays a W4 warning,
so not enabled in the first place.
Task-number: QTBUG-82615
Change-Id: I2f9b8e858817876b069a166129fbfac7ef3587a0
Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
Reviewed-by: Oliver Wolff <oliver.wolff@qt.io>
Prefix framework builds of Qt that use the -qtlibinfix had wrong include paths
in qt_lib_XXX.pri files which broke compilation of user projects. We now honor
QT_LIBINFIX in qt_lib_XXX.pri files.
However, due to how framework includes work, module-style includes like
#include <QtCore/qstring.h>
still do not work. Use <qstring.h> or <QString> instead.
Fixes: QTBUG-84219
Pick-to: 5.15
Change-Id: I5314ee810e64cbba6dba06a84064d48bb4ff3377
Reviewed-by: Tor Arne Vestbø <tor.arne.vestbo@qt.io>
The header clean command must not be prefixed by "@echo ...", because it
now starts with "$(CXX)" which already is prefixed.
This amends commit 6fa5dfdd.
Change-Id: I5c2e0d2c2ed91c7232fce0a4a49db0fccfdc005d
Reviewed-by: Tor Arne Vestbø <tor.arne.vestbo@qt.io>
Normal sources are built using $(CXX), which is defined in the makefile,
but can be overridden. We should do the same lazy evaluation of the
compiler for headers.
Change-Id: Ic548786bd18ed8fb7eb0b58a527615ab19000323
Reviewed-by: Kai Koehne <kai.koehne@qt.io>
Injected headers were made relative to MODULE_BASE_OUTDIR by syncqt
and made absolute by resolving against REAL_MODULE_BASE_OUTDIR.
This breaks for modules that reside outside the original Qt source
tree (if the directory depth doesn't coincidentally match).
Now, we resolve injected headers against build_basedir, which is
REAL_MODULE_BASE_OUTDIR. To emphasize the equivalence of
REAL_MODULE_BASE_OUTDIR and syncqt's build_basedir, use the former for
syncqt's -output argument.
This commit amends 2aa779e8.
Fixes: QTBUG-70587
Change-Id: I2935d87d7ee681fa4aa795a270b94ab7a43abe59
Reviewed-by: Dominik Holland <dominik.holland@pelagicore.com>
Reviewed-by: Oliver Wolff <oliver.wolff@qt.io>
in non-prefix builds, the forwarding headers always end up in qtbase's
build dir, while the injected headers always live in the build dir of
the module they belong to. to deal with that, we now record the target
path relative to the module root dir instead of relative to the base
directory of the forwarding header itself.
Fixes: QTBUG-70056
Change-Id: Ic4346148a125b13e2610f6965cdf4f5266ac763e
Reviewed-by: Lars Knoll <lars.knoll@qt.io>
using qt$$MODULE isn't enough if the module is composed of submodules
which need the final module's headers, because that would require two
modules having the same module .pri file.
the first thought to fix this was to just use $$lower($$TARGET), but
that breaks for testlib (QtTest). while the config file name isn't
public api, it's included by a public header, so changing it is risky.
so instead stay with the original pattern, but make it explicitly
overrideable.
the cherry-pick is needed to support QtWebEngine 5.12 with Qt 5.11,
a requirement that was raised too late.
Change-Id: I758c46ed403620620d577ae16866ce751271b63e
Reviewed-by: Michal Klocek <michal.klocek@qt.io>
Reviewed-by: Allan Sandfeld Jensen <allan.jensen@qt.io>
(cherry picked from commit 95b0e4c956)
Reviewed-by: Oswald Buddenhagen <oswald.buddenhagen@qt.io>
don't put them into GENERATED_HEADER_FILES, as they obviously cannot be
found in a pre-synced source dir. instead, let the injection code itself
add them to INJECTED_HEADER_FILES.
Task-number: QTBUG-67813
Change-Id: Id2a7c565b14fcba8aba9d1dd8b1dd39c586d0d91
Reviewed-by: Joerg Bornemann <joerg.bornemann@qt.io>
Reviewed-by: Alexandru Croitor <alexandru.croitor@qt.io>
these are actually redundant with INJECTIONS.
Change-Id: I0a71930401e00d30c9898b4d958de5e89c496d18
Reviewed-by: Joerg Bornemann <joerg.bornemann@qt.io>
Reviewed-by: Alexandru Croitor <alexandru.croitor@qt.io>
instead of relying on more or less accidental qmake behaviors regarding
the base dir for relative paths (esp. if a file does not exist yet),
make everything explicit. to that effect, clearly define the base tree
(source or build) for every syncqt-generated variable, and write only
in-tree relative paths to the variables. on the receiving end, resolve
the paths as soon as headers.pri was read.
Task-number: QTBUG-67111
Change-Id: I32ae5760fb62ebc650fdb69e46aac786a8141564
Reviewed-by: Lars Knoll <lars.knoll@qt.io>
Reviewed-by: Alexandru Croitor <alexandru.croitor@qt.io>
in non-prefix configs, one has to differentiate between the module's own
build dir and qtbase's build dir, because the forwarding headers are
placed in -outdir under include/, while the actual headers end up in the
real build dir under src/.
Change-Id: I1d8ac904556b354bd113995316ba11dd6560a70d
Reviewed-by: Lars Knoll <lars.knoll@qt.io>
Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
This warning used to be part of -Wconversion, but that generates too
more noise than we're willing to fix now (like conversion from qint64 to
int). The float conversion does trigger for conversion from double to
float, as shown in all the QVectorND uses of float, but more
importantly, it triggers on passing floats to ints.
Change-Id: I69f37f9304f24709a823fffd14e69cfd33f75988
Reviewed-by: Allan Sandfeld Jensen <allan.jensen@qt.io>
The module might add QT_RESTRICTED_CAST_FROM_ASCII to DEFINES to
be able to use string literals under the assumption they are UTF8
without warnings from QT_ASCII_CAST_WARN, but this conflicts with
QT_NO_CAST_FROM_ASCII which is added for the headersclean build
step.
Change-Id: Ic1d7b5415350477d751a6c15219d4f8feb816a3c
Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
Creating a precompiled header exclusively for a one- or two-file module
is wasteful. The time that it takes to build the precompiled source is
on the same order as a regular compilation, so enabling precompiled
headers for those modules just makes the build slower.
Also make it possible to override the precompiled header by just setting
PRECOMPILED_HEADER to empty.
Change-Id: I0e1a09998253489388abfffd14b5f221288c4826
Reviewed-by: Oswald Buddenhagen <oswald.buddenhagen@qt.io>
This warning is added in MSVC 2015 and is printed when we use noexcept
in modules we turned exceptions off.
Task-number: QTBUG-59645
Change-Id: Id92f4a61915b49ddaee6fffd14ae3b943ccd2bce
Reviewed-by: Friedemann Kleint <Friedemann.Kleint@qt.io>
Reviewed-by: Simon Hausmann <simon.hausmann@qt.io>
Reviewed-by: Oswald Buddenhagen <oswald.buddenhagen@qt.io>
The compiler is mostly GCC in disguise, but the libraries are not. Since
the toolchain is not open, it's difficult to fix issues in it.
Task-number: QTBUG-59671
Task-number: QTBUG-59672
Change-Id: Id92f4a61915b49ddaee6fffd14aea2639153f073
Reviewed-by: Jake Petroules <jake.petroules@qt.io>
the target of the injected forwarding header doesn't exist at qmake
time, as it is generated by an extra compiler, so the touch() calls in
qt_module_headers.prf would fail.
the error scenario described in ce942a226 is not applicable to
gui/vulkan, as no bootstrapped modules are involved. therefore, we can
just suppress the timestamping.
Change-Id: I1c9b6fcdf3717069fdbb654e3cb5d73b199192f4
Reviewed-by: Friedemann Kleint <Friedemann.Kleint@qt.io>
Reviewed-by: Joerg Bornemann <joerg.bornemann@qt.io>
Reviewed-by: Laszlo Agocs <laszlo.agocs@qt.io>
the borrowing of headers always happens from "proper" modules which are
actually built as frameworks if so requested. that means that even
though the borrowing module itself never is a framework, it needs a
framework path and include paths that point into frameworks.
amends 20c7ab44.
Change-Id: Ic582060dd179cc592e9be7792ff02cebdfabd772
Reviewed-by: Ulf Hermann <ulf.hermann@qt.io>
Reviewed-by: Joerg Bornemann <joerg.bornemann@qt.io>
Our headers ought to be clean in all compiler versions.
Change-Id: I4a7dc1fe14154695b968fffd14aba9ff9995c618
Reviewed-by: Oswald Buddenhagen <oswald.buddenhagen@qt.io>
Fixes: warning: implicit conversion from 'float' to 'double' to match
other operand of binary expression [-Wdouble-promotion]
Task-number: QTBUG-57068
Change-Id: I897a341aca83873bc6abd256a82a3b9f09409833
Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
it makes no sense to version them, as they contain only #defines anyway.
it also removes the need to special-case their location in shadow builds
with pre-synced headers, which we actually failed to do anyway.
Task-number: QTBUG-56286
Change-Id: I4ea717f7be56494cfea0572389bea173d7470b6e
Reviewed-by: Lars Knoll <lars.knoll@qt.io>
This macro expands into a static_assert and can be used to
trigger a compile error if a certain feature is not available
when trying to compile some code.
This is especially useful to protect against accidental inclusion
of headers that implement functionality related to a feature.
Change-Id: I456c55b989ce5f35f3af0e13c1886a85c23dfe29
Reviewed-by: Edward Welbourne <edward.welbourne@qt.io>
Reviewed-by: Lars Knoll <lars.knoll@qt.io>
This change implements the required infrastructure to modularize the new
configuration system.
This requires a hierarchy of configuration files, both for handling
multiple repositories and for individual modules inside the same
repository.
When configuring, they all need to get loaded first, as command line
processing needs to know about all possible command line options.
When the command line has been processed, the individual configuration
files need to get processed one after the other and independently from
each other.
Configure is now automatically invoked when building the a project
tree's "root" project; this works with both modular and top-level builds
of Qt (the latter with an according change in the super repo). As an
immediate consequence, the -skip option moves to the super repo with a
different implementation, as configuration is now done after the repo
list is determined. The option belongs there anyway.
This commit also adds an optional testDir entry to the json file. Like
this, we can still have all configure tests in qtbase/config.tests and
the configuration file in, e.g., corelib can reference those.
The files section can now be left out as long as a 'module' entry is
present, specifying the module name. The names of the files to generate
can then be deduced from that name. We still need to be able to specify
names directly for the global configuration files.
qtConfig() now also queries features which are module-specific. As it is
sometimes necessary to query the configuration of modules which should
not be actually linked (and cannot in the case of subdirs projects), the
new variable QT_FOR_CONFIG which allows specifying configuration-only
dependencies is introduced.
Done-with: Oswald Buddenhagen <oswald.buddenhagen@theqtcompany.com>
Change-Id: Id1b518a3aa34044748b87fb8fac14d79653f6b18
Reviewed-by: Lars Knoll <lars.knoll@qt.io>
Reviewed-by: Oswald Buddenhagen <oswald.buddenhagen@theqtcompany.com>
they are build-time generated, so they must go to the build dir
irrespective of whether we're using pre-synced headers.
Task-number: QTBUG-55585
Change-Id: I5f10b35c40b0ae2ddc5568d70e254b787ac3f914
Reviewed-by: Lars Knoll <lars.knoll@qt.io>
Use the new qtConfig macro in all pro/pri files.
This required adding some feature entries, and adding
{private,public}Feature to every referenced already existing entry.
Change-Id: I164214dad1154df6ad84e86d99ed14994ef97cf4
Reviewed-by: Lars Knoll <lars.knoll@qt.io>
Reviewed-by: Oswald Buddenhagen <oswald.buddenhagen@theqtcompany.com>
this wasn't possible when these headers were still generated by syncqt,
as the targets may have been still missing at that time. however, as we
do that now with qmake, forwarding the timestamps is perfectly possible,
and is consistent with what syncqt itself does for "regular" headers.
the immediate problem this solves: when the early creation of the
forwarding headers in qtbase.pro is removed, they get created only when
corelib.pro is processed. their timestamps would be after the timestamps
of the already built bootstrapped libraries. if now the project files of
these libs get re-created, qmake's not conditional-aware dependency scan
would add these headers to the libs' deps, thus causing them to be
re-built. the re-built tools would in turn cause all mocs and thus all
libraries to be re-built. this would be particularly problematic if it
happened between 'make' and 'make install' due to another bug ...
Change-Id: I8d597f1f925369d93aaf3cc6c02e954eeae003a4
Reviewed-by: Lars Knoll <lars.knoll@qt.io>
get rid of the entirely superfluous stock "Aborting." messages -
the event triggering the exit has already reported the problem.
Change-Id: Ib9dfb9e4212f60eceb2ea432cdf56c5a8afe9d65
Reviewed-by: Lars Knoll <lars.knoll@qt.io>
instead of unsetting the flag later on, don't set it in the first place.
Change-Id: Id448500b02b5c3e1dc7c332cc178a84c7fd2cfdc
Reviewed-by: Joerg Bornemann <joerg.bornemann@theqtcompany.com>
the main objective was to fix the bootstrap modules in framework builds.
bootstrapped modules which "borrow" headers from "proper" modules can
specify this in a clean way now.
a side effect of this is that the bootstrap-dbus module now has its own
syncqt call.
most includepath-related setup from qt_module_pris.prf was moved to
qt_module_headers.prf.
Change-Id: Ie0d8192cfac1a8cdae0ddd0bc0cd8c3092b1e85b
Reviewed-by: Joerg Bornemann <joerg.bornemann@theqtcompany.com>
Reviewed-by: Oswald Buddenhagen <oswald.buddenhagen@theqtcompany.com>
This should help improve the cleanliness of our source code, including
compliance with the C++ standards. They apply to all of our code except
examples (they don't load qt_common.prf).
Change-Id: Ia0aac2f09e9245339951ffff13c94663c1901766
Reviewed-by: David Faure <david.faure@kdab.com>
the projects which use full mode with the named modules have them.
Change-Id: I3b9383d1cc2b43411c25690a5e35e7e84a55aa23
Reviewed-by: Joerg Bornemann <joerg.bornemann@theqtcompany.com>
Reviewed-by: Andy Nichols <andy.nichols@theqtcompany.com>
that way other modules can use the headers without hacks.
this required making the base directory for paths in headers.pri
configurable in syncqt.
Change-Id: Id35cfe05bcf4c576d3f2d0d8d09590a5e23d21d3
Reviewed-by: Andy Nichols <andy.nichols@theqtcompany.com>
The former is meaningless nowadays.
Change-Id: I27c7eb0e924f3f2e9b73185f1b198909aeb6b031
Reviewed-by: Olivier Goffart (Woboq GmbH) <ogoffart@woboq.com>
this makes the distclean targets work throughout qt.
the dreaded confclean target is aliased to distclean.
Task-number: QTBUG-8202
Task-number: QTBUG-20566
Change-Id: I7ac8e3b5b0110825dc93e4fa885281db91c6cf83
Reviewed-by: Joerg Bornemann <joerg.bornemann@theqtcompany.com>
there is neither a point in building a PCH that will never be used, nor
does it even work with the aux TEMPLATE.
Change-Id: I2fe11f951f81adf5e15066ed60f983003c76b451
Reviewed-by: Joerg Bornemann <joerg.bornemann@theqtcompany.com>