The copy function is OK before input any Chinese (I am using ibus). Output from console when the issue happens: QClipboard::setData: Cannot set X11 selection owner for PRIMARY QClipboard::setData: Cannot set X11 selection owner for CLIPBOARD Reproducible: Always Steps to Reproduce: 1.Open a Qt application (qstardict, for instance) 2.Input some Chinese (I am using ibus) 3.Try to copy something from app Actual Results: Nothing copied to clipboard QClipboard::setData: Cannot set X11 selection owner for PRIMARY QClipboard::setData: Cannot set X11 selection owner for CLIPBOARD
> > Steps to Reproduce: > 1.Open a Qt application (qstardict, for instance) I use konsole and konqueror > 2.Input some Chinese (I am using ibus) German and english works too > 3.Try to copy something from app > > Actual Results: > Nothing copied to clipboard > QClipboard::setData: Cannot set X11 selection owner for PRIMARY > QClipboard::setData: Cannot set X11 selection owner for CLIPBOARD > Same problem. 1. I found a solution from 2004 for Qt 3.3.3 that proposes to remove an unnecessary clipboard::clear call. Maybe this is the same error, made again? 2. This error happens only after some working in my environment, i.e. when I close all konsole windows and restart them I have clipboard access again. Somehow this seems to be connected with tabbed browsing in konqueror or konqueror in general.
*** Bug 276669 has been marked as a duplicate of this bug. ***
This problem should be fixed already in the Qt 4.5 branch and will be available in the next version of Qt (4.5.3 and 4.6.0). The source of the problem is not in Qt however - one of the received XEvents from XIM contains junk in a serial number and timestamp fields. Here is the change that fixes it (should be publicly available soon): http://qt.gitorious.org/qt/qt/commit/9e5fa633913ef952ca4ef5312fe396bcfc885321
I just committed qt-gui-4.5.2-r2 which applies the upstream patch - thanks Denis!