Skip to content

Conversation

@jchv
Copy link
Contributor

@jchv jchv commented Aug 31, 2025

Qt::MidButton: This enum value was deprecated in Qt 4.8 and removed in Qt 6.x.
QFontMetrics::width: This function was deprecated in Qt 5.11 and removed in Qt 6.x.
QLayout::setMargin: This function was deprecated in Qt 4.3 (!) and removed in Qt 6.x.
QPalette::Background: This enum value was deprecated sometime in Qt 4.0 and removed in Qt 6.x.

There's still more clean-up that would be needed for Qt 6 support, including uses of QApplication::desktop() and QApplication::hasPendingEvents(). The former I think can move to QScreen APIs, the latter might require Hiro API changes (probably getting rid of Application::pendingEvents; nothing outside of Hiro seems to need it anyway.)

This enum was deprecated in Qt 4.8 and removed in Qt 6.0.
@jchv jchv changed the title hiro/qt: Update deprecated MidButton enumeration hiro/qt: Update deprecated MidButton enumeration value usage Sep 1, 2025
@jchv jchv changed the title hiro/qt: Update deprecated MidButton enumeration value usage hiro/qt: Fixes for trivial Qt 5 deprecations Sep 1, 2025
jchv added 3 commits September 1, 2025 03:32
QFontMetrics::width was deprecated in Qt 5.11 in favor of Qt
QFontMetrics::horizontalAdvance. Because QFontMetrics::horizontalAdvance
was introduced in Qt 5.11, it poses the most risk of breaking an
existing user of almost any of the deprecation changes, but Qt 5.11 is
fairly old by now (2018) and has been EOL for a while, so I still opted
to just move to the new function rather than use a version guard.
setMargin has been obsolete since Qt 4.3!
@jchv jchv mentioned this pull request Sep 1, 2025
@Screwtapello Screwtapello merged commit a4f0b47 into bsnes-emu:master Sep 1, 2025
4 of 5 checks passed
@jchv jchv deleted the hiro-qt-deprecated-mid-button branch September 2, 2025 00:28
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