-
Notifications
You must be signed in to change notification settings - Fork 56
Refactor: comment for MODMESH_PYSIDE6_FULL macro #592
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
base: master
Are you sure you want to change the base?
Conversation
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Thank you, it is a good implementation. But building with PySide6 became a requirement since 2023 (see issue #220). Now it is not making sense to offer a build option to turn it off.
It would make sense to explicitly say that we require PySide6 in the code base. Maybe a cmakelists.txt could be an option.
ad81e22 to
f9b1225
Compare
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
The cpp macro MODMESH_USE_PYSIDE is a better place for the comment. Sorry for giving a contradicting comment previously.
CMakeLists.txt
Outdated
| option(BUILD_QT "build with QT" ON) | ||
| message(STATUS "BUILD_QT: ${BUILD_QT}") | ||
|
|
||
| # PySide6 is required since 2023 (see issue #220) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Could you please add the full issue URL?
CMakeLists.txt
Outdated
|
|
||
| include_directories(${MODMESH_INCLUDE_DIR}) | ||
|
|
||
| # PySide6 is mandatory - always enabled |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Since we really have a cpp macro MODMESH_USE_PYSIDE, it will be more explicit to add the link to the old PYSIDE-on-by-default issue there.
I thought cmakelists.txt could be a good place for the comment but I was wrong. My apologies.
f9b1225 to
5a0fed0
Compare
|
This is where a CPP macro of using PYSIDE is used: modmesh/cpp/modmesh/pilot/wrap_pilot.cpp Line 39 in e3cdb4e
It is not named like |
5a0fed0 to
eae7d24
Compare
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
The comment in wrap_pilot.cpp will work the best. Please revert the change in other files.
eae7d24 to
9424ac1
Compare
|
@yungyuc Ready for review, made some changes |
CMakeLists.txt
Outdated
| include_directories(${MODMESH_INCLUDE_DIR}) | ||
|
|
||
| # PySide6 is required since 2023 (see issue https://github.com/solvcon/modmesh/issues/220) | ||
| add_compile_definitions(MODMESH_USE_PYSIDE) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This comment duplicates with that in the source code.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
After discussion, I removed the compile definitions for MODMESH_USE_PYSIDE and comment
refactor: remove the switch refactor: comments refactor: update the comment for the PySide6 Change the comment line and remove msg remove unnecesary code
9424ac1 to
b3dece6
Compare
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Keep both old and new comments.
| #include <QMenu> | ||
|
|
||
| // Usually MODMESH_PYSIDE6_FULL is not defined unless for debugging. | ||
| // PySide6 is required since 2023 (see issue https://github.com/solvcon/modmesh/issues/220) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
The old comment should be kept. It should read like:
// PySide6 is required since 2023 (see issue https://github.com/solvcon/modmesh/issues/220)
// Usually MODMESH_PYSIDE6_FULL is not defined unless for debugging.
No description provided.