Paste special

David Faure faure at kde.org
Tue Sep 18 17:04:39 BST 2007


On Tuesday 18 September 2007, Jaroslaw Staniek wrote:
> David Faure said the following, On 2007-09-18 01:08:
> 
> > Jaroslaw wrote:
> >> For those worried about performance: this is of course designed for small chunks of data, larger 
> >> portions can be handled by DDE-like "on demand" operations. I wish I could 
> >> show this in action ad KDE level.
> > Yes. What you're describing is exactly how QMimeData works, so no problem there :)
> 
> Do you mean QMimeData::retrieveData() ;) ?
> If so, do you know any implementation using it, with constant time/memory cost 
> of copying?
> I am asking because by "on demand" term above I mean that the data provider 
> only formats and sends the data when the receiver requests it (unlike with 
> typical copying of, say, rich text).

Right. We can't implement retrieveData by digging into the application's memory structures
because the application data might have changed between the time of the copy and the
time of the paste, so we need to make a copy of the data, still. But usually in only one format,
and retrieveData can convert it to other formats.

-- 
David Faure, faure at kde.org, sponsored by Trolltech to work on KDE,
Konqueror (http://www.konqueror.org), and KOffice (http://www.koffice.org).




More information about the kde-core-devel mailing list