Manual changes to improve isDerivedFrom usage

This commit is contained in:
Benjamin Nauck
2025-01-16 23:37:04 +01:00
parent 02c8bfff69
commit 97bf3c5e33
12 changed files with 43 additions and 97 deletions

View File

@@ -575,15 +575,10 @@ const Document* DocumentModel::getDocument(const QModelIndex& index) const
bool DocumentModel::isPropertyLink(const App::Property& prop) const
{
if (prop.isDerivedFrom(App::PropertyLink::getClassTypeId()))
return true;
if (prop.isDerivedFrom(App::PropertyLinkSub::getClassTypeId()))
return true;
if (prop.isDerivedFrom(App::PropertyLinkList::getClassTypeId()))
return true;
if (prop.isDerivedFrom(App::PropertyLinkSubList::getClassTypeId()))
return true;
return false;
return prop.isDerivedFrom<App::PropertyLink>()
|| prop.isDerivedFrom<App::PropertyLinkSub>()
|| prop.isDerivedFrom<App::PropertyLinkList>()
|| prop.isDerivedFrom<App::PropertyLinkSubList>();
}
std::vector<ViewProviderDocumentObject*>