customFilters defined in .qdocconf are not supported anymore by Qt
Assistant since Qt 5.13. Therefore remove them from all .qdocconf files,
also to avoid cargo-culting them to new help modules.
Task-number: QTBUG-95987
Change-Id: I664391460637d2e859348da0338e1a4a3ee9f570
Reviewed-by: Edward Welbourne <edward.welbourne@qt.io>
Reviewed-by: Paul Wicking <paul.wicking@qt.io>
By the time of Qt 6.2 release all new apps targeting Play store must
target API level 30 (Android 11) or above (starting in 08/2021 for
new apps and 11/2021 for existing apps' updates).
Pick-to: 6.2 5.15
Task-number: QTBUG-94451
Change-Id: Id7fa2fd62899a7259e365c917292c6c3ac0d2b0d
Reviewed-by: Assam Boudjelthia <assam.boudjelthia@qt.io>
Make it possible to select the C17/C18 standard with
CONFIG += c17
or
CONFIG += c18
Pick-to: 6.2 5.15
Fixes: QTBUG-96026
Change-Id: I719d22366c3efda009118d58ead173a25ed285c0
Reviewed-by: Alexandru Croitor <alexandru.croitor@qt.io>
The vcxproj generator completely ignored QMAKE_CFLAGS and did only read
QMAKE_CXXFLAGS. The msbuild-internal "cl compiler tool" contains the
flags for both, C and C++. It is to risky to take all QMAKE_CFLAGS into
account for the "cl compiler tool", because this might collide with what
is specified in QMAKE_CXXFLAGS. Therefore, we only read the
/std:... compiler option from QMAKE_CFLAGS and set the
LanguageStandard_C flag in the msbuild file.
Pick-to: 6.2 5.15
Task-number: QTBUG-89296
Change-Id: I885061802c1350b293a7868d4c9a9367d30e2380
Reviewed-by: Alexandru Croitor <alexandru.croitor@qt.io>
Handle the compiler flags /std:c11 and /std:c17 and turn them into the
values stdc11 and stc17 for the LanguageStandard_C tag.
Drive-by change: Add /std:c++20 to the list of known C++ standard
options.
Pick-to: 6.2 5.15
Task-number: QTBUG-89296
Change-Id: Ia575fff611bdf795406db84bd34057d008c8a383
Reviewed-by: Alexandru Croitor <alexandru.croitor@qt.io>
In a subsequent comment we will set the qmake variable MSVC_VER to 16.8
to check for the availability of certain compiler flags that were
introduced in that compiler version.
The old code compared exact version strings. With this patch we're
checking version ranges instead and handle MSVC_VER 16.x as VS 2019.
Pick-to: 6.2 5.15
Task-number: QTBUG-89296
Change-Id: I9ea24a66f68a342a72f5c2a285bafacb8786661b
Reviewed-by: Alexandru Croitor <alexandru.croitor@qt.io>
"-framework Foo" arguments must be placed in the inherited_linker_flags
variables instead of dependency_libs.
Pick-to: 5.15
Fixes: QTBUG-2390
Change-Id: Idec4115533ed1f86f44db64931fa64cadeeb4572
Reviewed-by: Alexandru Croitor <alexandru.croitor@qt.io>
The format was renamed in 27db9e458c.
Pick-to: 6.2
Change-Id: I53975c7467d8768dc9dc9ac2d89c42eefa12e22f
Reviewed-by: Mårten Nordheim <marten.nordheim@qt.io>
Before this change, next() was the only way to advance the iterator,
whether the caller was ultimately interested in just the filePath()
(good) or not (bad luck, had to call .fileInfo()).
Add a new function, nextFileInfo(), with returns fileInfo() instead.
Incidentally, the returned object has already been constructed as part
of advance()ing the iterator, so the new function is faster than
next() even if the result is ignored, because we're not calculating a
QString result the caller may not be interested in.
Use the new function around the code.
Fix a couple of cases of next(); fileInfo().filePath() (just use
next()'s return value) as a drive-by.
[ChangeLog][QtCore][QDirIterator] Added nextFileInfo(), which is like
next(), but returns fileInfo() instead of filePath().
Change-Id: I601220575961169b44139fc55b9eae6c3197afb4
Reviewed-by: Mårten Nordheim <marten.nordheim@qt.io>
- Replaced # with / after link prefix "Qt for macOS"
- added definite article
- punctuation issue
- Added prefix "Qt for macOS/" to one link, and
changed "macOS Version Dependencies" to "Supported Versions"
Fixes: QTBUG-90662
Change-Id: Ib2e48ee477e8d34fece64d6dea1f86fe73f09478
Reviewed-by: Edward Welbourne <edward.welbourne@qt.io>
This prevents us from first reserve()ing Prealloc elements, and then
possibly reserve()ing a larger number, which leaves the first bucket
list's memory unused.
Consequently, deprecate reserve().
Change-Id: Ifc0a5a021097f4589557e7b5e45d9d0892797ade
Reviewed-by: Qt CI Bot <qt_ci_bot@qt-project.org>
Reviewed-by: Mårten Nordheim <marten.nordheim@qt.io>
In a Qt build that was configured with INSTALL_MKSPECSDIR set to
something different than INSTALL_DATADIR, the qmake property
QT_HOST_DATA was wrong. Consequently, mkspecs could not be loaded,
rendering qmake dysfunctional.
The reason was that we considered every QT_HOST_xxx property to have the
same value as QT_INSTALL_xxx in a non-cross build.
This is not true for QT_HOST_DATA, because users might want to set
INSTALL_DATADIR to "foo" but INSTALL_MKSPECSDIR to "bar/mkspecs".
Move the unused determination of the host data dir to the QtLibraryInfo
lib and handle QT_HOST_DATA specially.
Fixes: QTBUG-94591
Pick-to: 6.2
Change-Id: I2c44cda8405ff1d14391254fcd1d9b1361cb5855
Reviewed-by: Alexandru Croitor <alexandru.croitor@qt.io>
error LNK2038: mismatch detected for 'RuntimeLibrary': value
'MT_StaticRelease' doesn't match value 'MD_DynamicRelease'.
Change-Id: I1422bdc680a066f0736c3e28cc6beafd2461db88
Reviewed-by: Qt CI Bot <qt_ci_bot@qt-project.org>
Reviewed-by: Alexandru Croitor <alexandru.croitor@qt.io>
After the discussion we concluded that QT_HOST_PREFIX should not
completely replicate the QT_INSTALL_PREFIX behavior.
So this patch implements the following logic if qt.conf is provided:
1. Prefix is not set
a. If HostPrefix is not specified, then QT_HOST_PREFIX will be set
to the folder containing qt.conf.
b. If HostPrefix is specified and is relative, then QT_HOST_PREFIX
will be relative to the folder containing qt.conf.
2. Prefix is set
a. If HostPrefix is not specified, then QT_HOST_PREFIX will have
the Prefix value.
b. If HostPrefix is specified and is relative, then QT_HOST_PREFIX
will be relative to the folder containing the qt.conf.
The logic might change in a future commit to use the current application
directory instead of qt.conf path, since the use of qt.conf is dictated
by the bootstrap library and this is no longer the case.
Fixes: QTBUG-93707
Change-Id: I5460c97c45924bb8e0c95493afdb9585994c5f28
Reviewed-by: Alexandru Croitor <alexandru.croitor@qt.io>
To not scare sanitizers and their users.
Change-Id: I51de5d6a5a358b3cf1355aeb6cc826a6ac021243
Reviewed-by: Alexey Edelev <alexey.edelev@qt.io>
Reviewed-by: Joerg Bornemann <joerg.bornemann@qt.io>
In a cross built Qt, for example Qt for Android, calling "qmake -spec
android-clang" led to an error message:
"Could not find qmake spec '-qtconf'."
This happened, because:
- the qmake in Qt for Android is a wrapper script that calls
"qmake -qtconf qt_target.conf -spec android-clang"
- the first stage of command line argument handling in qmake garbled the
call to "qmake -spec -qtconf qt_target.conf android-clang"
We do not modify the order of arguments anymore.
Instead, we skip the "-qtconf <file>" arguments in the first argument
handling stage that is supposed to determine qmake's modus
operandi (like -project or -query).
In addition, we need to fix the assignment of
QLibraryInfoPrivate::qtconfManualPath which was only done if
QMakeGlobals::addCommandLineArguments returned ArgumentsOk. However,
this function returns ArgumentUnknown, if it encounters an argument it
cannot handle - like the project name.
Now, we assign QLibraryInfoPrivate::qtconfManualPath if there was no
error detected.
Document the return values of addCommandLineArguments.
This amends commit 661b586a69.
Pick-to: 6.1 6.0
Fixes: QTBUG-93079
Task-number: QTBUG-85136
Change-Id: I12ec25b17d64c00be2a3904b7c4a975b781500a0
Reviewed-by: Alexandru Croitor <alexandru.croitor@qt.io>
Other manuals have a 'Getting started' section too. Better to qualify
it further, so that searching in the Index of Qt Creator Help mode or
Qt Assistant allows to differentiate between the different products.
Pick-to: 6.1
Change-Id: I7cfdba3c3567bdf49d3fe34307576f88c9f20126
Reviewed-by: Paul Wicking <paul.wicking@qt.io>
This fixes build errors with Xcode 10.
Xcode 10 build system (a.k.a "New Build System") needs to know the input files
in order to build a correct dependency graph. Especially when a build is not run
for the first time and files changed in-between.
Task-number: QTBUG-71035
Pick-to: 6.0 6.1 5.15 5.12
Change-Id: If8fbad3a1915add9b35c79131b03cdbe6b7ac06d
Reviewed-by: Tor Arne Vestbø <tor.arne.vestbo@qt.io>
This fixes build error with XCode 10.
XCode 10 build system (a.k.a "New Build System") requires all the files
that are generated by scripts and used later on build to be explicitly
defined as output files.
Task-number: QTBUG-71035
Pick-to: 6.0 6.1 5.15 5.12
Change-Id: Ibec39eee53b0cb3acecf592f1ca53c04b9975cad
Reviewed-by: Tor Arne Vestbø <tor.arne.vestbo@qt.io>
Add the option argument INSTALL_VERSIONED_LINK to qt_internal_add_tool
and qt_internal_add_app. For tools/apps with this argument we create an
install rule that creates a versioned hard link. For example, for
bin/qmake we create bin/qmake6.
Note that this only applies to prefix builds.
Apply this argument to qmake.
The qt_internal_add_app change is necessary for qtdiag and in qttools.
Task-number: QTBUG-89170
Change-Id: Id32d6055544c475166f4d854aaeb6292fbb5fbb5
Reviewed-by: Alexandru Croitor <alexandru.croitor@qt.io>
(cherry picked from commit c19d957f45fa27f61b5ecc566f8dbc19f12a44c3)
Fix the C4715 warning for 'hostToTargetPathEnum' by marking the qFatal()
branch as unreachable.
Change-Id: Id065daaffd865e85985b1a8e0ac2eba4a2ff0b1c
Reviewed-by: Alexandru Croitor <alexandru.croitor@qt.io>
Exporting QLibraryInfo internals allows to reuse settings in
qmake/qtpath without having to keep its own instance.
Also there is no need to check setting groups in QLibraryInfo
except the 'Paths' group, since this logic belongs to qmake/qtpaths
only.
Change-Id: If762defba025ad7f7489f8a86ef5768a8628bd2f
Reviewed-by: Alexandru Croitor <alexandru.croitor@qt.io>
Add the ability to select a standard and json output formats of
the Qt properties. This patch also improves the encapsulation of
QMakeProperty.
Change-Id: Ib1d232be1b430ed8456ce65cc98141282e4c3f7f
Reviewed-by: Alexandru Croitor <alexandru.croitor@qt.io>
Some qmake sources could be reused by other tools. It makes sense to
move such sources to the object library, to avoid additional compilation
steps and to simplify the reuse of sources.
Change-Id: I9d7bb7624019149d34d29e4b269b4f26b8aec7a4
Reviewed-by: Alexandru Croitor <alexandru.croitor@qt.io>
Now that we're not actually using qmakeconfig.cpp anymore, we can remove
it together with all qmake-related information that was written into
qconfig.cpp.
This also moves the qtConfEntries array back to qlibraryinfo.cpp.
Change-Id: I5e57d8c55613332cc3e57b11df4398d46aed259b
Reviewed-by: Alexey Edelev <alexey.edelev@qt.io>
Reviewed-by: Alexandru Croitor <alexandru.croitor@qt.io>
Those have fixed values.
Change-Id: I7f1ba8036f43413d3c805f4b419ae79e037343fb
Reviewed-by: Alexey Edelev <alexey.edelev@qt.io>
Reviewed-by: Alexandru Croitor <alexandru.croitor@qt.io>
Now, that qmake depends on QtCore, we can just ask QLibraryInfo for the
prefix instead of calculating it from QT_CONFIGURE_RELATIVE_PREFIX_PATH.
Remove that define.
Change-Id: I14be298a9d08abf33299e4cdbac55e91af318397
Reviewed-by: Alexey Edelev <alexey.edelev@qt.io>
Reviewed-by: Alexandru Croitor <alexandru.croitor@qt.io>
This is not configurable and doesn't have to be in the generated
q[make]config.cpp files.
Change-Id: If294d735800a3b5c6b3e269abdd86df401cf4864
Reviewed-by: Alexey Edelev <alexey.edelev@qt.io>
Reviewed-by: Alexandru Croitor <alexandru.croitor@qt.io>
Add a conditional build of the qmake.
Task-number: QTBUG-89369
Change-Id: I8d7968ffb20ea31df2f85fff055e0d131ed06a36
Reviewed-by: Joerg Bornemann <joerg.bornemann@qt.io>
When packaging different Qt versions for Linux distributions (or any
distribution with a common bin dir), Qt tools cannot be installed to
/usr/bin, because the executable names of the different Qt versions
clash.
To solve this conflict, our recommendation is to install Qt's tools to
/usr/lib/qt6/bin and to create versioned symlinks to user-facing tools
in /usr/bin.
User-facing tools are tools that are supposed to be started manually by
the user. They are marked in Qt's build system. Distro package
maintainers can now configure with
-DCMAKE_INSTALL_PREFIX=/usr
-DINSTALL_BINDIR=/usr/lib/qt6/bin
-DINSTALL_PUBLICBINDIR=/usr/bin
and will find a file called user_facing_tool_links.txt in the build
directory after the cmake run. Nothing will be installed to
INSTALL_PUBLICBINDIR.
Each line of user_facing_tool_links.txt consists of the installation
path of a user-facing application followed by a space and the versioned
link name in INSTALL_PUBLICBINDIR.
Example content:
/usr/lib/qt6/bin/qmake /usr/bin/qmake6
To actually create the versioned symlinks, the content of this file can
be fed to ln like this:
xargs ln -s < build-dir/user_facing_tool_links.txt
Or the package maintainer may decide to do something completely
different as suits their needs.
This patch adds the USER_FACING argument to qt_internal_add_tool to mark
tools as user-facing. In addition, every Qt created by
qt_internal_add_app is treated as user-facing.
The only tool this patch marks as user-facing in qtbase is qmake.
Pick-to: 6.1
Fixes: QTBUG-89170
Change-Id: I52673b1c8d40f40f56a74203065553115e2c4de5
Reviewed-by: Kai Koehne <kai.koehne@qt.io>
Reviewed-by: Shawn Rutledge <shawn.rutledge@qt.io>
QMakeLibraryInfo uses external data to produce paths. This causes
issues when trying to use it out of the existing qmake environment.
Add data fields that contain the path to the binary that uses
QMakeLibraryInfo and manually specified qtconf.
Task-number: QTBUG-75870
Change-Id: Ic6fa274ede3a9287826ff66c79f155b10d0d455c
Reviewed-by: Joerg Bornemann <joerg.bornemann@qt.io>
Since the QT_CONFIGURE_HOSTBINDIR_TO_HOSTPREFIX_PATH and
QT_CONFIGURE_HOSTBINDIR_TO_EXTPREFIX_PATH definitions keep the same
value in modern CMake build, no need to have special handling in cases
where these values are used in qmake. Also it will be useful to
specify the relative path to the prefix directory from the directories
different of 'bin' when use QMakeLibraryInfo.
Task-number: QTBUG-75870
Change-Id: I5a777001eb334dcf05e22853a514d4257352d59b
Reviewed-by: Joerg Bornemann <joerg.bornemann@qt.io>
QT_CONFIGURE_CROSSBUILD is always '0', so it's not necessary to keep
conditional compilation in QMakeLibraryInfo.
Also the QT_CONFIGURE_SYSROOTIFY_PREFIX definition is never used
in the project.
Task-number: QTBUG-75870
Change-Id: I1fe42dce40fddc6a72254736883f93aa4727f6b3
Reviewed-by: Joerg Bornemann <joerg.bornemann@qt.io>
Move the qmake-specific logic of the QLibraryInfo class to
qmake internals. 'qconfig.cpp.in' now stores information about
the library info entries to keep them consistent between qmake
and the Core library. qmake requires specific features enabled
in the Core library, so building qmake will be skipped if the
features are not enabled.
All flags directly related to the qmake have been removed from
Core lib.
Remove all bootstrap related sections from qmake CMakeLists.txt
Task-number: QTBUG-89369
Change-Id: I26de157d3bfd4a5526699296e9d46e1c180b89ae
Reviewed-by: Edward Welbourne <edward.welbourne@qt.io>
Reviewed-by: Kai Koehne <kai.koehne@qt.io>
Since commit 4933a5f892, CONFIG contains C++17 by default.
Change-Id: I1033c256242c03d79a643c12a63d17eb9f4c705f
Reviewed-by: Edward Welbourne <edward.welbourne@qt.io>
This will be used to access host tools that are installed in
${prefix}/libexec instead of ${prefix}/bin.
Pick-to: 6.1
Change-Id: I36c4b5736330f8229d267a117c65d55cd5e12758
Reviewed-by: Kai Koehne <kai.koehne@qt.io>
Keep the c++2a feature, but make it an alias for compatibility
purposes.
Pick-to: 6.1
Change-Id: I6f153109be84659806f1b7a57a88a187875166d8
Reviewed-by: Joerg Bornemann <joerg.bornemann@qt.io>
Reviewed-by: Edward Welbourne <edward.welbourne@qt.io>
By default, qmake does not compile source files that are included in
other source files. The new CONFIG option compile_included_sources
disables this behavior.
Pick-to: 5.15
Fixes: QTBUG-90801
Change-Id: I60c997938895f3a743d32ea385efdbe6bcf315bb
Reviewed-by: Kai Koehne <kai.koehne@qt.io>
The "2" is meaningless. We retain the old name as alias for source
compatibility, but we don't document it anymore.
Task-number: QTBUG-85064
Change-Id: Id10d58f6d39a0faaec042304b374ae6b23469362
Reviewed-by: Joerg Bornemann <joerg.bornemann@qt.io>
Reviewed-by: Mitch Curtis <mitch.curtis@qt.io>
The QT_BUILD_QMAKE_BOOTSTRAP and QT_BUILD_QMAKE_LIBRARY definitions
are never defined in the project since migrating to CMake build.
Change-Id: I7108c92387005a2fde6ebdb2d74843e3efc6413e
Reviewed-by: Joerg Bornemann <joerg.bornemann@qt.io>
To enable the current Qt version to use a qt.conf that is independent
from the previous version, a file named 'qt<major-version>.conf' is
searched for first. If this file does not exist, a file with the
name 'qt.conf' is searched for.
Task-number: QTBUG-88635
Change-Id: If75b63f72a7bdbdf1de7729ea4ecb00810b58d12
Reviewed-by: Oswald Buddenhagen <oswald.buddenhagen@gmx.de>
Those serve no purpose anymore, now that the .pro files are gone.
Task-number: QTBUG-88742
Change-Id: I39943327b8c9871785b58e9973e4e7602371793e
Reviewed-by: Cristian Adam <cristian.adam@qt.io>
Reviewed-by: Edward Welbourne <edward.welbourne@qt.io>
Reviewed-by: Kai Koehne <kai.koehne@qt.io>