Join GitHub today
GitHub is home to over 28 million developers working together to host and review code, manage projects, and build software together.Sign up
qtutils: use the proper clicked signal instead of pressed #715
left a comment
There's actually a very good reason why we use clicked, not that we can't use pressed, but what this MR does is insufficient. The use of
This MR breaks multi-version Qt compat where the
In older Qt4, the argument was not provided unless you explicitly
In Qt5, the bool argument is provided when using the bareword signal, so the code needs to accommodate both signatures.
The full solution is to change this is to add a
Then you don't need the "takes care of argument mismatch" stuff, and it makes sure that we're not breaking dozens of other callsites that may or may not be prepared to deal with a change in signature.
Sorry for the naive patch.
What I do know is that using GUI apps which react immediately on button pressed event hurts the brain. Feels like my mouse is broken... or is it my brain...
I definitely think we should not sacrifice the quality of user experience for a simple API signature change.
So with the provided suggestion about the
Sweet, thanks for the careful attention to these usability issues, I believe these changes will be well received all around, and wholly agree that user experience is more important than code simplicity.
In case it helps, here's roughly what I was describing (I guess this is where I should have added a comment about the previous choice)
Looking forward to it, and thanks again!