2163 Commits

Author SHA1 Message Date
Marc Mutz
563ed822f8 QString: toward UTF-8 arg() support [3½/4]: port unary arg() to QAnyStringView
Before porting multi-arg() to QAnyStringView, first port the unary
arg() overloads for symmetry reasons (unlike the views, multi-arg() on
QString is only considered for more than one argument().

This causes tension with the other arg() overloads, so finally make
the overload set a sane one by using constrained templates instead of
overloaded regular functions. This also solves the following problems:

- that char16_t and char8_t didn't match the char-ish overloads, but
  the integer-ish ones,

- that arg('a') matched the char overload (and therefore printed a
  character 'a') while arg('a', 2, 16) was ambiguous and arg('a', 2,
  16, QChar('0')) called the integral overload, printing the numeric
  value instead,

- that arg(qfloat16) was ambiguous when QFLOAT16_IS_NATIVE

- that using u' ' as `fillChar` sometimes caused ambiguities (and you
  had to use ' '_L1 instead).

Needed to explicitly exclude wchar_t from the is_string_like arg()
overload, to at least keep existing behavior and not make matters
worse by treating wchar_t as a string-like on Windows and as
integer-like on Unix :( We'll hopefully still fix QTBUG-126054 before
this is relased.

[ChangeLog][QtCore][Potentially Source-Incompatible Changes] The
QString::arg() overloads have been redesigned. Character-like types
(char, char16_t, char8_t, wchar_t (still subject to QTBUG-126054 at
the time of writing), char32_t) now always output the character, not
its numeric value. In particular, char16_t and char arguments now
match the string-ish arg() overload (and therefore don't provide a
`base` argument anymore. A backwards-compatible fix is to cast char,
char16_t, and wchar_t arguments to uint. This also fixes the ambiguity
errors you may have seen when using a char16_t as `fillChar`.

[ChangeLog][QtCore][QString] Unary arg() now accepts QAnyStringView
(incl. QUtf8StringView).

Fixes: QTBUG-125588
Fixes: QTBUG-126053
Fixes: QTBUG-126055
Task-number: QTBUG-126054
Change-Id: If0bfd92e15952738f3870a540f52a7cc470b047f
Reviewed-by: Ivan Solovev <ivan.solovev@qt.io>
2024-12-03 21:24:07 +01:00
Thiago Macieira
56fa23911c QFactoryLoader: fix the ability to load symlinks to plugins
Amends commit 7cf39bd785e8ba817960d48b120983cafcc539f3, which changed to
use QDirListing but used FilesOnly. As documented, that does not include
symlinks to files.

I'm updating a few other uses of FilesOnly where they were ported from
QDir::Files and it would be reasonable to expect that symlink to files
would be included. That's why I've left QNetworkDiskCache alone.

Fixes: QTBUG-130109
Pick-to: 6.8
Change-Id: I1fa195b42fd5e00be157fffd6c861f6ddb1eeed1
Reviewed-by: Ahmad Samir <a.samirh78@gmail.com>
2024-10-17 12:02:00 -07:00
Alexey Edelev
ed57f8ab6d Make per-repos WARNINGS_ARE_ERRORS work
Add the WARNINGS_ARE_ERRORS flags unconditionally, so developers may
control skipping per-target or per-repo.
This allows setting the WARNINGS_ARE_ERRORS cmake option for each repo
independently when configuring them. So qtbase might be built without
the flag enabled and setting the WARNINGS_ARE_ERRORS to TRUE for
the depending repo enables it for the internal Qt targets.

Add the new internal function that controls the related internal flag.
Keep qt_skip_warnings_are_errors for compatibility since it's used
in qtwebengine.

Combine qt_internal_set_skip_warnings_are_errors and
qt_skip_warnings_are_errors_when_repo_unclean functionality in the
new qt_internal_default_warnings_are_errors function.

Change-Id: I1330c75cd67a24e6386f5e94a089e43fa2012bc4
Reviewed-by: Alexandru Croitor <alexandru.croitor@qt.io>
2024-09-12 12:03:37 +02:00
Alexei Cazacov
8fcfd14817 Docs: Organize topics in the qtbase repo
This commit organizes the articles, so they:
- have a reasonable tree structure
- can be navigated through the topic tree in the Qt Creator help viewer

Task-number: QTBUG-127046
Change-Id: I66f2b131b8aacc887b35a770e51c1425431dffb5
Reviewed-by: Topi Reiniö <topi.reinio@qt.io>
2024-08-13 18:24:35 +03:00
Leena Miettinen
7419c9f77c Doc: Update \externalpage entries for Qt Creator documentation
- The docs were restructured in v. 13.0 and 14.0, so most headings
  changed, some topics were removed and lots of topics were added
- Use the macro \QC
- Fix the broken links in qtbase

Change-Id: Ic173a3e9a1c80322162c3feb277098de2a9f1cc6
Reviewed-by: Topi Reiniö <topi.reinio@qt.io>
2024-08-02 14:18:19 +02:00
Alexandru Croitor
82b2c51c3a CMake: Only build QtLibraryInfo if we are building tools
It is a dependency for qmake and qtpaths. If neither of them are
built, because building tools might be disabled, skip building the
library as well.

Pick-to: 6.8
Task-number: QTBUG-127334
Change-Id: I0f7d5bc9d9a4539a6d25f7c2d841e9b8978a83a3
Reviewed-by:  Alexey Edelev <alexey.edelev@qt.io>
2024-07-19 17:27:05 +02:00
Alexandru Croitor
aea0f89cfa CMake: Allow building qmake docs in a documentation-only build
We never added the qmake subdirectory if we didn't build tools. Thus
we never created a doc target to build qmake's documentation.

Make sure we add the qmake subdirectory regardless of whether we build
tools or not. qt_internal_add_tool can then make sure to skip building
the tool if necessary.

If the tool is not created though, create a fake qmake INTERFACE
library target, so that qt_internal_add_docs has a target to work
with.

Amends 5c352f47b977c72db323bb8e7b6ac25e1a453202

Pick-to: 6.8
Fixes: QTBUG-127334
Change-Id: I41cc96fb6ad21e32e17d312ea474835dfa38528e
Reviewed-by:  Alexey Edelev <alexey.edelev@qt.io>
Reviewed-by: Joerg Bornemann <joerg.bornemann@qt.io>
2024-07-19 17:27:03 +02:00
Oliver Wolff
b66ecb295e qmake: Add support for arm64 hosts on Windows
Pick-to: 6.8
Change-Id: I0096300fce870ef4411b071f074588a6420188e0
Reviewed-by:  Alexey Edelev <alexey.edelev@qt.io>
Reviewed-by: Joerg Bornemann <joerg.bornemann@qt.io>
2024-07-15 08:47:14 +00:00
Tor Arne Vestbø
a2779192ee qmake: Use utimensat on macOS when propagating mtime during install
macOS only claims to conform to POSIX.1-2001, but has had utimensat
since macOS 10.13.

By enabling the utimensat code path, using stat.st_mtimespec as input,
we get nanosecond precision when qmake installs files.

Without this the tst_qmake::install_files tests fails due to the source
file having a sub second timestamp -- 2023-07-31 15:58:12.468 -- while the
installed does not: 2023-07-31 15:58:12.000.

The reason this test passes in the CI right now is probably because
the source file archive we use to pass test sources to the test
machines does not support the same level of precision.

Pick-to: 6.8
Change-Id: I6ca7a2a2f9e71981814cbf496aa55717b3a3f74f
Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
2024-07-08 22:18:56 +02:00
Ahmad Samir
e583c3d516 QDirListing: add flags to handle entries filtering
By extending IteratorFlag so that it replaces both QDir::Filter and
QDirIterator::IteratorFlag enums, but with better defaults (based on how
QDir/Iterator is used in 15-20 years worth of code in Qt and KDE).

Make the QDirListing(QDir ~~) ctor private, also change it to use
QDirIterator::IteratatorFlags; it will be used to port existing code.

If QDir is ported to use QDirListing::IteratorFlags, instead of
QDir::Filters, a public QDirListing(QDir) constructor can then be added.

Pick-to: 6.8
Fixes: QTBUG-125504
Task-number: QTBUG-125859
Change-Id: Ide4ff8279f554029ac30d0579b0e8373ed4337f7
Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
2024-06-27 03:35:02 +03:00
Alexandru Croitor
79f9b490e7 CMake: Annotate some targets with SBOM information
Pick-to: 6.8
Task-number: QTBUG-122899
Change-Id: I2eb70ca4d52e30c8e15ca7b350df6965d93732f8
Reviewed-by:  Alexey Edelev <alexey.edelev@qt.io>
2024-06-13 16:54:47 +02:00
Alexey Edelev
816071d440 Move QT_DISABLE_DEPRECATED_UP_TO and QT_WARN_DEPRECATED_UP_TO to header
The new approach allows to imply the macro definitions for every Qt
submodule and user project without the need of setting it explicitly
from CMake. This also prevent users from introducing the
incompatibility between Qt modules due to defining
the QT_DISABLE_DEPRECATED_UP_TO version lower than qtbase was built
with.

Task-number: QTBUG-124765
Change-Id: I7ba481f62cb9073ae0343c400ffc26f239f080f1
Reviewed-by: Ivan Solovev <ivan.solovev@qt.io>
Reviewed-by: Alexandru Croitor <alexandru.croitor@qt.io>
2024-05-22 18:38:09 +02:00
Joerg Bornemann
02b55967d5 QMake: Fix generation of Visual Studio filter files
This amends commit a0a990863fa54b52db5e97716b130f69de47fa52.

We bailed out of writing the filter file if opening the file for writing
was successful. The condition must be flipped.

Change-Id: I24331c5374a25c5a1126c6f7f71d41d840e0e532
Reviewed-by: Oliver Wolff <oliver.wolff@qt.io>
2024-04-19 12:47:42 +02:00
Giuseppe D'Angelo
a0a990863f QMake: make it error out if it cannot open output files
Change-Id: I02c979e31f4208cbf9d590e043cf7f03eb4a39d6
Reviewed-by: Joerg Bornemann <joerg.bornemann@qt.io>
2024-03-27 04:24:11 +01:00
Ahmad Samir
7cf39bd785 Port to QDirListing
Use QDirListing in the Bootstrap build instead of QDirIterator.

Drive-by changes:
- more const variables
- use emplace_back() instead of append() where appropriate

Change-Id: Ie1f0d03856e557c4bfabfff38a87edc7da86d091
Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
2024-03-03 14:02:07 +02:00
Topi Reinio
a4ce469a27 Doc: qmake manual: Fix links to 'Qt Widgets Designer'
'Qt Designer', and related documentation links, were renamed to
'Qt Widgets Designer'.

Amends 8aceccc7eb075cef442dfe725137068d90e40940.

Task-number: QTBUG-122253
Change-Id: I38d8b221716de59fe8faefbd4928eb1007e19b81
Reviewed-by: Friedemann Kleint <Friedemann.Kleint@qt.io>
Reviewed-by: Leena Miettinen <riitta-leena.miettinen@qt.io>
2024-02-29 14:35:58 +00:00
Kai Köhne
b74f814ae2 Doc: Further replace 'Qt Designer' with 'Qt Widgets Designer'
Use \QD macro wherever possible.

Amends 8aceccc7eb075

Task-number: QTBUG-122253
Change-Id: I276dabd40fb81486f6380fd90cf9968990932a24
Reviewed-by: Joerg Bornemann <joerg.bornemann@qt.io>
2024-02-29 15:35:58 +01:00
Lucie Gérard
1556a3a5eb Correct doc snippet license
All file under doc/snippet should be
license as Documentation snippets
and according to QUIP-18 [1]
this is LicenseRef-Qt-Commercial OR BSD-3-Clause

[1]: https://contribute.qt-project.org/quips/18

Pick-to: 6.7
Task-number: QTBUG-121787
Change-Id: I76eedfb6b15c4091f726a5652e3530001d7cdaf7
Reviewed-by: Volker Hilsheimer <volker.hilsheimer@qt.io>
2024-02-28 19:15:51 +01:00
Alexey Edelev
bdb2f20154 Fix the qtpath issue with lto enabled
Move qtconfManualPath pointer to the unnamed namespace, so it's never
exported. Add the static setQtconfManualPath method that sets the
pointer at runtime.

Fixes: QTBUG-122739
Pick-to: 6.5 6.6 6.7
Change-Id: Icfc631f9680ad5f484920b0fdf3e408b7657c108
Reviewed-by: Joerg Bornemann <joerg.bornemann@qt.io>
Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
2024-02-28 14:02:43 +00:00
Lucie Gérard
3828b30951 Correct license in qmake/
The majority of files in qmake/ have non-LGPL licensing.
Remove the mix of licenses and follow the majority.
Not sure what is the type of the files in qmake/
according to QUIP-18 [1].

[1]: https://contribute.qt-project.org/quips/18

Pick-to: 6.7
Task-number: QTBUG-121787
Change-Id: I4003daada9e20b9ea4524de89ba49fbe0880ec23
Reviewed-by: Kai Köhne <kai.koehne@qt.io>
2024-02-13 13:55:02 +01:00
Tim Blechmann
84537e6dc2 qmake: use [[fallthrough]]
Since qt is on C++17, it's possible too use the [[fallthrough]]
attribute instead of a // Fallthrough comment, that may be stripped by
compiler launchers (ccache/icecc), causing -Wimplicit-fallthrough
warnings.

Pick-to: 6.7
Change-Id: Ic809cf4e95b2160fac591b3802fa123e705337cc
Reviewed-by: Marc Mutz <marc.mutz@qt.io>
2024-02-12 03:01:48 +00:00
Tim Blechmann
72f5793d2e qmake: make unity-buildable
msvc_objectmodel.cpp and qmakeparser.cpp have symbols that may clash.
Removing them from unity builds allows qmake to be unity-built.

Pick-to: 6.7 6.6 6.5
Change-Id: I46443ec979142ab2ebb686f9444b37e1043f0af1
Reviewed-by: Marc Mutz <marc.mutz@qt.io>
2024-02-10 03:08:19 +00:00
Tasuku Suzuki
bd6d7d4d74 Remove extra semi-colons
Change-Id: I92fddb36cd136fd1bd627955f15d0559b9942d7e
Reviewed-by: Allan Sandfeld Jensen <allan.jensen@qt.io>
2024-02-06 20:17:18 +09:00
Lucie Gérard
d44629d677 Change license of .pro file
According to QUIP-18 [1], all build system files should be
BSD-3-Clause

[1]: https://contribute.qt-project.org/quips/18

Pick-to: 6.7
Change-Id: Ifd2832708e0c8e0bde1cad4004839fecffe44e3c
Reviewed-by: Kai Köhne <kai.koehne@qt.io>
2024-02-01 20:25:42 +01:00
Joerg Bornemann
7cc55822fb Remove build machine path that was baked into the qmake binary
Remove the __FILE__ preprocessor macro that contains the full path to
the current source file. This is needed for reproducible builds.

The macro was only used for two debug messages. It's enough to mention
the file name - if at all.

Fixes: QTBUG-96281
Pick-to: 6.5 6.6 6.7
Change-Id: I7940ec090b570ec0105196a881e4c73c279bd248
Reviewed-by: Alexandru Croitor <alexandru.croitor@qt.io>
2023-12-13 06:56:48 +00:00
Rami Potinkara
7b84cd62b0 Android: bump Android target API level to 34
Bumped on network related .gradle files too.

Fixes: QTBUG-119145
Change-Id: I95f70e6cda1aad7a6bd7246c623eb6f143a829cb
Reviewed-by: Assam Boudjelthia <assam.boudjelthia@qt.io>
2023-11-30 08:57:55 +02:00
Yuhang Zhao
95f103edab clang-cl: remove unneeded workaround
This piece of code may be some old workaround, but anyway Qt doesn't
need it anymore. Removing them doesn't cause any compilation errors
or even warnings. We should not keep any workaround if they are not
needed anymore.

Change-Id: Ieae8c2b005fa5e556c838d78d839d498101f28ff
Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
2023-10-08 12:57:49 +08:00
Joerg Bornemann
480b39288f Doc: Fix link in QMake variable reference
In the description of the qt value of the CONFIG variable the link to
the QT variable was broken.

Pick-to: 6.5 6.6
Change-Id: I07dc1993ce0cefb7615d02aaefb9ad8391b1dd39
Reviewed-by: Leena Miettinen <riitta-leena.miettinen@qt.io>
2023-10-04 23:41:40 +02:00
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 389507a047e0ec0721535052df6ddf957fbb95b3.

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 0749ba2c5eacc4822cf9c7a31edf8d70c4ef6064

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