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>
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>
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>
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>
- 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>
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>
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>
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>
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>
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>
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>
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>
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>
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>
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>
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>
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>
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>
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>
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>
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>
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>
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>
[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>
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>
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>
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>
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>
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>
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>
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>
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>
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>
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>
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>
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>
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>
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>
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>
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>