Commit Graph

2135 Commits

Author SHA1 Message Date
Assam Boudjelthia
b74f180ac0 Android: bump Android target API level to 33
To follow latest Play Store requirement.

Pick-to: 6.6.0 6.6 6.5
Fixes: QTBUG-112637
Change-Id: I1ef4f8b639f4b0cc759a2363b7b9b9864b159509
Reviewed-by: Ville Voutilainen <ville.voutilainen@qt.io>
2023-09-23 17:38:23 +00:00
Joerg Bornemann
bfca8c6d24 Doc: Document TR_EXCLUDE
Pick-to: 6.5 6.6
Change-Id: Ib2e06e46f44564a2c7581ff4d7f3d8a29d2756c9
Reviewed-by: Edward Welbourne <edward.welbourne@qt.io>
Reviewed-by: Kai Köhne <kai.koehne@qt.io>
2023-08-25 17:56:28 +02:00
Safiyyah Moosa
c3470b2087 Doc: Add proj folders to antivirus exception list
Add a note to state that Qt projects and user project build folders
should be added to the antivirus exception list.

Task-number: QTBUG-114928
Pick-to: 6.5 6.6
Change-Id: I4873dc75506d55a9e6c2a2614eb8f05c14f37142
Reviewed-by: Topi Reiniö <topi.reinio@qt.io>
2023-08-17 13:44:53 +02:00
Bernhard M. Wiedemann
297fe90329 Allow to override build date with SOURCE_DATE_EPOCH
[ChangeLog][qmake] Allows to override _DATE_ with SOURCE_DATE_EPOCH
to make builds reproducible.

See https://reproducible-builds.org/ for why this is good
and https://reproducible-builds.org/specs/source-date-epoch/
for the definition of this variable.

Fixes: QTBUG-115737
Change-Id: I1964aa0a3d849628440618aa6f0a51af2017d824
Reviewed-by: Alexey Edelev <alexey.edelev@qt.io>
Reviewed-by: Alexandru Croitor <alexandru.croitor@qt.io>
Reviewed-by: Joerg Bornemann <joerg.bornemann@qt.io>
2023-08-09 10:02:06 +02:00
Giuseppe D'Angelo
04f2acf93a qtpaths: generate proper JSON
The "manual" generation left a trailing comma in the object definition.
This is illegal, as per RFC 8259:

      object = begin-object [ member *( value-separator member ) ]
               end-object

Hence, the resulting JSON does not get accepted by any parser.

Let's just not do that and use QJsonDocument.

Change-Id: I882486e55f66c52d142638f37584088091bbc123
Pick-to: 6.2 6.5 6.6
Fixes: QTBUG-115124
Reviewed-by: Alexandru Croitor <alexandru.croitor@qt.io>
Reviewed-by: Alexey Edelev <alexey.edelev@qt.io>
2023-07-08 10:50:41 +02:00
Joerg Bornemann
d10316d5f5 Doc: Document QMAKE_APPLE_DEVICE_ARCHS
Pick-to: 5.15 6.5 6.6
Fixes: QTBUG-114847
Change-Id: I8211025d470cf2ef1d1755a5a18195f318661e69
Reviewed-by: Tor Arne Vestbø <tor.arne.vestbo@qt.io>
2023-06-27 18:36:06 +02:00
Topi Reinio
43ea57b901 Use a global value for warning limit when testing documentation in CI
The most common limit for the maximum number of allowed documentation
warnings is zero. Use a global value for 'warninglimit', adopted by
all Qt module documentation projects that include the configuration
from qtbase/doc/global.

This allows for a temporary increase of the limit across all modules as
needed - for example, when updating the QDoc binary that the CI
provisions to a version that introduces new types of documentation
warnings.

Increase this base limit temporarily to 10 to help re-enable
documentation testing in CI as it's currently disabled.

Task-number: QTBUG-113326
Change-Id: I8b66951ca9324bcfaec3b5a7ec2cff544c62feb0
Reviewed-by: Paul Wicking <paul.wicking@qt.io>
2023-06-27 15:12:31 +00:00
Topi Reinio
4aac1ca91f Doc: Remove \target commands from the qmake manual
A \target defines a global doc linking target across all Qt modules,
and they may interfere with link targets local to module documentation.

As we no longer link as heavily to qmake manual after moving to CMake,
remove the \target commands. The section titles remain as valid link
targets; arguably, duplicating a \section1 title with an identical
\target name was unnecessary in any case.

Replace all \l command arguments that used the \target for linking
with the actual section title.

Pick-to: 6.6 6.5
Fixes: QTBUG-114073
Change-Id: I6e595a77268cbd6ddb5d004501bc6df178c3883d
Reviewed-by: Andreas Eliasson <andreas.eliasson@qt.io>
Reviewed-by: Paul Wicking <paul.wicking@qt.io>
Reviewed-by: Joerg Bornemann <joerg.bornemann@qt.io>
2023-06-21 13:19:51 +00:00
Yuhang Zhao
71c9b9f05b Re-fix QtLibraryInfo compilation issues
After the "CMake: make compile options consistent for Qt created libraries"
revert, this part of the code also get reverted, however, it's not
related to the revert reason: the user project's deprecation behavior
is changed. So restore this code. We need this code to make sure
we use the same parameters when compiling QtLibraryInfo, otherwise
some compilers may complain about it, such as clang-cl.

Pick-to: 6.6 6.5
Change-Id: Ie50d4f820be3a2e950dd87902d794f1d2681b7a5
Reviewed-by: Alexey Edelev <alexey.edelev@qt.io>
2023-06-09 14:45:14 +00:00
Alexandru Croitor
e3c6754760 Revert "CMake: make compile options consistent for Qt created libraries"
This reverts commit 389507a047.

Reason for revert: The original patch unintentionally changes
the deprecation warning behavior for user projects. Merging
the current change will resurface the original static qt build
bug until a new fix is developed.

Pick-to: 6.6
Change-Id: I29b41b43fdd76b19bc46439470e04443dc2b8ddb
Reviewed-by: Alexey Edelev <alexey.edelev@qt.io>
Reviewed-by: Yuhang Zhao <yuhangzhao@deepin.org>
2023-06-08 11:04:45 +00:00
Amir Masoud Abdol
41b32cd2c4 Add TRY_RUN to host tools
On Windows, we will try to run our host tools after a successful build.
If the build fails because of a missing DLL, we will be able to throw an
error with some direction on what might be the cause, and how to resolve
it.

Pick-to: 6.5 6.6
Fixes: QTBUG-113273
Change-Id: Iba548829bc41fbee95cef288faaf7edca118ee33
Reviewed-by: Alexandru Croitor <alexandru.croitor@qt.io>
2023-06-08 05:09:00 +00:00
Yuhang Zhao
389507a047 CMake: make compile options consistent for Qt created libraries
Currently some libraries created by Qt are lacking some compile
definitions and compile options, and this issue is causing us
troubles when building Qt statically. This patch tries to reduce
the parameter difference when compiling Qt's own libraries.

Change-Id: I3842943a874fab32ef90980e8aa29f5beb01feeb
Reviewed-by: Alexey Edelev <alexey.edelev@qt.io>
2023-05-31 01:08:45 +00:00
Yuhang Zhao
14458cc59b QMake: fix build with clang-cl
We need to enable or disabled exception handling for this library explicitly when using clang-cl, otherwise clang-cl will throw an error and stop compiling.

Pick-to: 6.5
Change-Id: I2b2a9e5eb009cb8ce264f2de58f8bb4fdb2339c1
Reviewed-by: Joerg Bornemann <joerg.bornemann@qt.io>
2023-05-03 07:48:08 +00:00
Tor Arne Vestbø
f2b59f3138 qmake: Don't add dummy empty.lproj localization to macOS bundles
The original change from 2008 mentions that this was needed for
preventing a crash when searching the native file dialog, but
this has since been fixed.

Nor is the file needed to get localized native file dialogs,
as this is controlled by the combination of the app's supported
localization or CFBundleAllowMixedLocalizations.

And we don't do this for CMake projects.

Pick-to: 6.5
Change-Id: I3c9e5aee4707c019f733920eb088f8d84f8e4ee1
Reviewed-by: Alexandru Croitor <alexandru.croitor@qt.io>
2023-04-20 20:11:02 +02:00
Joerg Bornemann
0aa9b08536 qmake: Fix infinite make loop if RESOURCES contains nonexistent .qrc
If RESOURCES contained a non-existent .qrc file, qmake produced
Makefiles that resulted in an infinite loop when running GNU Make.

Introduce a new extra compiler CONFIG value "remove_no_exist" that
removes non-existent extra compiler input. This value is now used in the
extra compiler that handles the RESOURCES variable.

The difference to the existing CONFIG value "ignore_no_exist" is that
qmake still prints a warning about the non-existent file.

Pick-to: 6.5
Fixes: QTBUG-112743
Change-Id: I3293af75b75f217e1a1738b49da0af1117cfdecb
Reviewed-by: Alexandru Croitor <alexandru.croitor@qt.io>
2023-04-17 23:32:34 +02:00
Alexey Edelev
4fb7eebc70 Rid of 'special case' markers
It's unlikely we will ever use pro2cmake at this project stage,
so it doesn't make any sense to keep the 'special case' markers
in the CMake scripts. Remove them and replace with TODO where
needed.

Change-Id: I84290c20679dabbfdec3c5937ce0428fecb3e5a7
Reviewed-by: Amir Masoud Abdol <amir.abdol@qt.io>
Reviewed-by: Alexandru Croitor <alexandru.croitor@qt.io>
2023-04-13 18:30:58 +02:00
Alexandru Croitor
f00280337b qmake: Fix incorrect Info.plist replacement of EXECUTABLE_NAME
The app_bundle_name should be used if it's not empty.
Previously it was only used if it was empty.

Amends 0749ba2c5e

Pick-to: 6.5
Fixes: QTBUG-112668
Change-Id: I4a0e8286eabb5156ad62b448afdf7f54cc78a915
Reviewed-by: Alexey Edelev <alexey.edelev@qt.io>
Reviewed-by: Amir Masoud Abdol <amir.abdol@qt.io>
2023-04-06 20:39:53 +02:00
Alexandru Croitor
b2e586cf15 qmake: Clarify documentation on how to modify QMAKE_BUNDLE
The value is auto-computed from other variables and should not be set
directly by the project code.

Pick-to: 6.5
Fixes: QTBUG-112667
Change-Id: I6132b98f3a1ac0f9d721f390a065f6fa22db2bf6
Reviewed-by: Leena Miettinen <riitta-leena.miettinen@qt.io>
Reviewed-by: Alexey Edelev <alexey.edelev@qt.io>
2023-04-06 20:39:53 +02:00
Amir Masoud Abdol
75ea098a16 Use NO_UNITY_BUILD instead of directly setting the property
Pick-to: 6.5
Change-Id: I4f39f7c306cddb3fe6797ac4aa3c3c08d573962c
Reviewed-by: Alexandru Croitor <alexandru.croitor@qt.io>
2023-04-06 20:39:53 +02:00
Amir Masoud Abdol
b408bae864 Remove unused code in qmake, triggering -Wunused-but-set-variable
This seems to be a leftover from a refactoring done a few years ago.

Pick-to: 6.5
Change-Id: I2bd2700aca3a5a6104886eaa0957226786ad615a
Reviewed-by: Alexandru Croitor <alexandru.croitor@qt.io>
2023-04-05 19:36:55 +02:00
Fabio Falsini
dffc67e6f2 Change android target SDK version to 31
Play Store now accept only app with target
SDK version set to 31 or above

Change-Id: I7f7fb677798c3f2d3ce327226ac13a69f0bab442
Reviewed-by: BogDan Vatra <bogdan@kdab.com>
2023-03-21 14:49:08 +01:00
Ivan Solovev
eaae969ac6 Propagate QT_DISABLE_DEPRECATED_UP_TO to QtLibraryInfo library
This helps to fix the static build, which was previously failing with
QT_DISABLE_DEPRECATED_UP_TO, because it was the only library that
did not see the definition.

Fixes: QTBUG-111884
Pick-to: 6.5 6.5.0 6.4
Change-Id: I9324019bc8cbb7ba7a87dd348ea60e25cb681005
Reviewed-by: Alexandru Croitor <alexandru.croitor@qt.io>
Reviewed-by: Marc Mutz <marc.mutz@qt.io>
2023-03-13 22:12:38 +01:00
Friedemann Kleint
64dc6fe87d Add some exclusions for CMake Unity (Jumbo) builds
Add exclusions for issues that are likely not fixable
(3rd party code, X11 define clashes, etc) in 3rd party,
tools and plugins.

Pick-to: 6.5
Task-number: QTBUG-109394
Done-with: Amir Masoud Abdol <amir.abdol@qt.io>
Change-Id: I698c004201a76a48389271c130e44fba20f5adf7
Reviewed-by: Joerg Bornemann <joerg.bornemann@qt.io>
Reviewed-by: Qt CI Bot <qt_ci_bot@qt-project.org>
2023-02-16 16:03:06 +01:00
Joerg Bornemann
98a3634299 Make qmake and qtpaths report Qt version baked into the binaries
QMake and qtpaths used qVersion() to report Qt's version number. This is
problematic if those tools are run in an environment where a different
Qt version is loaded (e.g. by setting LD_LIBRARY_PATH).

This reverts commit a783c3d574, which
changed the use of the QT_VERSION define to a qVersion() call in qmake.
Additionally, we use QT_VERSION in qtpaths too for consistency.

Pick-to: 6.5
Change-Id: I6c8a1aa6ee6169becd7c685a98ce23c22c3864c7
Reviewed-by: hjk <hjk@qt.io>
Reviewed-by: Alexandru Croitor <alexandru.croitor@qt.io>
2023-01-18 13:21:05 +01:00
Alexey Edelev
0e3ef41112 Set GenerateDebugInformation to true in vcproj if at least /DEBUG is set
If the command line option contains /DEBUG without the following
argument, GenerateDebugInformation remained 'false' because the
DebugInfoOption contained the initial value.

Set GenerateDebugInformation to 'true' if the /DEBUG option is found and
reset to 'false' only if option is set to 'none'.

Amends commit 6a6b27940d.

Pick-to: 6.2 6.4 6.5 5.15
Fixes: QTBUG-110068
Change-Id: I792d7335d8b9536d4beed54cabfd70dcf54f09ac
Reviewed-by: Alexey Edelev <alexey.edelev@qt.io>
Reviewed-by: Jörg Bornemann <joerg.bornemann@qt.io>
2023-01-13 14:29:37 +01:00
Alexandru Croitor
5fe52a0420 qmake: Document that QMAKE_PRE_LINK does not work with Xcode
When generating an Xcode project using qmake that's targeting the new
Xcode build system, QMAKE_PRE_LINK does not work properly.
It generates rules that conflict with the default linker rules.
This is a limitation of the new Xcode build system which does not have
any known workaround.

Document the limitation.

Pick-to: 5.15 6.2 6.4 6.5
Fixes: QTBUG-99601
Change-Id: Ie4e6bcb0603ced85f786e9f7f407172e84a00d83
Reviewed-by: Jörg Bornemann <joerg.bornemann@qt.io>
2022-12-15 20:23:28 +01:00
Marc Mutz
885aba7ffd Use qtversion.h instead of qlibraryinfo.h
... where 50b05e3e2a originally added
them.

While qtversion.h is included in qglobal.h, using qtversion.h directly
is a tiny step towards removing qglobal.h includes from our code-base,
so don't let this opportunity go to waste.

Change-Id: I28eaca1f4e250fc9e12e2ce6a6f94670a1d08dbe
Reviewed-by: Ivan Solovev <ivan.solovev@qt.io>
2022-12-09 07:21:22 +01:00
Yuhang Zhao
bd7fa4a537 Windows: centralize how we handle error messages
Currently QtBase contains multiple implementation of how to get the Win32
and COM error messages, and they are almost exactly the same, what's worse,
Qt already has a private QSystemError class to do such things, so we are
re-inventing the wheel in many places. This patch removes all other custom
error message implementations besides the QSystemError one. And since there
are a lot of places need the COM error message, move the implementation to
QSystemError so that it can handle both Win32 error and COM error.

Since I'm touching these lines anyway, break them into short lines if they
are above the length limit.

Change-Id: I1067c874011800303f0f114b5cb8830ac6810fc0
Reviewed-by: Mårten Nordheim <marten.nordheim@qt.io>
2022-11-16 19:44:43 +08:00
Marc Mutz
1c6bf3e09e Port from container::count() and length() to size() - V5
This is a semantic patch using ClangTidyTransformator as in
qtbase/df9d882d41b741fef7c5beeddb0abe9d904443d8, but extended to
handle typedefs and accesses through pointers, too:

    const std::string o = "object";

    auto hasTypeIgnoringPointer = [](auto type) { return anyOf(hasType(type), hasType(pointsTo(type))); };

    auto derivedFromAnyOfClasses = [&](ArrayRef<StringRef> classes) {
        auto exprOfDeclaredType = [&](auto decl) {
            return expr(hasTypeIgnoringPointer(hasUnqualifiedDesugaredType(recordType(hasDeclaration(decl))))).bind(o);
        };
        return exprOfDeclaredType(cxxRecordDecl(isSameOrDerivedFrom(hasAnyName(classes))));
    };

    auto renameMethod = [&] (ArrayRef<StringRef> classes,
                            StringRef from, StringRef to) {
        return makeRule(cxxMemberCallExpr(on(derivedFromAnyOfClasses(classes)),
                            callee(cxxMethodDecl(hasName(from), parameterCountIs(0)))),
                        changeTo(cat(access(o, cat(to)), "()")),
                        cat("use '", to, "' instead of '", from, "'"));
    };

    renameMethod(<classes>, "count", "size");
    renameMethod(<classes>, "length", "size");

except that the on() matcher has been replaced by one that doesn't
ignoreParens().

a.k.a qt-port-to-std-compatible-api V5 with config Scope: 'Container'.

Added two NOLINTNEXTLINEs in tst_qbitarray and tst_qcontiguouscache,
to avoid porting calls that explicitly test count().

Change-Id: Icfb8808c2ff4a30187e9935a51cad26987451c22
Reviewed-by: Ivan Solovev <ivan.solovev@qt.io>
Reviewed-by: Qt CI Bot <qt_ci_bot@qt-project.org>
2022-11-03 14:59:24 +01:00
Maximilian Blochberger
bbad6440ae Ensure proper format of Info.plist
The Information Property List (Info.plist) is a property list that
contains information about macOS and iOS application and framework
bundles. There are multiple supported formats, those property lists can
be stored in, most notably XML and binary.

Problem
If the Info.plist file is edited with an external editor, such as Xcode,
it is possible that it is stored in binary format. A Makefile generated
by the qmake tool contains a call to sed, which works on text but not
binary files. Consequently, this call would fail.

Solution
Since Mac OS X 10.2, the plutil tool is available. It can be used to
convert the property lists into a specific format. The plutil tool is
now used to convert the plist to XML, so that the sed invocation
succeeds.

[ChangeLog][qmake] Fixed handling binary Info.plist files in generated
Makefiles by always converting them to XML before substituting
placeholders.

Fixes: QTBUG-45357
Change-Id: I066039301c391a5034710458500a096f09e5ca24
Pick-to: 6.2 6.4
Reviewed-by: Jörg Bornemann <joerg.bornemann@qt.io>
Reviewed-by: Tor Arne Vestbø <tor.arne.vestbo@qt.io>
2022-10-19 12:06:09 +02:00
Marc Mutz
aa37e67ef7 Port from qAsConst() to std::as_const()
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>
2022-10-11 23:17:18 +02:00
Marc Mutz
df9d882d41 Port from container.count()/length() to size()
This is semantic patch using ClangTidyTransformator:

  auto QtContainerClass = expr(hasType(namedDecl(hasAnyName(<classes>)))).bind(o)
  makeRule(cxxMemberCallExpr(on(QtContainerClass),
                             callee(cxxMethodDecl(hasAnyName({"count", "length"),
                                                  parameterCountIs(0))))),
           changeTo(cat(access(o, cat("size"), "()"))),
           cat("use 'size()' instead of 'count()/length()'"))

a.k.a qt-port-to-std-compatible-api with config Scope: 'Container'.

<classes> are:

    // sequential:
    "QByteArray",
    "QList",
    "QQueue",
    "QStack",
    "QString",
    "QVarLengthArray",
    "QVector",
    // associative:
    "QHash",
    "QMultiHash",
    "QMap",
    "QMultiMap",
    "QSet",
    // Qt has no QMultiSet

Change-Id: Ibe8837be96e8d30d1846881ecd65180c1bc459af
Reviewed-by: Qt CI Bot <qt_ci_bot@qt-project.org>
Reviewed-by: Volker Hilsheimer <volker.hilsheimer@qt.io>
2022-10-04 07:40:08 +02:00
Alexey Edelev
b89d63515b Replace the syncqt.pl script with syncqt tool
syncqt.pl adds an extra dependency on perl when building Qt. Modern C++
provides the convenient cross-platform way to access a filesystem and
to use regular expressions, so we may replace the perl script with C++
application. The syncqt executable is built at configure time and
installed as QtCore tool. It's running at configure time to deliver the
required header files for IDE to build a consistent code model and at
the build time to keep tracking changes in header files and generate
the missing aliases without reconfiguring. 'syncqt' only parses header
files from a CMake build tree, so the resulting Qt installation only
contains interfacing headers that belong to the platform that Qt is
built for. 'sync.profile' files are not used as the 'source of truth'
for sync qt procedure anymore, all the necessary information is taken
from either CMake files at configure time or from the module header
files while parsing them.

syncqt.pl is still in place since it's required as fallback solution
for a smooth transition to the new syncqt implementation for all qt
repositories.

This patchset only enables the C++ based syncqt for 'qtbase'
repository.

From the performance perspective C++ version works faster then perl
script, also the configure time is reduced significally on subsequent
reconfigurations - up x2 times faster when re-configuring repository,
but it also takes time to compile the tool itself the first time.
Numbers for qtbase:
           syncqt.pl  syncqt.cpp
 initial:  0m16,035s  0m20,413s
 reconfig: 0m6,819s   0m3,725s

The syncing procedure can be run separately for each module using
<ModuleName>_sync_headers targets. The 'sync_headers' target can be
used to sync all the modules at once.

Task-number: QTBUG-87480
Task-number: QTBUG-103196
Change-Id: I8c938bcaf88a8713b39bbfd66d9e7ef12b2c3523
Reviewed-by: Alexandru Croitor <alexandru.croitor@qt.io>
2022-09-27 13:12:11 +02:00
Sona Kurazyan
50b05e3e2a Move qVersion() from qglobal.h to qlibraryinfo.h
Since qVersion() might be called also from C code, disable the parts of
qlibraryinfo.h that are relevant only for C++ code if __cplusplus is not
defined.

[ChangeLog][Potentially Source-Incompatible Changes] qVersion() is
moved from qglobal.h to qlibraryinfo.h, '#include <QtCore/QLibraryInfo>'
needs to be added where it's used.

Task-number: QTBUG-99313
Change-Id: I3363ef3fa4073114e5151cb3a2a1e8282ad42a4d
Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
Reviewed-by: Edward Welbourne <edward.welbourne@qt.io>
2022-09-01 13:26:30 +02:00
Ivan Solovev
35a50491e7 QtBase tools: port away from deprecated qSetGlobalQHashSeed(0)
Use QHashSeed::setDeterministicGlobalSeed() instead

Task-number: QTBUG-105102
Change-Id: Ib7d4b6e7bca89870913a140d68bbdd6018e8f8ed
Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
Reviewed-by: Giuseppe D'Angelo <giuseppe.dangelo@kdab.com>
2022-08-30 22:46:34 +02:00
Lucie Gérard
32df595275 Change the license of all CMakeLists.txt and *.cmake files to BSD
Task-number: QTBUG-105718
Change-Id: I5d3ef70a31235868b9be6cb479b7621bf2a8ba39
Reviewed-by: Qt CI Bot <qt_ci_bot@qt-project.org>
Reviewed-by: Jörg Bornemann <joerg.bornemann@qt.io>
2022-08-23 23:58:42 +02:00
Ivan Solovev
3226c82740 Rename QT_DISABLE_DEPRECATED_BEFORE -> QT_DISABLE_DEPRECATED_UP_TO
The new name describes the behavior in a better way.

[ChangeLog][Build System] The QT_DISABLE_DEPRECATED_BEFORE macro is
renamed to QT_DISABLE_DEPRECATED_UP_TO. The old name is deprecated, but
is still recognized if it is defined during configuration and the new
name is not defined.

Task-number: QTBUG-104944
Change-Id: Ifc34323e0bbd9e3dc2f86c3e80d4d0940ebccbb8
Reviewed-by: Alexandru Croitor <alexandru.croitor@qt.io>
Reviewed-by: Edward Welbourne <edward.welbourne@qt.io>
2022-08-19 23:52:05 +02:00
Lucie Gérard
fb1b20eab3 Add license headers to cmake files
CMakeLists.txt and .cmake files of significant size
(more than 2 lines according to our check in tst_license.pl)
now have the copyright and license header.

Existing copyright statements remain intact

Task-number: QTBUG-88621
Change-Id: I3b98cdc55ead806ec81ce09af9271f9b95af97fa
Reviewed-by: Jörg Bornemann <joerg.bornemann@qt.io>
2022-08-03 17:14:55 +02:00
Joerg Bornemann
c155734bfc Doc: Clarify qmake's c++latest CONFIG value
Fixes: QTBUG-104631
Change-Id: I1d2b7de0f76de9c6ba4b7e47de7e777fedc7bd30
Reviewed-by: Alexandru Croitor <alexandru.croitor@qt.io>
Reviewed-by: Kai Koehne <kai.koehne@qt.io>
2022-06-29 18:32:05 +02:00
Andreas Eliasson
e8a782fb2c Doc: Document QML_IMPORTS_PATH and QMLPATHS
Fixes: QTBUG-101615
Pick-to: 6.4 6.3 6.2 5.15
Change-Id: I0c83f36db4e4731095610683c4a722438f9b804e
Reviewed-by: Topi Reiniö <topi.reinio@qt.io>
2022-06-27 12:02:47 +00:00
Joerg Bornemann
073214fdf9 qmake/msbuild: Turn off "use full paths in diagnostics" by default
The default setting for "Full Path of Source Code File in Diagnostics"
changed with VS 2017: it's now turned on by default.  It can also be
enabled with the compiler flag /FC, but there is no flag for turning it
off.

Users might want to disable /FC to obtain reproducable binaries.

Change qmake's default from "use Visual Studio's default" to "off" for
this feature.  Users can enable it manually by putting the following
into their project files:

    QMAKE_CXXFLAGS += /FC

CMake faced the same problem.  See CMake upstream issue #18261 for
comparison.

Pick-to: 5.15 6.2 6.3 6.4
Task-number: QTBUG-104450
Change-Id: Ibe636a0ac5d18aefb44f2b7179b59fcec2ad8353
Reviewed-by: Alexandru Croitor <alexandru.croitor@qt.io>
2022-06-22 16:05:07 +02:00
Joerg Bornemann
6a6b27940d qmake/msbuild: Support all /DEBUG:xxx linker options
/DEBUG:OFF now turns debug info generation off.
/DEBUG:FULL maps to DebugFull.
Unknown /DEBUG:xxx options are added to AdditionalOptions.

Pick-to: 5.15 6.2 6.3 6.4
Task-number: QTBUG-104450
Change-Id: Ibd072145e51551b29370e809b880c0d7f1a00c03
Reviewed-by: Alexandru Croitor <alexandru.croitor@qt.io>
2022-06-22 16:05:07 +02:00
Joerg Bornemann
566ede6ee1 qmake/msbuild: Support all /LTCG:xxx options
/LTCG:OFF now turns off LTCG.
/LTCG:INCREMENTAL maps to UseFastLinkTimeCodeGeneration.
Unknown /LTCG:xxx values are passed to AdditionalOptions.

Pick-to: 5.15 6.2 6.3 6.4
Task-number: QTBUG-104450
Change-Id: If85942dbeec204dc2571a861a43201cb3d5993ae
Reviewed-by: Alexandru Croitor <alexandru.croitor@qt.io>
2022-06-22 16:05:07 +02:00
Edward Welbourne
cfcbf38f76 Teach qmake about digit-grouping apostrophes in numeric literals
It was previously understanding them as character literal delimiters,
with unfortunate consequences if a numeric literal contained an odd
number of them. Recognize that an apostrophe with a digit on each side
of it isn't the opening quote of a character literal (unless the digit
before it is preceded by a u). Extend the findMocs test to trigger the
bug, prior to the fix; verified it passes with the fix.

Fixes: QTBUG-98845
Change-Id: I5db3ac59aaeade7c2d6c1fb680ba97261ec0e8a9
Reviewed-by: Jörg Bornemann <joerg.bornemann@qt.io>
2022-06-17 00:05:53 +02:00
Alexandru Croitor
94207621ee qmake: Document Xcode behavior when bundling translation files
Xcode's legacy and new build system modes have different behavior
in how they bundle resource paths that start with lang_code.lproj.

Document how to bundle translation files for both legacy
and new build systems.

Pick-to: 5.15 6.2 6.3 6.4
Fixes: QTBUG-98417
Change-Id: I857ec76577f8244a751d4bf38fbe305fef614734
Reviewed-by: Alexey Edelev <alexey.edelev@qt.io>
Reviewed-by: Jörg Bornemann <joerg.bornemann@qt.io>
Reviewed-by: Kai Koehne <kai.koehne@qt.io>
2022-06-14 15:45:06 +02:00
Lucie Gérard
05fc3aef53 Use SPDX license identifiers
Replace the current license disclaimer in files by
a SPDX-License-Identifier.
Files that have to be modified by hand are modified.
License files are organized under LICENSES directory.

Task-number: QTBUG-67283
Change-Id: Id880c92784c40f3bbde861c0d93f58151c18b9f1
Reviewed-by: Qt CI Bot <qt_ci_bot@qt-project.org>
Reviewed-by: Lars Knoll <lars.knoll@qt.io>
Reviewed-by: Jörg Bornemann <joerg.bornemann@qt.io>
2022-05-16 16:37:38 +02:00
Kai Köhne
01b50bfcda qdoc: Remove dependencies to non-existing help modules
Pick-to: 6.2 6.3
Change-Id: I953b714db27dc8bd9ecc1f65bbfd3e02d6068785
Reviewed-by: Nicholas Bennett <nicholas.bennett@qt.io>
2022-05-10 11:51:11 +02:00
Joerg Bornemann
fc16855eaa Fix qmake/qtpaths -query for static relocatable builds
The install prefix was determined incorrectly for static relocatable
builds.  The reason was that for those builds, QLibraryInfo::path()
returns the application directory, which is <prefix>/bin for qmake and
qtpaths.

Fix this by removing the bin directory part from the installation prefix
that QLibraryInfo returns if qmake/qtpaths are used.

Fixes: QTBUG-102877
Change-Id: I2e9ff96ded0ee2a7802b265741a3cfbe2bf0a4ba
Reviewed-by: Alexandru Croitor <alexandru.croitor@qt.io>
Reviewed-by: Qt CI Bot <qt_ci_bot@qt-project.org>
2022-05-09 08:32:04 +02:00
Alexandru Croitor
a783c3d574 qmake: Use qVersion for version reporting instead of QT_VERSION_STR
Apart from being consistent with qtpaths (which uses qVersion()),
this also ensures that Qt Creator loads correct debug helpers for types
like QString when debugging qmake.

As a drive by, remove all QT_VERSION_MAJOR, QT_VERSION_MINOR,
QT_VERSION_PATCH defines which are not used anywhere.

Change-Id: Ibc8f2a6af833e1ec6e6cd6e1937ac3c1ab328555
Reviewed-by: Qt CI Bot <qt_ci_bot@qt-project.org>
Reviewed-by: Jörg Bornemann <joerg.bornemann@qt.io>
2022-05-06 12:51:12 +02:00
Sona Kurazyan
908e85cc85 Replace uses of _qs with _s in sources and examples
Task-number: QTBUG-101408
Change-Id: I48360ba3b23965cd3d90ac243c100a0656a4cde8
Reviewed-by: Marc Mutz <marc.mutz@qt.io>
2022-04-19 19:12:20 +02:00