I have very similar bug to
QTBUG-31069 but on Linux.
What I do..
I have overrriden QTextEdit::insertFromMimeData and from its handler I do
data->hasImage() always reports true when I copied an image. but the `img` variable is usually always null.
For example if I copy an image to the clipboard and start pressing ctrl+v repeatedy then likely only once of 10 times img won't be null.
If I insert to some other app like Gimp it's always inserted properly.
Formats reported by mimedata for every insert attempts (no difference when succeed)