-
Notifications
You must be signed in to change notification settings - Fork 180
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
QQmlListModel: emit dataChange signal when updating the translations
We can't really track the individual bindings. Updating all string fields is a blunt thing to do, but it always works and it's not worse than what we did before the translation binding optimization. Pick-to: 6.2 6.4 Fixes: QTBUG-107208 Change-Id: I96b86c979b3168f052af4685874741f674e3337f Reviewed-by: Fabian Kosmale <fabian.kosmale@qt.io>
- Loading branch information
Ulf Hermann
committed
Oct 11, 2022
1 parent
d11460f
commit 53fa870
Showing
4 changed files
with
65 additions
and
0 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
15 changes: 15 additions & 0 deletions
15
tests/auto/qml/qqmltranslation/data/translatedElements.qml
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,15 @@ | ||
import QtQml | ||
import QtQml.Models | ||
|
||
DelegateModel { | ||
model: ListModel { | ||
ListElement { dish: qsTr("soup"); price: 60 } | ||
ListElement { dish: qsTr("fish"); price: 100 } | ||
ListElement { dish: qsTr("meat"); price: 230 } | ||
ListElement { dish: qsTr("bread"); price: 10 } | ||
} | ||
|
||
delegate: QtObject { | ||
required property string dish | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters