Base: Use explicit pointer syntax for freecad_cast (#20694)

* Base: Use explicit pointer syntax for freecad_cast

This aligns our custom cast with other casts

* All: Use explicit pointer syntax for freecad_cast
This commit is contained in:
Kacper Donat
2025-04-11 16:11:33 +02:00
committed by GitHub
parent 581fa12e45
commit b300c80b90
73 changed files with 305 additions and 304 deletions

View File

@@ -272,7 +272,7 @@ void DlgPropertyLink::init(const App::DocumentObjectT& prop, bool tryFilter)
ui->searchBox->setDocumentObject(owner);
auto propLink = freecad_cast<App::PropertyLinkBase>(objProp.getProperty());
auto propLink = freecad_cast<App::PropertyLinkBase*>(objProp.getProperty());
if (!propLink) {
return;
}
@@ -580,7 +580,7 @@ void DlgPropertyLink::onItemSelectionChanged()
focus = ui->treeWidget->hasFocus();
auto doc = Gui::Application::Instance->getDocument(sobjs.front().getDocumentName().c_str());
if (doc) {
auto vp = freecad_cast<Gui::ViewProviderDocumentObject>(
auto vp = freecad_cast<Gui::ViewProviderDocumentObject*>(
doc->getViewProvider(obj));
if (vp) {
// If the view provider uses a special window for rendering, switch to it
@@ -1016,7 +1016,7 @@ QTreeWidgetItem* DlgPropertyLink::createItem(App::DocumentObject* obj, QTreeWidg
return nullptr;
}
auto vp = freecad_cast<ViewProviderDocumentObject>(
auto vp = freecad_cast<ViewProviderDocumentObject*>(
Application::Instance->getViewProvider(obj));
if (!vp) {
return nullptr;
@@ -1047,7 +1047,7 @@ QTreeWidgetItem* DlgPropertyLink::createItem(App::DocumentObject* obj, QTreeWidg
QByteArray proxyType;
auto prop =
freecad_cast<App::PropertyPythonObject>(obj->getPropertyByName("Proxy"));
freecad_cast<App::PropertyPythonObject*>(obj->getPropertyByName("Proxy"));
if (prop) {
Base::PyGILStateLocker lock;
Py::Object proxy = prop->getValue();