Skip to content

Conversation

@jcfr
Copy link
Contributor

@jcfr jcfr commented Sep 1, 2025

Starting with Qt 5.15, the qrand function has been deprecated in favor of QRandomGenerator. This change updates PythonQtStdDecorators.h to use QRandomGenerator when building against Qt 5.15 or later.

See qt/qtbase@b3c0e9afa ("Deprecate qrand/qsrand", 2001-09-17)


Note

For reference, those patches were developed in the context of the commontk/PythonQt fork.

Cherry picked from commits commontk/PythonQt@c1579e2

Starting with Qt 5.15, the `qrand` function has been deprecated in favor of
`QRandomGenerator`. This change updates `PythonQtStdDecorators.h` to use
`QRandomGenerator` when building against Qt 5.15 or later.
See qt/qtbase@b3c0e9afa ("Deprecate qrand/qsrand", 2001-09-17)

(cherry picked from commit commontk/PythonQt@c1579e2)
@jcfr jcfr force-pushed the backport-commontk/fix-qt5.15-qrand-deprecation branch from 6ad25bf to 24cf679 Compare September 1, 2025 04:18
Copy link
Contributor

@mrbean-bremen mrbean-bremen left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks!

@mrbean-bremen mrbean-bremen merged commit 55ee2b4 into MeVisLab:master Sep 1, 2025
19 checks passed
@jcfr jcfr deleted the backport-commontk/fix-qt5.15-qrand-deprecation branch October 2, 2025 15:16
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