diff options
author | Giuseppe D'Angelo <giuseppe.dangelo@kdab.com> | 2022-03-21 17:28:55 +0100 |
---|---|---|
committer | Giuseppe D'Angelo <giuseppe.dangelo@kdab.com> | 2022-05-16 09:46:27 +0200 |
commit | 53ee4c8b1f7ae72e7005166e1c0dbc4659f2ab32 (patch) | |
tree | ddf2a96d2945be8039a81beb50f723d547ff26d9 /src/android/java/src/org/qtproject/qt/android/bindings/QtActivity.java | |
parent | 5d8f815e101da3ae9cd6a666cc097853f52b21da (diff) |
Item widgets: clean up treatment of Qt::TextAlignmentRole / CheckStateRole
The item widgets all have an API flaw: getters and setters for the text
alignment deal with int instead of Qt::Alignment.
Deprecate the existing setters and introduce others taking
Qt::Alignment. Store the alignment directly into the item widget (now
that views know how to handle it).
We can't change the getters without cluttering the API, so make that a
Qt 7 change. Users can prepare by forcibly casting the return value to
Qt::Alignment; this is going to work in Qt 6 and 7.
While at it: streamline the handling of Qt::CheckStateRole as well,
avoiding to rely on a pointless Qt::CheckState to int conversion
through QVariant (the setter stores a Qt::CheckState, but the getter
retrieves an int and converts it to a Qt::CheckState).
Task-number: QTBUG-75172
Change-Id: I9f29e818e93cb2dc1d8e042bc320162c2f692112
Reviewed-by: Qt CI Bot <qt_ci_bot@qt-project.org>
Reviewed-by: Volker Hilsheimer <volker.hilsheimer@qt.io>
Diffstat (limited to 'src/android/java/src/org/qtproject/qt/android/bindings/QtActivity.java')
0 files changed, 0 insertions, 0 deletions