Core: modernize type checking

This commit is contained in:
Florian Foinant-Willig
2023-10-15 21:38:48 +02:00
parent 6d8fb68f3b
commit 773c701eec
31 changed files with 110 additions and 110 deletions

View File

@@ -125,7 +125,7 @@ void TaskImage::initialiseTransparency()
// NOLINTBEGIN
auto vp = Application::Instance->getViewProvider(feature.get());
App::Property* prop = vp->getPropertyByName("Transparency");
if (prop && prop->getTypeId().isDerivedFrom(App::PropertyInteger::getClassTypeId())) {
if (prop && prop->isDerivedFrom<App::PropertyInteger>()) {
auto Transparency = static_cast<App::PropertyInteger*>(prop);
ui->spinBoxTransparency->setValue(Transparency->getValue());
ui->sliderTransparency->setValue(Transparency->getValue());