App: [skip ci] move execution of extensions to its own method

This commit is contained in:
wmayer
2020-09-12 18:14:09 +02:00
parent 6c2c84df4f
commit 5394731dcc
2 changed files with 11 additions and 1 deletions

View File

@@ -113,7 +113,12 @@ App::DocumentObjectExecReturn *DocumentObject::recompute(void)
DocumentObjectExecReturn *DocumentObject::execute(void)
{
//call all extensions
return executeExtensions();
}
App::DocumentObjectExecReturn* DocumentObject::executeExtensions()
{
//execute extensions but stop on error
auto vector = getExtensionsDerivedFromType<App::DocumentObjectExtension>();
for(auto ext : vector) {
auto ret = ext->extensionExecute();

View File

@@ -567,6 +567,11 @@ protected:
*/
virtual App::DocumentObjectExecReturn *execute(void);
/**
* Executes the extensions of a document object.
*/
App::DocumentObjectExecReturn *executeExtensions();
/** Status bits of the document object
* The first 8 bits are used for the base system the rest can be used in
* descendent classes to mark special statuses on the objects.