<div dir="ltr"><br><div class="gmail_extra"><br><div class="gmail_quote">On 28 September 2015 at 19:31, Jonathon Jongsma <span dir="ltr"><<a href="mailto:jjongsma@redhat.com" target="_blank">jjongsma@redhat.com</a>></span> wrote:<br><blockquote class="gmail_quote" style="margin:0px 0px 0px 0.8ex;border-left:1px solid rgb(204,204,204);padding-left:1ex"><div class=""><div class="h5">...<br>
> (1)<br>
> <a href="https://github.com/F1ash/qt-virt-manager/blob/master/src/vm_viewer/qspice_widgets/qspicemainchannel.cpp#L157-L179" rel="noreferrer" target="_blank">https://github.com/F1ash/qt-virt-manager/blob/master/src/vm_viewer/qspice_widgets/qspicemainchannel.cpp#L157-L179</a><br>
> after the try to execute this method application crashed...<br>
<br>
</div></div>The documentation on this method is not clear, but the 'sources'<br>
parameter to spice_main_file_copy_async() should be a NULL-terminated<br>
array of GFile objects. If your array is not null-terminated, it's<br>
possible that you could get the error that you reported.<br>
...<span class=""><br>
<br>
> (2)<br>
> <a href="https://github.com/F1ash/qt-virt-manager/blob/master/src/vm_viewer/qspice_widgets/qspicemainchannel.cpp#L129-L146" rel="noreferrer" target="_blank">https://github.com/F1ash/qt-virt-manager/blob/master/src/vm_viewer/qspice_widgets/qspicemainchannel.cpp#L129-L146</a><br>
> after the try to execute this method host clipboard (text)<br>
> data not received by guest clipboard. In virt-viewer this<br>
> action is successful.<br>
<br>
<br>
</span>I didn't see anything obvious after a quick look at your function source<br>
(although I think you could simply pass _data.toUtf8().data() to that<br>
function instead of allocating and copying it to a new 'buff' variable).<br>
If it's not working, I'm pretty sure the bug must be in your code<br>
though, since spice_main_clipboard_selection_notify() works fine for<br>
others.<br>
<span class=""><font color="#888888"><br>
Jonathon<br>
<br>
<br>
</font></span></blockquote></div>Hi!<br></div><div class="gmail_extra">in (1) case NULL-terminated array of GFile* is fixed the problem.<br></div><div class="gmail_extra">But with (2) case simplify the code have not good result. More,<br></div><div class="gmail_extra">even call method as:<br></div><div class="gmail_extra"><code><br>    spice_main_clipboard_selection_notify(<br>                (SpiceMainChannel *) gobject,<br>                VD_AGENT_CLIPBOARD_SELECTION_CLIPBOARD,<br>                VD_AGENT_CLIPBOARD_UTF8_TEXT,<br>                (const guchar*)"1234567890",<br>                10);<br></code><br></div><div class="gmail_extra">not successful. And this is a very strange. Maybe to use this method need to do some usage order?<br></div></div>