Skip to content

refactor: Remove usage of QT_IMPLICIT_QCHAR_CONSTRUCTION#1058

Merged
kaamui merged 2 commits into
OpenBoard-org:devfrom
Vekhir:keybt-type-conversion
Sep 4, 2024
Merged

refactor: Remove usage of QT_IMPLICIT_QCHAR_CONSTRUCTION#1058
kaamui merged 2 commits into
OpenBoard-org:devfrom
Vekhir:keybt-type-conversion

Conversation

@Vekhir
Copy link
Copy Markdown
Contributor

@Vekhir Vekhir commented Aug 18, 2024

Since Qt 6.0, the macro QT_IMPLICIT_QCHAR_CONSTRUCTION was necessary to allow implicit conversion from int to QChar. Qt 6.8 removes this macro, making the default behaviour mandatory, i.e. call the QChar constructor with an int to get a QChar.

This affects Linux and Windows who make use of this macro; removing the macro reverts to the default since 6.0, so this change is fully backwards compatible.
Qt5 never had the macro (it was introduced to ease the transition from Qt5 to Qt6), therefore nothing changes there either.

Tested on Arch Linux with Qt 6.7.2, 6.8beta3, and 5.15.14.

Fixes #1055

Vekhir added 2 commits August 18, 2024 16:19
The macro `QT_IMPLICIT_QCHAR_CONSTRUCTION` allows converting an
integer into a QChar.
Starting with 6.0, the default behaviour of Qt is to only allow
constructing a QChar from an integer explicitly, but until 6.8,
above macro allowed the implicit conversion. Qt 6.8 removes the
macro, requiring explicitly calling a QChar constructor when
creating a QChar from an integer.
The macro `QT_IMPLICIT_QCHAR_CONSTRUCTION` allows converting an
integer into a QChar.
Starting with 6.0, the default behaviour of Qt is to only allow
constructing a QChar from an integer explicitly, but until 6.8,
above macro allowed the implicit conversion. Qt 6.8 removes the
macro, requiring explicitly calling a QChar constructor when
creating a QChar from an integer.
@kaamui kaamui merged commit b7cc47b into OpenBoard-org:dev Sep 4, 2024
@Vekhir Vekhir deleted the keybt-type-conversion branch September 4, 2024 12:26
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants