Closed Hartmnt closed 4 weeks ago
Why use a timer that starts immediately? I'm assuming it's to wait for the constructor to return, but I don't see any reason to do that.
Why use a timer that starts immediately? I'm assuming it's to wait for the constructor to return, but I don't see any reason to do that.
That's simple: The move does not work, if it happens immediately. I have no idea what Qt is doing, but I guess this whole thing is simply so buggy because the QDialog
here is used exclusively in a QStandarditemEditorCreator
as the "edit method" of the shortcut item delegate thingy...
Why use a timer that starts immediately? I'm assuming it's to wait for the constructor to return, but I don't see any reason to do that.
I tested this again for good measure: Without the timer the move has no effect. I fully blame Qt for this behavior.
The only issue I can see is that
effectiveParent
could have been deleted at the tine the lambda is called. However, I would consider this highly unlikely, given the context and I also don't know of a good way of working around that issue. In peiciple we'd have to associate the timer witheffectiveParent
in order to prevent Qt from executing our code in case the object has been deleted. Not sure if that's possible though.
Fixed by calculating the position before the timer :)
I fully blame Qt for this behavior.
Yeah - my experience has also been that the current cycle in the event loop has to be completed before a newly created widget can be interacted with properly :shrug:
Status | Branch | Result |
---|---|---|
✅ | 1.5.x |
Please refer to the Backport tool documentation and see the Github Action logs for details
Makes sense. There should be no issues in regards to the timer because it is executed by the event loop and thus should be guaranteed to trigger only after the previous entries in the queue are processed.
This commit makes the shortcut configuration dialog a modal window. It also explicitly searches for a parent QDialog, such that the window can be centered over the Mumble application instead of randomly out of bounds of the screen. (This is most likely only necessary because of a bug in Qt, but Qt is a pain to debug)
Fixes #5024