PD: modernize C++11
* use nullptr
This commit is contained in:
@@ -90,7 +90,7 @@ ViewProviderDatum::ViewProviderDatum()
|
||||
Transparency.setValue (col.a * 100);
|
||||
|
||||
oldWb = "";
|
||||
oldTip = NULL;
|
||||
oldTip = nullptr;
|
||||
}
|
||||
|
||||
ViewProviderDatum::~ViewProviderDatum()
|
||||
@@ -207,7 +207,7 @@ SoDetail* ViewProviderDatum::getDetail(const char* subelement) const
|
||||
return detail;
|
||||
}
|
||||
|
||||
return NULL;
|
||||
return nullptr;
|
||||
}
|
||||
|
||||
bool ViewProviderDatum::isSelectable(void) const
|
||||
@@ -236,7 +236,7 @@ bool ViewProviderDatum::setEdit(int ModNum)
|
||||
Gui::TaskView::TaskDialog *dlg = Gui::Control().activeDialog();
|
||||
TaskDlgDatumParameters *datumDlg = qobject_cast<TaskDlgDatumParameters *>(dlg);
|
||||
if (datumDlg && datumDlg->getViewProvider() != this)
|
||||
datumDlg = 0; // another datum feature left open its task panel
|
||||
datumDlg = nullptr; // another datum feature left open its task panel
|
||||
if (dlg && !datumDlg) {
|
||||
QMessageBox msgBox;
|
||||
msgBox.setText(QObject::tr("A dialog is already open in the task panel"));
|
||||
@@ -284,7 +284,7 @@ bool ViewProviderDatum::doubleClicked(void)
|
||||
PartDesign::Body* activeBody = activeView->getActiveObject<PartDesign::Body*>(PDBODYKEY);
|
||||
auto datumBody = PartDesignGui::getBodyFor(pcDatum, false);
|
||||
|
||||
if (datumBody != NULL) {
|
||||
if (datumBody != nullptr) {
|
||||
if (datumBody != activeBody) {
|
||||
Gui::Command::doCommand(Gui::Command::Gui,
|
||||
"Gui.ActiveDocument.ActiveView.setActiveObject('%s',%s)",
|
||||
|
||||
Reference in New Issue
Block a user