PD: modernize C++11

* use nullptr
This commit is contained in:
wmayer
2022-03-23 19:07:22 +01:00
parent 068c0e5a98
commit 3608ee7f51
89 changed files with 273 additions and 273 deletions

View File

@@ -141,7 +141,7 @@ void TaskLinearPatternParameters::setupUI()
// Fill data into dialog elements
for (std::vector<App::DocumentObject*>::const_iterator i = originals.begin(); i != originals.end(); ++i) {
const App::DocumentObject* obj = *i;
if (obj != NULL) {
if (obj != nullptr) {
QListWidgetItem* item = new QListWidgetItem();
item->setText(QString::fromUtf8(obj->Label.getValue()));
item->setData(Qt::UserRole, QString::fromLatin1(obj->getNameInDocument()));
@@ -318,7 +318,7 @@ void TaskLinearPatternParameters::onDirectionChanged(int /*num*/)
return;
PartDesign::LinearPattern* pcLinearPattern = static_cast<PartDesign::LinearPattern*>(getObject());
try{
if(dirLinks.getCurrentLink().getValue() == 0){
if(dirLinks.getCurrentLink().getValue() == nullptr){
// enter reference selection mode
hideObject();
showBase();
@@ -330,7 +330,7 @@ void TaskLinearPatternParameters::onDirectionChanged(int /*num*/)
pcLinearPattern->Direction.Paste(dirLinks.getCurrentLink());
}
} catch (Base::Exception &e) {
QMessageBox::warning(0,tr("Error"),QString::fromLatin1(e.what()));
QMessageBox::warning(nullptr,tr("Error"),QString::fromLatin1(e.what()));
}
kickUpdateViewTimer();