-
-
Notifications
You must be signed in to change notification settings - Fork 153
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
PR: Use static calls of exec_
elsewhere where needed, and test them
#422
PR: Use static calls of exec_
elsewhere where needed, and test them
#422
Conversation
The mistake of mine was in the following lines: QtCore.QTimer.singleShot(100, lambda: qtbot.keyClick(
QtWidgets.QApplication.widgetAt(1, 1),
QtCore.Qt.Key.Key_Escape)
# namely, ↑↑↑ up here
) In As I don't use Windows, and the problem appears only on Windows, I couldn't catch the problem locally. The third time's a charm. |
Thanks, I opened #423 to document that. |
QMenu.exec_
callQMenu.exec_
call
(Fixed the |
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.
Sorry, didn't realize I hadn't actually reviewed this.
If it might be used in multiple modules, maybe better to move _possibly_static_exec
to utils
? Thoughts?
Beyond that, I didn't spot any obvious blocking issues with this, so otherwise leaving this to @dalthviz 's expertise to review further.
Co-authored-by: C.A.M. Gerlach <CAM.Gerlach@Gerlach.CAM>
I've looked through
and found that As for |
Thanks a lot! That's a marvelous solution! |
Surprisingly, the tests for |
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.
Thanks! All looks pretty reasonable to me now, but I'll leave it to @dalthviz 's greater expertise to review further, thanks.
QMenu.exec_
callexec_
elsewhere where needed, and test them
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.
Thanks @StSav012 ! LGTM 👍 But, just in case, what do you think @ccordoba12 ?
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.
Thanks @StSav012!
The help for
QMenu.exec_
reads something like the following (the order might be different, and fully qualified Qt class names might appear):The first option here is a static call to
QMenu.exec_
. In the QtPy tests, such a call is never tested. So, here it is. As one might expect, it fails. Use the_possibly_static_exec
function to fix the errors.