// copy to clipboard aka X11 selection void KfindWindow::copySelection() { QDragObject *drag_obj = dragObject(); if(drag_obj) { QClipboard *cb = kapp->clipboard(); cb->setData(drag_obj); } }
void KClipboardSynchronizer::setClipboard(QMimeSource *data, QClipboard::Mode mode) { // qDebug("---> setting clipboard: %p", data); QClipboard *clip = QApplication::clipboard(); s_blocked = true; if(mode == QClipboard::Clipboard) { clip->setData(data, QClipboard::Clipboard); } else if(mode == QClipboard::Selection) { clip->setData(data, QClipboard::Selection); } s_blocked = false; }