forked from qt-creator/qt-creator
QmlDesigner: Avoid throwing in the destructor of transactions
Since C++11 destructors do not throw by default. Change-Id: Ic6403704587999464011fcaa1f9ac7df3e4ee49d Reviewed-by: Tim Jenssen <tim.jenssen@qt.io>
This commit is contained in:
@@ -373,6 +373,7 @@ void DesignDocument::deleteSelected()
|
||||
QmlObjectNode(node).destroy();
|
||||
}
|
||||
|
||||
transaction.commit();
|
||||
} catch (const RewritingException &e) {
|
||||
e.showException();
|
||||
}
|
||||
@@ -536,6 +537,7 @@ void DesignDocument::paste()
|
||||
}
|
||||
|
||||
view.setSelectedModelNodes(pastedNodeList);
|
||||
transaction.commit();
|
||||
} catch (const RewritingException &e) {
|
||||
qWarning() << e.description(); //silent error
|
||||
}
|
||||
@@ -574,6 +576,7 @@ void DesignDocument::paste()
|
||||
NodeMetaInfo::clearCache();
|
||||
|
||||
view.setSelectedModelNodes(QList<ModelNode>() << pastedNode);
|
||||
transaction.commit();
|
||||
} catch (const RewritingException &e) {
|
||||
qWarning() << e.description(); //silent error
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user