| Commit message (Collapse) | Author | Age | Files | Lines |
|
|
|
|
|
|
|
|
| |
Break out of the while on EOF when reading comments.
Pick-to: 6.5
Fixes: PYSIDE-2311
Change-Id: I2047220950f9d9b424d04c1e34e32eeb5a5b83fa
Reviewed-by: Joerg Bornemann <joerg.bornemann@qt.io>
|
|
|
|
|
|
|
| |
Task-number: QTBUG-113116
Pick-to: 6.5
Change-Id: I5ea9291d8ca4dce13a26d1d70874223e63a09671
Reviewed-by: Joerg Bornemann <joerg.bornemann@qt.io>
|
|
|
|
|
|
|
|
|
|
|
| |
Before, lrelease reported only the line number of the first of
duplicated messages. To actually resolve the duplicates the user must
know the occurrences of all duplicated messages.
Now, lrelease reports the line numbers of all duplicated messages.
Change-Id: I19836f54dcaa9b1d22a9e3e708f830769c50bff2
Reviewed-by: Kai Köhne <kai.koehne@qt.io>
|
|
|
|
|
|
|
| |
Pick-to: 6.5
Task-number: QTBUG-112841
Change-Id: I1d7f394c52f609302711da2dcd71df9fe8ad8e88
Reviewed-by: Joerg Bornemann <joerg.bornemann@qt.io>
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
Projects with cmake_minimum_required(VERSION 3.19) or below, so with
no support for the CMP0118 policy, failed to configure when
translations were added in a subdirectory scope different from
the target scope.
qt_add_translations adds qm files to resources, that in turn calls
_qt_internal_expose_deferred_files_to_ide which adds the qm files
to the target sources.
Because qm files are created using add_custom_command, which by default
marks the files as GENERATED only in the directory scope of the
command (unless CMP0118 is set to NEW), that causes add_executable to
think the qm files are not generated, and error out with
"Cannot find source file:".
Explicitly set the GENERATED flag in the target directory scope to
avoid the issue when using CMake 3.18+.
The error still happens with CMake 3.17 or lower, but that's not the
only error that happens. Just adding resources in a different
subdirectory without exposing the source files already fails, and
that's not something we can really fix without a newer CMake version.
Pick-to: 6.5
Fixes: QTBUG-112841
Change-Id: I79eced94ac641a6f9239f3eb721cef5e35f847fa
Reviewed-by: Joerg Bornemann <joerg.bornemann@qt.io>
Reviewed-by: Amir Masoud Abdol <amir.abdol@qt.io>
|
|
|
|
|
|
|
|
| |
Use the isStringLiteralPrefix function that was introduced in an earlier
commit.
Change-Id: I0095ca45e232639317c6fe6fcfd2ee57fe8b1caa
Reviewed-by: Kai Köhne <kai.koehne@qt.io>
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
The fix for QTBUG-73273 already added code to allow prefixed raw string
literals. Now, lupdate supports regular prefixed string literals as
well.
If the parser encounters a prefixed string literal, ignore the prefix
and handle the rest as ordinary string literal.
Note that expressions like tr(U"foo") won't compile out of the box. We
support them nevertheless. The user might provide their own tr macro
that handles such string literals.
[ChangeLog][lupdate] lupdate now supports prefixed string literals like
u"foo".
Pick-to: 6.5
Fixes: QTBUG-59802
Change-Id: Ibe8b4b83ee1197a73678b1e8f37dd6ac7db57714
Reviewed-by: Kai Köhne <kai.koehne@qt.io>
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
There's an edge case in the number heuristics of lupdate that triggers a
Q_ASSERT due to an out-of-bounds string character access. To run into
the assert, the following must be true:
- oldSource == oldTranslation
- oldSource must contain a number followed immediately by more than one
characters
- oldSource and newSource must differ only in the character after the
number
Examples that trigger the assert:
| oldSource | newSource |
|------------+------------|
| "%1MiB" | "%1Kib" |
| "1Mi" | "1Ki" |
| "1M " | "1Ki " |
| "123abcde" | "123xbcde" |
Examples that do not trigger the assert:
| oldSource | newSource |
|------------+------------|
| "%1MiB" | "%1Kob" |
| "1M" | "1K" |
| "123abcde" | "123xxcde" |
Add a test case that triggers the Q_ASSERT.
Add a check to avoid the out-of-bounds access as a minimal fix. The
whole number heuristics algorithm is fishy and produces results that
don't match the source code comments. But it's been like that "forever",
so let's not change existing behavior people may rely on.
Pick-to: 6.5
Fixes: QTBUG-111775
Change-Id: Ibb6bcce9115f7060b6de3f97451e38105623c003
Reviewed-by: Kai Köhne <kai.koehne@qt.io>
|
|
|
|
|
|
|
|
|
|
| |
The enum class construct can only be based on an integral type so they
can be skipped over safely.
Pick-to: 6.5
Task-number: QTBUG-36589
Change-Id: I9a7dd7508f80002e9e46429de726a75607d21a54
Reviewed-by: Joerg Bornemann <joerg.bornemann@qt.io>
|
|
|
|
|
|
| |
Pick-to: 5.15 6.2 6.4 6.5.0 6.5
Change-Id: I62921a04d2173dcd78797d792437a27bbaafc5c7
Reviewed-by: Friedemann Kleint <Friedemann.Kleint@qt.io>
|
|
|
|
|
|
|
|
|
|
| |
If the 3rdparty libs are not built with -fPIE enabled we cannot link it
to the tools. Disable the flag until provisioning got the proper
update.
Change-Id: I25aa3dcec480219e3d29225ee517d9a910a1966e
Reviewed-by: Qt CI Bot <qt_ci_bot@qt-project.org>
Reviewed-by: Joerg Bornemann <joerg.bornemann@qt.io>
|
|
|
|
|
|
| |
Pick-to: 6.5
Change-Id: I7b069537b39c657f56e648dc9ac5619fe56ee4f1
Reviewed-by: Joerg Bornemann <joerg.bornemann@qt.io>
|
|
|
|
|
|
|
|
|
|
| |
Allows to have text in extra comment within quotes that will be kept
intact when running lupdate.
Fixes: QTBUG-110630
Co-authored-by: Kai Köhne <kai.koehne@qt.io>
Change-Id: I267e779193f168a8af067b927735991f2c512145
Reviewed-by: Joerg Bornemann <joerg.bornemann@qt.io>
|
|
|
|
|
|
|
|
|
|
| |
Complements 0f092219165ecd5751ef73cb939364134a0319ee.
Pick-to: 6.5
Task-number: QTBUG-109394
Change-Id: I098f2d42bbc367cee89284fb6fb2d2c7cfc5c54d
Reviewed-by: Amir Masoud Abdol <amir.abdol@qt.io>
Reviewed-by: Joerg Bornemann <joerg.bornemann@qt.io>
|
|
|
|
|
|
| |
Pick-to: 6.5
Change-Id: Ic00df7d45246270d724b3b1d1ef9d13d76dcc136
Reviewed-by: Alexandru Croitor <alexandru.croitor@qt.io>
|
|
|
|
|
|
|
|
|
|
|
|
| |
The signature changed again.
I've tested it with a current main, that is clang 17, but the commit
854c10f8d185286d941307e1033eb492e085c203 with introduced the change is
also contained in clang 16.
Pick-to: 6.4 6.5
Change-Id: I050ca5843708be4489757538849000d3675005ac
Reviewed-by: Kai Köhne <kai.koehne@qt.io>
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
With the qt6_add_lupdate command, lupdate gets passed a list of sources
of a target. This list might contain the .ts file.
There's an undocumented feature of lupdate: it can take .ts files as
additional sources for translation strings (see commit
b3f6b61a584fbaf047cf617a4b9cf8d9e92d2882). Having the same .ts file as
input and output for lupdate can result in accumulating duplicate
translations.
Filter the list of source files to exclude .ts files.
Pick-to: 6.5 6.4 6.2
Fixes: QTBUG-109316
Change-Id: Idea80e98655729167580b33bf7cb811653f407c7
Reviewed-by: Alexandru Croitor <alexandru.croitor@qt.io>
|
|
|
|
|
|
|
| |
The example is located in the qtdeclarative module.
Change-Id: I0aad66cf640c7067dff5407a225ee6f59ac1dc9c
Reviewed-by: Kai Köhne <kai.koehne@qt.io>
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
- Move most developer information to the I18N and L10N topics
in qtdoc and remove duplicate information.
- Reorganize content
- Use active voice and present tense
- Add a link to a YouTube video about using Qt translation tools
- Replace the deprecated \gui macro with the \uicontrol qdoc command
- Copy info from lupdate and lrelease helps
Task-number: QTBUG-109782
Change-Id: I48265e24e0337e62d309080cc760694981ad13da
Reviewed-by: Joerg Bornemann <joerg.bornemann@qt.io>
|
|
|
|
|
|
|
|
|
| |
Amends 0f092219165ecd5751ef73cb939364134a0319ee.
Pick-to: 6.5
Task-number: QTBUG-109394
Change-Id: If5b25a03db99f6a9234581f6db718fe650230fec
Reviewed-by: Joerg Bornemann <joerg.bornemann@qt.io>
|
|
|
|
|
|
|
|
|
| |
Disambiguate static functions.
Pick-to: 6.5
Task-number: QTBUG-109394
Change-Id: I699bfd86b6018e15b5882b5911e1c4720fdbe4d5
Reviewed-by: Jörg Bornemann <joerg.bornemann@qt.io>
|
|
|
|
|
|
|
|
|
| |
A single definition is required for CMake Unity (Jumbo) builds.
Pick-to: 6.5
Task-number: QTBUG-109394
Change-Id: I5b68e31ae19a92fdc1796dddb81d85e14a8e60ec
Reviewed-by: Jörg Bornemann <joerg.bornemann@qt.io>
|
|
|
|
|
|
|
|
|
| |
They cause clashes in CMake Unity (Jumbo) builds.
Pick-to: 6.5
Task-number: QTBUG-109394
Change-Id: Ib3b8558a71b063f5c28150391fc8cfa2a80973c9
Reviewed-by: Kai Köhne <kai.koehne@qt.io>
|
|
|
|
|
|
|
|
| |
Fixes Clang -Wunused-but-set-variable warning.
Change-Id: Ieef44cd2ff6a2d5e56c3eee61ed89e8d79d0a200
Pick-to: 6.5
Reviewed-by: Kai Köhne <kai.koehne@qt.io>
|
|
|
|
|
|
|
|
|
|
|
| |
In line with the recent change in QLocale's nomenclature, do the same
in Linguist. In the process, obtain a list of territory enum values
sorted by territory name a little more efficiently, bypassing an
intermediary unsorted list of territory enum values.
Change-Id: I18fed74499312f0b502bc8a93fbb2a69c65bca05
Reviewed-by: hjk <hjk@qt.io>
Reviewed-by: Qt CI Bot <qt_ci_bot@qt-project.org>
|
|
|
|
|
|
|
|
|
|
|
| |
Provide a landing page for LinguistTools macros, making it easier
to navigate between them in the breadcrumb menu. Also add details on
where the respective command is found.
Task-number: QTBUG-96239
Pick-to: 6.2 6.4
Change-Id: Ib74c6cab2215900e1b43ea26fce293ea74d154f0
Reviewed-by: Jörg Bornemann <joerg.bornemann@qt.io>
|
|
|
|
|
|
| |
Pick-to: 6.2 6.4
Change-Id: I83605bf3a66f0408e25f91c65fca7d902df970f3
Reviewed-by: Paul Wicking <paul.wicking@qt.io>
|
|
|
|
|
|
|
|
| |
Pick-to: 6.4
Pick-to: 6.2
Task-number: QTBUG-107199
Change-Id: Idd08d5197af683ebb4a644d1dae8a948a44907e2
Reviewed-by: Kai Köhne <kai.koehne@qt.io>
|
|
|
|
|
| |
Change-Id: I8c9b7a204764cd1eb2cdd0dd10e44198f6140ff7
Reviewed-by: Friedemann Kleint <Friedemann.Kleint@qt.io>
|
|
|
|
|
|
|
| |
Pick-to: 6.4
Change-Id: Ib1e239b905670852d907f6b9cd088e512c2cbca1
Reviewed-by: Qt CI Bot <qt_ci_bot@qt-project.org>
Reviewed-by: Jörg Bornemann <joerg.bornemann@qt.io>
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
The difference between "-locations absolute" and "-locations relative" is
only in the stored line information. For relative, the line number is
relative to a previous potential entry in the same file and prefixed
by a '+'. For absolute, the line number is just counting from the
beginning of the file.
Anyhow, from the existing help output this is unclear, and users might
expect that 'absolute' and 'relative' first and foremost applies to the
file path.
Fixes: QTBUG-107107
Pick-to: 6.4
Change-Id: Ibc62df867b9fc914cf8c8fa076a555b35c240a54
Reviewed-by: Jörg Bornemann <joerg.bornemann@qt.io>
|
|
|
|
|
|
| |
Task-number: QTBUG-107681
Change-Id: I46cc9464db450b94bbd975076c3f3aaf411a747c
Reviewed-by: Kai Koehne <kai.koehne@qt.io>
|
|
|
|
|
|
|
|
|
| |
Implement heuristics in Linguist when releasing - if all of
the messages contain an id, then release in id-based mode.
Fixes: QTBUG-106898
Change-Id: I33b577276802d6cd5b60cf25f710d9b5d7e41d09
Reviewed-by: Kai Koehne <kai.koehne@qt.io>
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
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");
a.k.a qt-port-to-std-compatible-api V4 with config Scope: 'Container'.
Change-Id: I58e1b41b91c34d2e860dbb5847b3752edbfc6fc9
Reviewed-by: Ivan Solovev <ivan.solovev@qt.io>
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
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.
Task-number: QTBUG-99313
Change-Id: I234704ba429750ddee958a82f6c941d041da0653
Reviewed-by: Jarek Kobus <jaroslaw.kobus@qt.io>
Reviewed-by: Ivan Solovev <ivan.solovev@qt.io>
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
This is a semantic patch using ClangTidyTransformator as in
qtbase/df9d882d41b741fef7c5beeddb0abe9d904443d8:
auto QtContainerClass = anyOf(
expr(hasType(cxxRecordDecl(isSameOrDerivedFrom(hasAnyName(classes))))).bind(o),
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',
with the extended set of container classes recognized.
Change-Id: I95f6410e57a6a92b1cf91bbedfbe3d517cab6b44
Reviewed-by: Qt CI Bot <qt_ci_bot@qt-project.org>
Reviewed-by: Kai Koehne <kai.koehne@qt.io>
Reviewed-by: Friedemann Kleint <Friedemann.Kleint@qt.io>
|
|
|
|
|
|
|
|
| |
The signature of InclusionDirective changed for clang 15.
Pick-to: 6.4
Change-Id: Ic259b3508088671b40f6f615524137ce8837c487
Reviewed-by: Jörg Bornemann <joerg.bornemann@qt.io>
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
Files in .qrc files were not taken into account when passing -project to
lupdate.
lupdate converts .pro files to .json files internally with the lprodump
tool. That tool already expanded .qrc files - that's why tst_lupdate
good:parseqrc succeeded.
Fixes: QTBUG-102282
Change-Id: Ib4cb2bfeb81eab7d165e6865629f69f951dc6492
Reviewed-by: Lucie Gerard <lucie.gerard@qt.io>
Reviewed-by: Kai Koehne <kai.koehne@qt.io>
|
|
|
|
|
|
|
| |
It will come back as a built-in facility of QDebug.
Change-Id: Ie083cc8da3f4f5a3e42bc59ac2a0ced489493610
Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
|
|
|
|
|
|
|
|
|
| |
Copied from qtbase/qmake/library/.
Change-Id: Id46f949c927a92ff0249d665c6302eb250ccf252
Reviewed-by: Kai Koehne <kai.koehne@qt.io>
Reviewed-by: Jarek Kobus <jaroslaw.kobus@qt.io>
Reviewed-by: Qt CI Bot <qt_ci_bot@qt-project.org>
|
|
|
|
|
|
| |
Pick-to: 6.4
Change-Id: I8d1165bf276e812c025cdd015d0f4bd656ca8b64
Reviewed-by: Kai Koehne <kai.koehne@qt.io>
|
|
|
|
|
|
|
|
|
|
| |
That is required to propagate deprecation warnings to internal tools
Also change QLocale::{Any}Country to QLocale::{Any}Territory.
Task-number: QTBUG-105102
Change-Id: I3396d832cf4a98722ee9a10ed64dab263ba4eb0f
Reviewed-by: Edward Welbourne <edward.welbourne@qt.io>
|
|
|
|
|
|
|
| |
Pick-to: 6.4
Change-Id: I680861e69c04b32a660d3b087a1e4d1c1428327f
Reviewed-by: Øystein Heskestad <oystein.heskestad@qt.io>
Reviewed-by: Jörg Bornemann <joerg.bornemann@qt.io>
|
|
|
|
|
|
| |
Task-number: QTBUG-105718
Change-Id: I2df3a8aec11f30f301e3143e9960156b6f45e614
Reviewed-by: Jörg Bornemann <joerg.bornemann@qt.io>
|
|
|
|
|
|
|
|
|
|
|
|
| |
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: I41a2c9aa6a933a4e3dda5d5b4c70c461912907b2
Reviewed-by: Jörg Bornemann <joerg.bornemann@qt.io>
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
The deprecation of QAction::associatedWidgets() results in a bit more
code, because the list of associated objects can also contain
QGraphicsWidget instances. So we need to explicitly qobject_cast them
to QWidget* before using.
Apart from that the changes are rather straightforward.
Task-number: QTBUG-104968
Pick-to: 6.4 6.3 6.2
Change-Id: I2e7c94de069cd5c9cde5e6d41ac86004a8bae6c9
Reviewed-by: Jarek Kobus <jaroslaw.kobus@qt.io>
|
|
|
|
|
| |
Change-Id: Ibe5d2ed0b632ffff4a8a1e24e95500f80a742191
Reviewed-by: Alexey Edelev <alexey.edelev@qt.io>
|
|
|
|
|
|
| |
Change-Id: Ife0411782e44e9a51b48f8275215283d85d828cd
Reviewed-by: Qt CI Bot <qt_ci_bot@qt-project.org>
Reviewed-by: Jörg Bornemann <joerg.bornemann@qt.io>
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
This reverts commit 3af741cc180445cc487af6853575651ba204c4c1 and fixes
QTBUG-86507 differently.
The fix for QTBUG-86507 modified the algorithm to not remove elements
from m_messages while looping over it. However, that changes the
indices that are returned by resolveDuplicates.
Bring back the old algorithm and change the TranslateMessage*Ptr classes
to hold indices to elements of m_messages instead of pointers.
Pick-to: 6.2 6.3 6.4
Task-number: QTBUG-86507
Change-Id: Ib395fa48da4e0d688ac7f2b766134c7711412b1b
Reviewed-by: hjk <hjk@qt.io>
|
|
|
|
|
|
|
|
|
|
| |
We can't fix these 3rd-party headers, so disable the warning when
including Clang/LLVM headers.
Fixes: QTBUG-104713
Pick-to: 6.4 6.3 6.2
Change-Id: I7d851a4a4237c3d3500609d2e1f6c8ceb43f204b
Reviewed-by: Friedemann Kleint <Friedemann.Kleint@qt.io>
|