[FEM] remove more superfluous nullptr checks

This commit is contained in:
Uwe
2022-07-18 02:34:57 +02:00
parent 24468b59ad
commit f467451ae3
9 changed files with 16 additions and 16 deletions

View File

@@ -502,25 +502,25 @@ void ViewProviderFemConstraint::checkForWizard()
wizardWidget= nullptr;
wizardSubLayout = nullptr;
Gui::MainWindow* mw = Gui::getMainWindow();
if (mw == nullptr)
if (!mw)
return;
QDockWidget* dw = mw->findChild<QDockWidget*>(QString::fromLatin1("Combo View"));
if (dw == nullptr)
if (!dw)
return;
QWidget* cw = dw->findChild<QWidget*>(QString::fromLatin1("Combo View"));
if (cw == nullptr)
if (!cw)
return;
QTabWidget* tw = cw->findChild<QTabWidget*>(QString::fromLatin1("combiTab"));
if (tw == nullptr)
if (!tw)
return;
QStackedWidget* sw = tw->findChild<QStackedWidget*>(QString::fromLatin1("qt_tabwidget_stackedwidget"));
if (sw == nullptr)
if (!sw)
return;
QScrollArea* sa = sw->findChild<QScrollArea*>();
if (sa== nullptr)
if (!sa)
return;
QWidget* wd = sa->widget(); // This is the reason why we cannot use findChildByName() right away!!!
if (wd == nullptr)
if (!wd)
return;
QObject* wiz = findChildByName(wd, QString::fromLatin1("ShaftWizard"));
if (wiz) {