Rework triple click multi paste avoidance
This fixes a memory leak and, frankly, speculative cases where double-click selected text that shouldn't be copied, is copied. - don't leak QMimeData in case it isn't eventually submitted to the clipboard - don't even create it - get rid of the separate flag for pending double-click copy text, just check if the paste text is empty - Consolidate the two QTimers started after a double click. QTimer has some guarantees about order of starting and order of triggering of timers, but it's more obvious to just do things from one timer. Also slightly more efficient. - Always cancel double-click paste if any other paste happens before the timeout - add code to that effect in the most generic copying code paths. I'm not quite sure if all possible cases work correctly now. Many things can happen with all the selection modes supported + all the possible user input events.
parent
dc526379
Please register or sign in to comment