TD: modernize C++11

* use nullptr
This commit is contained in:
wmayer
2022-03-23 19:07:44 +01:00
parent d1d4b996e7
commit e8f9c8a1d3
146 changed files with 320 additions and 320 deletions

View File

@@ -436,7 +436,7 @@ const char * TaskProjGroup::viewChkIndexToCStr(int index)
// First Angle: FBRight B FBL
// Right F L Rear
// FTRight T FTL
assert (multiView != NULL);
assert (multiView != nullptr);
bool thirdAngle = multiView->usedProjectionType().isValue("Third Angle");
switch(index) {
@@ -450,12 +450,12 @@ const char * TaskProjGroup::viewChkIndexToCStr(int index)
case 7: return (thirdAngle ? "FrontBottomLeft" : "FrontTopRight");
case 8: return (thirdAngle ? "Bottom" : "Top");
case 9: return (thirdAngle ? "FrontBottomRight" : "FrontTopLeft");
default: return NULL;
default: return nullptr;
}
}
void TaskProjGroup::setupViewCheckboxes(bool addConnections)
{
if ( multiView == NULL ) {
if ( multiView == nullptr ) {
return;
}
@@ -479,7 +479,7 @@ void TaskProjGroup::setupViewCheckboxes(bool addConnections)
}
const char *viewStr = viewChkIndexToCStr(i);
if ( viewStr != NULL && multiView->hasProjection(viewStr) ) {
if ( viewStr != nullptr && multiView->hasProjection(viewStr) ) {
box->setCheckState(Qt::Checked);
} else {
box->setCheckState(Qt::Unchecked);
@@ -577,7 +577,7 @@ TaskDlgProjGroup::TaskDlgProjGroup(TechDraw::DrawProjGroup* featView, bool mode)
//viewProvider = dynamic_cast<const ViewProviderProjGroup *>(featView);
widget = new TaskProjGroup(featView,mode);
taskbox = new Gui::TaskView::TaskBox(Gui::BitmapFactory().pixmap("actions/TechDraw_ProjectionGroup"),
widget->windowTitle(), true, 0);
widget->windowTitle(), true, nullptr);
taskbox->groupLayout()->addWidget(widget);
Content.push_back(taskbox);
}