Skip to content
GitLab
Explore
Sign in
Primary navigation
Search or go to…
Project
Q
Qt6 CMake API Review
Manage
Activity
Members
Labels
Plan
Issues
Issue boards
Milestones
Wiki
Code
Merge requests
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Snippets
Build
Pipelines
Jobs
Pipeline schedules
Artifacts
Deploy
Releases
Package Registry
Container Registry
Model registry
Operate
Environments
Terraform modules
Monitor
Incidents
Analyze
Value stream analytics
Contributor analytics
CI/CD analytics
Repository analytics
Model experiments
Help
Help
Support
GitLab documentation
Compare GitLab plans
Community forum
Contribute to GitLab
Provide feedback
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
Alexandru Croitor
Qt6 CMake API Review
Compare revisions
7b4058683fb8386fd1e59f914d4dd6722bd11b9a to fe8027d2fbf27a4f99266e7dceb1908a766f4e96
Compare revisions
Changes are shown as if the
source
revision was being merged into the
target
revision.
Learn more about comparing revisions.
Source
alcroito/qt6-cmake-api-review
Select target project
No results found
fe8027d2fbf27a4f99266e7dceb1908a766f4e96
Select Git revision
Branches
master
Swap
Target
alcroito/qt6-cmake-api-review
Select target project
torarne/qt6-cmake-api-review
Sami.Shalayel/qt6-cmake-api-review
aledelev/qt6-cmake-api-review
crscott/qt6-cmake-api-review
alcroito/qt6-cmake-api-review
5 results
7b4058683fb8386fd1e59f914d4dd6722bd11b9a
Select Git revision
Branches
master
Show changes
Only incoming changes from source
Include changes to target since source was created
Compare
Commits on Source (2)
Rename incorrect file name
· 7fc1765f
Alexandru Croitor
authored
1 year ago
7fc1765f
Split 6.7 translation api into separate doc
· fe8027d2
Alexandru Croitor
authored
1 year ago
fe8027d2
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
api_review_qt_6_7.md
+0
-356
0 additions, 356 deletions
api_review_qt_6_7.md
api_review_qt_6_7_part2.md
+372
-0
372 additions, 0 deletions
api_review_qt_6_7_part2.md
api_review_qt_6_8.md
+0
-0
0 additions, 0 deletions
api_review_qt_6_8.md
with
372 additions
and
356 deletions
api_review_qt_6_7.md
View file @
fe8027d2
...
...
@@ -9,33 +9,6 @@ https://git.qt.io/alcroito/qt6-cmake-api-review/-/blob/master/api_review_qt_6_7.
## qbase
### `qt_standard_project_setup` - API Change and new variables
Add
`I18N_LANGUAGES`
keyword to
`qt_standard_project_setup`
.
Add
`I18N_NATIVE_LANGUAGE`
keyword to
`qt_standard_project_setup`
.
Added variable
`QT_I18N_LANGUAGES`
to specify the languages that are used for i18n in the project.
Added variable
`QT_I18N_NATIVE_LANGUAGE`
to specify the native language that is used in the source
code for translatable strings.
https://doc-snapshots.qt.io/qt6-dev/qt-standard-project-setup.html#synopsis
https://doc-snapshots.qt.io/qt6-dev/cmake-variable-qt-i18n-languages.html
https://doc-snapshots.qt.io/qt6-dev/cmake-variable-qt-i18n-native-language.html
https://codereview.qt-project.org/c/qt/qtbase/+/501500
https://codereview.qt-project.org/c/qt/qtbase/+/503262
Documented.
No example snippets, neither for options nor the variables.
There is an exmaple snippet in doc page of
`qt_add_translations`
, but there's no direct link back.
Has "since qt version" blurb.
**Notes:**
**Action points:**
### `QT_ANDROID_DEPLOYMENT_TYPE` / `QT_ANDROID_DEPLOY_RELEASE` - New variable, new behavior
Add new
`QT_ANDROID_DEPLOYMENT_TYPE`
variable and modify behaivor of
...
...
@@ -353,332 +326,3 @@ AP: Docs, snippet, since qt, whether it is TP
## qttools
### `qt_add_lupdate` - New API option
Allow multiple calls of
`qt_add_lupdate`
.
Added
`[LUPDATE_TARGET target-name]`
option.
https://doc-snapshots.qt.io/qt6-dev/qtlinguist-cmake-qt-add-lupdate.html
https://codereview.qt-project.org/c/qt/qttools/+/495544
Documented.
No specific example snippet.
No "since qt version" blurb.
**Notes:**
**Action points:**
### `qt_add_lrelease` - New API options and changed option
Make the target argument of
`qt_add_lrelease`
optional.
Passing a target as the first argument to
`qt_add_lrelease`
was deprecated.
https://doc-snapshots.qt.io/qt6-dev/qtlinguist-cmake-qt-add-lrelease.html
https://codereview.qt-project.org/c/qt/qttools/+/496435
Old signature
```
cmake
qt_add_lrelease
(
target TS_FILES file1.ts [file2.ts ...]
[NO_TARGET_DEPENDENCY]
```
New signature
```
cmake
qt_add_lrelease
(
TS_FILES file1.ts [file2.ts ...]
[LRELEASE_TARGET target-name]
[EXCLUDE_FROM_ALL]
```
Documented.
No specific example snippet.
No "since qt version" blurb for new / changed options.
`NO_TARGET_DEPENDENCY`
disappeared from docs, not mentioned in deprecated section.
First
`target`
option that is now deprecated IS documented.
**Notes:**
**Action points:**
### `qt_add_lupdate` - New API options and changed option
Allow specifying multiple targets in
`qt_add_lupdate`
https://doc-snapshots.qt.io/qt6-dev/qtlinguist-cmake-qt-add-lupdate.html
https://codereview.qt-project.org/c/qt/qttools/+/495546
Old signature
```
cmake
qt_add_lupdate
(
target TS_FILES file1.ts [file2.ts ...]
```
New signature
```
cmake
qt_add_lupdate
(
TS_FILES file1.ts [file2.ts ...]
[TARGETS target1 [target2 ...]]
```
Documented.
No specific example snippet.
No "since qt version" blurb for new / changed options.
First
`target`
option that is now deprecated IS documented.
**Notes:**
**Action points:**
### `qt_collect_i18n_targets` - New API
Add
`qt_collect_i18n_targets`
, collects targets that are eligible for translation.
https://doc-snapshots.qt.io/qt6-dev/qtlinguist-cmake-qt-collect-targets-for-translation.html
https://codereview.qt-project.org/c/qt/qttools/+/496434
Signature
```
cmake
qt_collect_i18n_targets
(
out_var [DIRECTORY path]
)
```
Documented.
Has "since qt version" blurb.
Has example snippet.
**Notes:**
**Action points:**
### `QT_EXCLUDE_FROM_TRANSLATION` - New target and directory properties
Targets can be excluded from translation by setting the target property
`QT_EXCLUDE_FROM_TRANSLATION`
to TRUE
Targets below a certain directory can be excluded from translation by
setting the directory property
`QT_EXCLUDE_FROM_TRANSLATION`
to TRUE.
https://doc-snapshots.qt.io/qt6-dev/cmake-directory-property-qt-exclude-from-translation.html
https://doc-snapshots.qt.io/qt6-dev/cmake-target-property-qt-exclude-from-translation.html
https://codereview.qt-project.org/c/qt/qttools/+/496434
Documented.
Has "since qt version" blurb.
No example snippets.
**Notes:**
**Action points:**
### `QT_EXCLUDE_SOURCES_FROM_TRANSLATION` - New target property
Allow excluding target sources from i18n.
The target property
`QT_EXCLUDE_SOURCES_FROM_TRANSLATION`
was added to exclude source files of
a target from handling with lupdate.
https://doc-snapshots.qt.io/qt6-dev/cmake-target-property-qt-exclude-sources-from-translation.html
https://codereview.qt-project.org/c/qt/qttools/+/498913
Signature
```
cmake
set_property
(
TARGET myapp PROPERTY QT_EXCLUDE_SOURCES_FROM_TRANSLATION
untranslatable.cpp
3rdparty/*
)
```
Documented.
Has "since qt version" blurb.
Has example snippet.
**Notes:**
**Action points:**
### `qt_add_translations` - New API options and behavior change
Support project-wide i18n with
`qt_add_translations`
.
Gained the
`TARGETS`
argument to specify multiple targets that intend to load .qm files.
Gained the
`SOURCE_TARGETS`
argument to specify multiple targets that contain sources with
translatable strings.
If the first argument of
`qt_add_translations`
is a target, that target is not used
anymore for extracting translatable sources.
Now defers itself to the end of the scope of
`PROJECT_SOURCE_DIR`
if
`SOURCE_TARGETS`
is not given.
This behavior can be turned off by passing
`IMMEDIATE_CALL`
.
https://doc-snapshots.qt.io/qt6-dev/qtlinguist-cmake-qt-add-translations.html
https://codereview.qt-project.org/c/qt/qttools/+/498033
Old signature
```
cmake
qt_add_translations
(
target TS_FILES file1.ts [file2.ts ...]
```
New signature
```
cmake
qt_add_translations
(
[target]
[TARGETS target1 [target2...]]
[SOURCE_TARGETS target1 [target2...]]
TS_FILES file1.ts [file2.ts ...]
[IMMEDIATE_CALL]
)
```
Documented.
No
`IMMEDIATE_CALL`
example snippet.
Partial "since qt version" blurb for new / changed options.
**Notes:**
**Action points:**
### `qt_add_translations` - New API options and behavior change
Automatically determine
`.ts`
file names in
`qt_add_translations`
The
`TS_FILES`
argument of
`qt_add_translations`
is
optional now, and .ts file paths can be automatically determined after
setting the
`QT_I18N_LANGUAGES`
variable.
https://doc-snapshots.qt.io/qt6-dev/qtlinguist-cmake-qt-add-translations.html
https://codereview.qt-project.org/c/qt/qttools/+/501634
Old signature
```
cmake
qt_add_translations
(
[target]
TS_FILES file1.ts [file2.ts ...]
```
New signature
```
cmake
qt_add_translations
(
[target]
[TS_FILE_BASE name]
[TS_FILE_DIR directory]
[TS_FILES file1.ts [file2.ts ...]]
```
Documented.
Has example snippet.
No "since qt version" blurb for new options.
**Notes:**
**Action points:**
### `qt_add_translations` - Behavior change
Automatically determine the path of the native .ts file
If the
`TS_FILES`
argument is not passed to
`qt_add_translations`
, the path to the native .ts file is automatically
determined if
`QT_I18N_NATIVE_LANGUAGE`
variable is set.
https://doc-snapshots.qt.io/qt6-dev/qtlinguist-cmake-qt-add-translations.html
https://codereview.qt-project.org/c/qt/qttools/+/503733
Documented.
No example / comparison snippet.
No "since qt version" blurb for new options.
**Notes:**
**Action points:**
### `qt_add_lupdate` - New API options and behavior change
Add a way to specify the native language for i18n
https://doc-snapshots.qt.io/qt6-dev/qtlinguist-cmake-qt-add-translations.html
https://codereview.qt-project.org/c/qt/qttools/+/502121
Old signature
```
cmake
qt_add_lupdate
(
TS_FILES file1.ts [file2.ts ...]
```
New signature
```
cmake
qt_add_lupdate
(
TS_FILES file1.ts [file2.ts ...]
[NATIVE_TS_FILE file.ts]
```
Documented.
No example snippet.
No "since qt version" blurb for new options.
**Notes:**
**Action points:**
### Overall translations documentation page
We are missing a more general adding translations page after all the new API was added.
The most prominent CMake one is
https://doc-snapshots.qt.io/qt6-dev/cmake-get-started.html#adding-translations
which is quite short.
And the generic ones at
https://doc-snapshots.qt.io/qt6-dev/internationalization.html
https://doc-snapshots.qt.io/qt6-dev/localization.html
don't mention very much about build systems.
**Notes:**
**Action points:**
This diff is collapsed.
Click to expand it.
api_review_qt_6_7_part2.md
0 → 100644
View file @
fe8027d2
# Task and links
https://bugreports.qt.io/browse/QTBUG-121136
https://git.qt.io/alcroito/qt6-cmake-api-review/-/blob/master/api_review_qt_6_7.md
# Changes
## qbase
### `qt_standard_project_setup` - API Change and new variables
Add
`I18N_LANGUAGES`
keyword to
`qt_standard_project_setup`
.
Add
`I18N_NATIVE_LANGUAGE`
keyword to
`qt_standard_project_setup`
.
Added variable
`QT_I18N_LANGUAGES`
to specify the languages that are used for i18n in the project.
Added variable
`QT_I18N_NATIVE_LANGUAGE`
to specify the native language that is used in the source
code for translatable strings.
https://doc-snapshots.qt.io/qt6-dev/qt-standard-project-setup.html#synopsis
https://doc-snapshots.qt.io/qt6-dev/cmake-variable-qt-i18n-languages.html
https://doc-snapshots.qt.io/qt6-dev/cmake-variable-qt-i18n-native-language.html
https://codereview.qt-project.org/c/qt/qtbase/+/501500
https://codereview.qt-project.org/c/qt/qtbase/+/503262
Documented.
No example snippets, neither for options nor the variables.
There is an exmaple snippet in doc page of
`qt_add_translations`
, but there's no direct link back.
Has "since qt version" blurb.
**Notes:**
**Action points:**
## qttools
### `qt_add_lupdate` - New API option
Allow multiple calls of
`qt_add_lupdate`
.
Added
`[LUPDATE_TARGET target-name]`
option.
https://doc-snapshots.qt.io/qt6-dev/qtlinguist-cmake-qt-add-lupdate.html
https://codereview.qt-project.org/c/qt/qttools/+/495544
Documented.
No specific example snippet.
No "since qt version" blurb.
**Notes:**
**Action points:**
### `qt_add_lrelease` - New API options and changed option
Make the target argument of
`qt_add_lrelease`
optional.
Passing a target as the first argument to
`qt_add_lrelease`
was deprecated.
https://doc-snapshots.qt.io/qt6-dev/qtlinguist-cmake-qt-add-lrelease.html
https://codereview.qt-project.org/c/qt/qttools/+/496435
Old signature
```
cmake
qt_add_lrelease
(
target TS_FILES file1.ts [file2.ts ...]
[NO_TARGET_DEPENDENCY]
```
New signature
```
cmake
qt_add_lrelease
(
TS_FILES file1.ts [file2.ts ...]
[LRELEASE_TARGET target-name]
[EXCLUDE_FROM_ALL]
```
Documented.
No specific example snippet.
No "since qt version" blurb for new / changed options.
`NO_TARGET_DEPENDENCY`
disappeared from docs, not mentioned in deprecated section.
First
`target`
option that is now deprecated IS documented.
**Notes:**
**Action points:**
### `qt_add_lupdate` - New API options and changed option
Allow specifying multiple targets in
`qt_add_lupdate`
https://doc-snapshots.qt.io/qt6-dev/qtlinguist-cmake-qt-add-lupdate.html
https://codereview.qt-project.org/c/qt/qttools/+/495546
Old signature
```
cmake
qt_add_lupdate
(
target TS_FILES file1.ts [file2.ts ...]
```
New signature
```
cmake
qt_add_lupdate
(
TS_FILES file1.ts [file2.ts ...]
[TARGETS target1 [target2 ...]]
```
Documented.
No specific example snippet.
No "since qt version" blurb for new / changed options.
First
`target`
option that is now deprecated IS documented.
**Notes:**
**Action points:**
### `qt_collect_i18n_targets` - New API
Add
`qt_collect_i18n_targets`
, collects targets that are eligible for translation.
https://doc-snapshots.qt.io/qt6-dev/qtlinguist-cmake-qt-collect-targets-for-translation.html
https://codereview.qt-project.org/c/qt/qttools/+/496434
Signature
```
cmake
qt_collect_i18n_targets
(
out_var [DIRECTORY path]
)
```
Documented.
Has "since qt version" blurb.
Has example snippet.
**Notes:**
**Action points:**
### `QT_EXCLUDE_FROM_TRANSLATION` - New target and directory properties
Targets can be excluded from translation by setting the target property
`QT_EXCLUDE_FROM_TRANSLATION`
to TRUE
Targets below a certain directory can be excluded from translation by
setting the directory property
`QT_EXCLUDE_FROM_TRANSLATION`
to TRUE.
https://doc-snapshots.qt.io/qt6-dev/cmake-directory-property-qt-exclude-from-translation.html
https://doc-snapshots.qt.io/qt6-dev/cmake-target-property-qt-exclude-from-translation.html
https://codereview.qt-project.org/c/qt/qttools/+/496434
Documented.
Has "since qt version" blurb.
No example snippets.
**Notes:**
**Action points:**
### `QT_EXCLUDE_SOURCES_FROM_TRANSLATION` - New target property
Allow excluding target sources from i18n.
The target property
`QT_EXCLUDE_SOURCES_FROM_TRANSLATION`
was added to exclude source files of
a target from handling with lupdate.
https://doc-snapshots.qt.io/qt6-dev/cmake-target-property-qt-exclude-sources-from-translation.html
https://codereview.qt-project.org/c/qt/qttools/+/498913
Signature
```
cmake
set_property
(
TARGET myapp PROPERTY QT_EXCLUDE_SOURCES_FROM_TRANSLATION
untranslatable.cpp
3rdparty/*
)
```
Documented.
Has "since qt version" blurb.
Has example snippet.
**Notes:**
**Action points:**
### `qt_add_translations` - New API options and behavior change
Support project-wide i18n with
`qt_add_translations`
.
Gained the
`TARGETS`
argument to specify multiple targets that intend to load .qm files.
Gained the
`SOURCE_TARGETS`
argument to specify multiple targets that contain sources with
translatable strings.
If the first argument of
`qt_add_translations`
is a target, that target is not used
anymore for extracting translatable sources.
Now defers itself to the end of the scope of
`PROJECT_SOURCE_DIR`
if
`SOURCE_TARGETS`
is not given.
This behavior can be turned off by passing
`IMMEDIATE_CALL`
.
https://doc-snapshots.qt.io/qt6-dev/qtlinguist-cmake-qt-add-translations.html
https://codereview.qt-project.org/c/qt/qttools/+/498033
Old signature
```
cmake
qt_add_translations
(
target TS_FILES file1.ts [file2.ts ...]
```
New signature
```
cmake
qt_add_translations
(
[target]
[TARGETS target1 [target2...]]
[SOURCE_TARGETS target1 [target2...]]
TS_FILES file1.ts [file2.ts ...]
[IMMEDIATE_CALL]
)
```
Documented.
No
`IMMEDIATE_CALL`
example snippet.
Partial "since qt version" blurb for new / changed options.
**Notes:**
**Action points:**
### `qt_add_translations` - New API options and behavior change
Automatically determine
`.ts`
file names in
`qt_add_translations`
The
`TS_FILES`
argument of
`qt_add_translations`
is
optional now, and .ts file paths can be automatically determined after
setting the
`QT_I18N_LANGUAGES`
variable.
https://doc-snapshots.qt.io/qt6-dev/qtlinguist-cmake-qt-add-translations.html
https://codereview.qt-project.org/c/qt/qttools/+/501634
Old signature
```
cmake
qt_add_translations
(
[target]
TS_FILES file1.ts [file2.ts ...]
```
New signature
```
cmake
qt_add_translations
(
[target]
[TS_FILE_BASE name]
[TS_FILE_DIR directory]
[TS_FILES file1.ts [file2.ts ...]]
```
Documented.
Has example snippet.
No "since qt version" blurb for new options.
**Notes:**
**Action points:**
### `qt_add_translations` - Behavior change
Automatically determine the path of the native .ts file
If the
`TS_FILES`
argument is not passed to
`qt_add_translations`
, the path to the native .ts file is automatically
determined if
`QT_I18N_NATIVE_LANGUAGE`
variable is set.
https://doc-snapshots.qt.io/qt6-dev/qtlinguist-cmake-qt-add-translations.html
https://codereview.qt-project.org/c/qt/qttools/+/503733
Documented.
No example / comparison snippet.
No "since qt version" blurb for new options.
**Notes:**
**Action points:**
### `qt_add_lupdate` - New API options and behavior change
Add a way to specify the native language for i18n
https://doc-snapshots.qt.io/qt6-dev/qtlinguist-cmake-qt-add-translations.html
https://codereview.qt-project.org/c/qt/qttools/+/502121
Old signature
```
cmake
qt_add_lupdate
(
TS_FILES file1.ts [file2.ts ...]
```
New signature
```
cmake
qt_add_lupdate
(
TS_FILES file1.ts [file2.ts ...]
[NATIVE_TS_FILE file.ts]
```
Documented.
No example snippet.
No "since qt version" blurb for new options.
**Notes:**
**Action points:**
### Overall translations documentation page
We are missing a more general adding translations page after all the new API was added.
The most prominent CMake one is
https://doc-snapshots.qt.io/qt6-dev/cmake-get-started.html#adding-translations
which is quite short.
And the generic ones at
https://doc-snapshots.qt.io/qt6-dev/internationalization.html
https://doc-snapshots.qt.io/qt6-dev/localization.html
don't mention very much about build systems.
**Notes:**
**Action points:**
This diff is collapsed.
Click to expand it.
api_review_qt_6
.
8.md
→
api_review_qt_6
_
8.md
View file @
fe8027d2
File moved
This diff is collapsed.
Click to expand it.