Paste is exception

Discussion forum for contributors and developers who are using the QCAD ECMAScript development platform or the C++ plugin interface or who are otherwise looking to contribute to QCAD (translations, documentation, etc).

Moderator: andrew

Post Reply
Active Member
Posts: 33
Joined: Thu Jan 14, 2016 4:17 am

Paste is exception

Post by liguosheng » Sat Mar 26, 2016 10:30 am

the actions of copy and cut are ok, when i paste the elentities by using the following code:
RPasteOperation *op = new RPasteOperation(getDocument()->getClipboard());
finally, the class of Rdocumentinterface is used to apply the operation by the following:
getDocumentInterface()->previewOperation(op);// it's preview

but there's a exception, when i debug it step by step, the exception happen to the following function:
RS::Unit RStorage::getUnit() const {
QSharedPointer<RDocumentVariables> v = queryDocumentVariablesDirect(); // exception happen
if (v.isNull()) {
return RS::None;
return v->getUnit();


Post Reply

Return to “QCAD Developers and Contributors”