Details
-
Bug
-
Resolution: Out of scope
-
Not Evaluated
-
None
-
5.2.1
-
None
-
Windows
-
Improve error msgs: 817fe67839154e43998df2f459becf5e08fa5b8b (stable, 25.4.2014, 5.3.1)
Description
My Qt appliactions fails to copy selected text from QLineEdit when C++/CLR library is linked.
If it is linked, but zero calls is invoked from it, everything works OK!
Otherwise, by clicking Ctr+C I get error message in Application Output (QtCreator) like this:
OleSetClipboard: Failed to set mime data (text/plain) on clipboard: CO_E_NOTINITIALIZED ()
Selected text is not copied into clipboard.
To demonstrate this, I've prepared small test suite, see attachment.
Firstly, compile "dummy_clr_lib" C++/CLR project using Visual Studio 2010 Express (I do not know if version actually has affect in any way) in release mode, so release/dummy_clr_lib.lib will appear.
Next, compile "clipboard-test" Qt project, that links to mentioned library.
Run it in QtCreator/Visual Studio, so Applicaiton Output is visible.
Select text in line edit, press Ctrl+C - "CO_E_NOTINITIALIZED" error should be printed in output.
To disable this effect, comment-out this line in MainWindow.cpp:
dummyCppClrCall();
...and copying to clipboard should now work.
So, it needs at least one C++/CLR call to break something...
I've selected "Core: Plugins" component because this error (looks like) originates from Windows platform plugin.
Attachments
Issue Links
- relates to
-
QTBUG-25318 Windows: Suggest to implement fallback for clipboard (text) should OleInitialize fail due to different COM thread apartment mode or similar
- Reported
-
QTBUG-40632 CoInitializeEx in QApplication restricts further CoInitializeEx
- Reported
-
QTBUG-38670 Use new, more reliable Windows API for clipboard change notifications
- Closed