Details
-
Bug
-
Resolution: Done
-
P2: Important
-
5.7.0
-
None
-
Linux Mint 17 (Mate)
Linux Mint 18 (Mate)
Arch Linux (Gnome 3)
-
730cbad8824bcfcb7ab60371a6563cfb6dd5658d (qt/qtbase/5.12)
Description
There must be a bug either in QClipboard or QMimeData, as the following line
QApplication::clipboard()->mimeData()->data("text/plain");
takes ridiculously a lot of time (>100ms when just a single text line, roughly 20 characters, is in the clipboard).
I've uploaded an example project (just 3 files: main.cpp, QClipboardListener.h and QClipboardTest.pro). After building, run the application in a terminal, copy something into the clipboard and check the application output in the terminal, where it prints the time elapsed.
This very same bug is present in software that uses Qt 5 such as Telegram Desktop, where you can experience how the entire UI stalls when you paste an image with Ctrl+V. I've seen the UI blocked for longer than 10 seconds when the image size is 1920x1080.
Related to: https://bugreports.qt.io/browse/QTBUG-43497