BUG: Remove deprecated Qt6 paradigms#270
Conversation
Replace with backward compatible recommended or preprocessor conditional for old and new. Use new paradigms that are backward compatible when possible. Use preprocessor conditionals where the syntax is different between qt5 and qt6.
| #if QT_VERSION >= QT_VERSION_CHECK(6, 0, 0) | ||
| _metaTypeId = QMetaType::fromName(classname).id(); | ||
| #else | ||
| _metaTypeId = QMetaType::type(classname); | ||
| #endif |
There was a problem hiding this comment.
Thanks - could you move this into PythonQtUtils.h, together with the other version specific stuff? That would avoid cluttering the code with too many #ifdefs. Same for the other places.
There was a problem hiding this comment.
I don't understand your request. I'm unsure how to move this definition from the source code to the header file while keeping the compilation unit separate from the declaration.
There was a problem hiding this comment.
I mean adding a convenience function (something like metaTypeIdFromClassName) that encapsulates the #ifdefs, like the rest of the functions in that namespace that are defined inline (I guess, for performance reasons).
|
This pull request should be closed. It is superseded by: |
|
Closing as suggested. Thanks @hjmjohnson! |
Replace with backward compatible recommended or
preprocessor conditional for old and new.
Use new paradigms that are backward compatible
when possible.
Use preprocessor conditionals where the syntax
is different between qt5 and qt6.