// Handle drops. void QsciScintillaBase::dropEvent(QDropEvent *e) { bool moving; int len; const char *s; bool rectangular; acceptAction(e); if (!e->isAccepted()) return; moving = (e->dropAction() == Qt::MoveAction); QByteArray text = fromMimeData(e->mimeData(), rectangular); len = text.length(); s = text.data(); std::string dest = QSCI_SCI_NAMESPACE(Document)::TransformLineEnds(s, len, sci->pdoc->eolMode); sci->DropAt(sci->posDrop, dest.c_str(), dest.length(), moving, rectangular); sci->Redraw(); }
// Handle drops. void QsciScintillaBase::dropEvent(QDropEvent *e) { bool moving; const char *s; acceptAction(e); if (!e->isAccepted()) return; moving = (e->dropAction() == Qt::MoveAction); QString qs = fromMimeData(e->mimeData()); QByteArray ba; if (sci->IsUnicodeMode()) ba = qs.toUtf8(); else ba = qs.toLatin1(); s = ba.data(); sci->DropAt(sci->posDrop, s, moving, false); sci->Redraw(); }
// Handle drops. void QsciScintillaBase::dropEvent(QDropEvent *e) { bool moving; const char *s; bool rectangular; acceptAction(e); if (!e->isAccepted()) return; moving = (e->dropAction() == Qt::MoveAction); QByteArray ba = fromMimeData(e->mimeData(), rectangular); s = ba.data(); sci->DropAt(sci->posDrop, s, moving, rectangular); sci->Redraw(); }