diff --git a/Fwk/AppFwk/cafCommand/cafCmdExecCommandManager.cpp b/Fwk/AppFwk/cafCommand/cafCmdExecCommandManager.cpp index a62872d559..2c7ae60011 100644 --- a/Fwk/AppFwk/cafCommand/cafCmdExecCommandManager.cpp +++ b/Fwk/AppFwk/cafCommand/cafCmdExecCommandManager.cpp @@ -92,7 +92,7 @@ namespace caf //-------------------------------------------------------------------------------------------------- CmdExecCommandManager::CmdExecCommandManager() { - m_commandFeatureInterface = NULL; + m_commandFeatureInterface = nullptr; m_undoStack = new QUndoStack(); } @@ -124,7 +124,7 @@ void CmdExecCommandManager::activateCommandSystem() //-------------------------------------------------------------------------------------------------- void CmdExecCommandManager::deactivateCommandSystem() { - PdmUiCommandSystemProxy::instance()->setCommandInterface(NULL); + PdmUiCommandSystemProxy::instance()->setCommandInterface(nullptr); } //-------------------------------------------------------------------------------------------------- diff --git a/Fwk/AppFwk/cafCommand/cafCmdFeature.cpp b/Fwk/AppFwk/cafCommand/cafCmdFeature.cpp index 33c50f3a7e..5eaa86f56f 100644 --- a/Fwk/AppFwk/cafCommand/cafCmdFeature.cpp +++ b/Fwk/AppFwk/cafCommand/cafCmdFeature.cpp @@ -84,7 +84,7 @@ QAction* CmdFeature::actionWithCustomText(const QString& customText) //-------------------------------------------------------------------------------------------------- QAction* CmdFeature::actionWithUserData(const QString& customText, const QVariant& userData) { - QAction* action = NULL; + QAction* action = nullptr; std::map::iterator it; it = m_customTextToActionMap.find(customText); diff --git a/Fwk/AppFwk/cafCommand/cafCmdFeatureManager.cpp b/Fwk/AppFwk/cafCommand/cafCmdFeatureManager.cpp index 0758645d05..d90c1cad7a 100644 --- a/Fwk/AppFwk/cafCommand/cafCmdFeatureManager.cpp +++ b/Fwk/AppFwk/cafCommand/cafCmdFeatureManager.cpp @@ -170,7 +170,7 @@ std::pair CmdFeatureManager::findExistingCmdFeature(const } else { - return std::make_pair(static_cast(NULL), -1); + return std::make_pair(static_cast(nullptr), -1); } } @@ -191,7 +191,7 @@ caf::CmdFeature* CmdFeatureManager::commandFeature(const std::string& commandId) return item; } - return NULL; + return nullptr; } //-------------------------------------------------------------------------------------------------- diff --git a/Fwk/AppFwk/cafCommand/defaultfeatures/cafCmdAddItemFeature.cpp b/Fwk/AppFwk/cafCommand/defaultfeatures/cafCmdAddItemFeature.cpp index 031209f85e..b7a006c650 100644 --- a/Fwk/AppFwk/cafCommand/defaultfeatures/cafCmdAddItemFeature.cpp +++ b/Fwk/AppFwk/cafCommand/defaultfeatures/cafCmdAddItemFeature.cpp @@ -65,7 +65,7 @@ namespace caf CmdExecuteCommand* CmdAddItemFeature::createExecuteCommand() { caf::PdmChildArrayFieldHandle* childArrayFieldHandle = SelectionManager::instance()->activeChildArrayFieldHandle(); - if (!childArrayFieldHandle) return NULL; + if (!childArrayFieldHandle) return nullptr; int indexAfter = -1; CmdAddItemExec* addItemExec = new CmdAddItemExec(SelectionManager::instance()->notificationCenter()); diff --git a/Fwk/AppFwk/cafCommand/defaultfeatures/cafCmdDeleteItemFeature.cpp b/Fwk/AppFwk/cafCommand/defaultfeatures/cafCmdDeleteItemFeature.cpp index c3731af51e..09ae65ca65 100644 --- a/Fwk/AppFwk/cafCommand/defaultfeatures/cafCmdDeleteItemFeature.cpp +++ b/Fwk/AppFwk/cafCommand/defaultfeatures/cafCmdDeleteItemFeature.cpp @@ -61,9 +61,9 @@ CmdExecuteCommand* CmdDeleteItemFeature::createExecuteCommand() SelectionManager::instance()->selectedItems(items, SelectionManager::CURRENT); caf::PdmChildArrayFieldHandle* childArrayFieldHandle = caf::SelectionManager::instance()->activeChildArrayFieldHandle(); - if (!childArrayFieldHandle) return NULL; + if (!childArrayFieldHandle) return nullptr; - caf::PdmObjectHandle* currentPdmObject = NULL; + caf::PdmObjectHandle* currentPdmObject = nullptr; for (size_t i = 0; i < items.size(); i++) { @@ -73,7 +73,7 @@ CmdExecuteCommand* CmdDeleteItemFeature::createExecuteCommand() } } - if (!currentPdmObject) return NULL; + if (!currentPdmObject) return nullptr; int indexAfter = -1; diff --git a/Fwk/AppFwk/cafProjectDataModel/cafPdmCore/cafNotificationCenter.cpp b/Fwk/AppFwk/cafProjectDataModel/cafPdmCore/cafNotificationCenter.cpp index 6789e4cbdb..9f9241b29c 100644 --- a/Fwk/AppFwk/cafProjectDataModel/cafPdmCore/cafNotificationCenter.cpp +++ b/Fwk/AppFwk/cafProjectDataModel/cafPdmCore/cafNotificationCenter.cpp @@ -95,7 +95,7 @@ void NotificationCenter::notifyObservers() { foreach(DataModelObserver* o, m_observers) { - o->handleModelNotification(NULL); + o->handleModelNotification(nullptr); } } diff --git a/Fwk/AppFwk/cafProjectDataModel/cafPdmCore/cafPdmFieldHandle.h b/Fwk/AppFwk/cafProjectDataModel/cafPdmCore/cafPdmFieldHandle.h index 6a06ec06d2..f0080f9eec 100644 --- a/Fwk/AppFwk/cafProjectDataModel/cafPdmCore/cafPdmFieldHandle.h +++ b/Fwk/AppFwk/cafProjectDataModel/cafPdmCore/cafPdmFieldHandle.h @@ -19,7 +19,7 @@ class PdmFieldCapability; class PdmFieldHandle { public: - PdmFieldHandle() { m_ownerObject = NULL; } + PdmFieldHandle() { m_ownerObject = nullptr; } virtual ~PdmFieldHandle(); QString keyword() const { return m_keyword; } @@ -45,7 +45,7 @@ public: PdmXmlFieldHandle* xmlCapability(); protected: - bool isInitializedByInitFieldMacro() const { return m_ownerObject != NULL; } + bool isInitializedByInitFieldMacro() const { return m_ownerObject != nullptr; } private: PDM_DISABLE_COPY_AND_ASSIGN(PdmFieldHandle); diff --git a/Fwk/AppFwk/cafProjectDataModel/cafPdmCore/cafPdmObjectHandle.cpp b/Fwk/AppFwk/cafProjectDataModel/cafPdmCore/cafPdmObjectHandle.cpp index 6c859f530a..ea72d25d38 100644 --- a/Fwk/AppFwk/cafProjectDataModel/cafPdmCore/cafPdmObjectHandle.cpp +++ b/Fwk/AppFwk/cafProjectDataModel/cafPdmCore/cafPdmObjectHandle.cpp @@ -24,7 +24,7 @@ PdmObjectHandle::~PdmObjectHandle() std::set::iterator it; for (it = m_pointersReferencingMe.begin(); it != m_pointersReferencingMe.end() ; ++it) { - (**it) = NULL; + (**it) = nullptr; } } @@ -41,7 +41,7 @@ void PdmObjectHandle::fields(std::vector& fields) const //-------------------------------------------------------------------------------------------------- void PdmObjectHandle::setAsParentField(PdmFieldHandle* parentField) { - CAF_ASSERT(m_parentField == NULL); + CAF_ASSERT(m_parentField == nullptr); m_parentField = parentField; } @@ -53,7 +53,7 @@ void PdmObjectHandle::removeAsParentField(PdmFieldHandle* parentField) { CAF_ASSERT(m_parentField == parentField); - m_parentField = NULL; + m_parentField = nullptr; } @@ -62,7 +62,7 @@ void PdmObjectHandle::removeAsParentField(PdmFieldHandle* parentField) //-------------------------------------------------------------------------------------------------- void PdmObjectHandle::addReferencingPtrField(PdmFieldHandle* fieldReferringToMe) { - if (fieldReferringToMe != NULL) m_referencingPtrFields.insert(fieldReferringToMe); + if (fieldReferringToMe != nullptr) m_referencingPtrFields.insert(fieldReferringToMe); } //-------------------------------------------------------------------------------------------------- @@ -70,7 +70,7 @@ void PdmObjectHandle::addReferencingPtrField(PdmFieldHandle* fieldReferringToMe) //-------------------------------------------------------------------------------------------------- void PdmObjectHandle::removeReferencingPtrField(PdmFieldHandle* fieldReferringToMe) { - if (fieldReferringToMe != NULL) m_referencingPtrFields.erase(fieldReferringToMe); + if (fieldReferringToMe != nullptr) m_referencingPtrFields.erase(fieldReferringToMe); } //-------------------------------------------------------------------------------------------------- @@ -110,7 +110,7 @@ void PdmObjectHandle::addField(PdmFieldHandle* field, const QString& keyword) field->m_ownerObject = this; CAF_ASSERT(!keyword.isEmpty()); - CAF_ASSERT(this->findField(keyword) == NULL); + CAF_ASSERT(this->findField(keyword) == nullptr); field->setKeyword(keyword); m_fields.push_back(field); @@ -134,7 +134,7 @@ PdmFieldHandle* PdmObjectHandle::findField(const QString& keyword) const } } - return NULL; + return nullptr; } //-------------------------------------------------------------------------------------------------- diff --git a/Fwk/AppFwk/cafProjectDataModel/cafPdmCore/cafPdmReferenceHelper.cpp b/Fwk/AppFwk/cafProjectDataModel/cafPdmCore/cafPdmReferenceHelper.cpp index b62453472e..b7442a3776 100644 --- a/Fwk/AppFwk/cafProjectDataModel/cafPdmCore/cafPdmReferenceHelper.cpp +++ b/Fwk/AppFwk/cafProjectDataModel/cafPdmCore/cafPdmReferenceHelper.cpp @@ -54,7 +54,7 @@ namespace caf //-------------------------------------------------------------------------------------------------- QString PdmReferenceHelper::referenceFromRootToObject(PdmObjectHandle* root, PdmObjectHandle* obj) { - if (obj == NULL || root == NULL) return QString(); + if (obj == nullptr || root == nullptr) return QString(); QStringList objectNames = referenceFromRootToObjectAsStringList(root, obj); @@ -67,7 +67,7 @@ QString PdmReferenceHelper::referenceFromRootToObject(PdmObjectHandle* root, Pdm //-------------------------------------------------------------------------------------------------- QString PdmReferenceHelper::referenceFromRootToField(PdmObjectHandle* root, PdmFieldHandle* field) { - if (field == NULL || root == NULL) return QString(); + if (field == nullptr || root == nullptr) return QString(); PdmObjectHandle* owner = field->ownerObject(); if (!owner) return QString(); // Should be assert ? @@ -97,7 +97,7 @@ PdmObjectHandle* PdmReferenceHelper::objectFromReference(PdmObjectHandle* root, //-------------------------------------------------------------------------------------------------- PdmFieldHandle* PdmReferenceHelper::findField(PdmObjectHandle* object, const QString& fieldKeyword) { - if (object == NULL) return NULL; + if (object == nullptr) return nullptr; std::vector fields; object->fields(fields); @@ -110,7 +110,7 @@ PdmFieldHandle* PdmReferenceHelper::findField(PdmObjectHandle* object, const QSt } } - return NULL; + return nullptr; } //-------------------------------------------------------------------------------------------------- @@ -120,7 +120,7 @@ QStringList PdmReferenceHelper::referenceFromRootToObjectAsStringList(PdmObjectH { QStringList objectNames; - if (obj != NULL && root) + if (obj != nullptr && root) { if (obj == root) return objectNames; @@ -186,7 +186,7 @@ QStringList PdmReferenceHelper::referenceFromRootToObjectAsStringList(PdmObjectH PdmFieldHandle* PdmReferenceHelper::fieldFromReference(PdmObjectHandle* root, const QString& reference) { QStringList decodedReference = reference.split(" "); - if (decodedReference.size() == 0) return NULL; + if (decodedReference.size() == 0) return nullptr; QString fieldKeyword = decodedReference[0]; decodedReference.pop_front(); @@ -200,7 +200,7 @@ PdmFieldHandle* PdmReferenceHelper::fieldFromReference(PdmObjectHandle* root, co //-------------------------------------------------------------------------------------------------- PdmObjectHandle* PdmReferenceHelper::objectFromReferenceStringList(PdmObjectHandle* root, const QStringList& reference) { - if (!root) return NULL; + if (!root) return nullptr; PdmObjectHandle* currentObject = root; @@ -212,7 +212,7 @@ PdmObjectHandle* PdmReferenceHelper::objectFromReferenceStringList(PdmObjectHand PdmFieldHandle* fieldHandle = findField(currentObject, fieldKeyword); if (!fieldHandle) { - return NULL; + return nullptr; } std::vector childObjects; @@ -220,7 +220,7 @@ PdmObjectHandle* PdmReferenceHelper::objectFromReferenceStringList(PdmObjectHand if (childObjects.size() == 0) { - return NULL; + return nullptr; } QString fieldIndex = reference.at(i++); @@ -228,12 +228,12 @@ PdmObjectHandle* PdmReferenceHelper::objectFromReferenceStringList(PdmObjectHand int index = fieldIndex.toInt(&conversionOk); if (!conversionOk) { - return NULL; + return nullptr; } if (index < 0 || index > ((int)childObjects.size()) - 1) { - return NULL; + return nullptr; } currentObject = childObjects[index]; @@ -258,7 +258,7 @@ std::vector findPathToObjectFromRoot(PdmObjectHandle* obj) } else { - currentObj = NULL; + currentObj = nullptr; } } @@ -281,7 +281,7 @@ QString PdmReferenceHelper::referenceFromFieldToObject(PdmFieldHandle* fromField std::vector toObjPath = findPathToObjectFromRoot(toObj); // Make sure the objects actually have at least one common ancestor - if (fromObjPath.front() != toObjPath.front()) return NULL; + if (fromObjPath.front() != toObjPath.front()) return nullptr; bool anchestorIsEqual = true; size_t idxToLastCommonAnchestor = 0; @@ -318,8 +318,8 @@ QString PdmReferenceHelper::referenceFromFieldToObject(PdmFieldHandle* fromField //-------------------------------------------------------------------------------------------------- PdmObjectHandle* PdmReferenceHelper::objectFromFieldReference(PdmFieldHandle* fromField, const QString& reference) { - if (!fromField) return NULL; - if (reference.isEmpty()) return NULL; + if (!fromField) return nullptr; + if (reference.isEmpty()) return nullptr; QStringList decodedReference = reference.split(QRegExp("\\s+"), QString::SkipEmptyParts); PdmObjectHandle* lastCommonAnchestor = fromField->ownerObject(); @@ -332,7 +332,7 @@ PdmObjectHandle* PdmReferenceHelper::objectFromFieldReference(PdmFieldHandle* fr if (!parentField) { // Error: Relative object reference has an invalid number of parent levels - return NULL; + return nullptr; } lastCommonAnchestor = parentField->ownerObject(); @@ -351,7 +351,7 @@ PdmObjectHandle* PdmReferenceHelper::findRoot(PdmObjectHandle* obj) std::vector path = findPathToObjectFromRoot(obj); if (path.size()) return path[0]; - else return NULL; + else return nullptr; } //-------------------------------------------------------------------------------------------------- @@ -365,7 +365,7 @@ PdmObjectHandle* PdmReferenceHelper::findRoot(PdmFieldHandle* field) return findRoot(ownerObject); } - return NULL; + return nullptr; } } // end namespace caf diff --git a/Fwk/AppFwk/cafProjectDataModel/cafPdmDocument.cpp b/Fwk/AppFwk/cafProjectDataModel/cafPdmDocument.cpp index 606c07c773..ca3169abf8 100644 --- a/Fwk/AppFwk/cafProjectDataModel/cafPdmDocument.cpp +++ b/Fwk/AppFwk/cafProjectDataModel/cafPdmDocument.cpp @@ -135,7 +135,7 @@ void PdmDocument::writeFile(QIODevice* xmlFile) //-------------------------------------------------------------------------------------------------- void PdmDocument::updateUiIconStateRecursively(PdmObjectHandle* object) { - if (object == NULL) return; + if (object == nullptr) return; std::vector fields; object->fields(fields); diff --git a/Fwk/AppFwk/cafProjectDataModel/cafPdmUiCore/cafPdmUiCommandSystemProxy.cpp b/Fwk/AppFwk/cafProjectDataModel/cafPdmUiCore/cafPdmUiCommandSystemProxy.cpp index f813767149..810ad8a96d 100644 --- a/Fwk/AppFwk/cafProjectDataModel/cafPdmUiCore/cafPdmUiCommandSystemProxy.cpp +++ b/Fwk/AppFwk/cafProjectDataModel/cafPdmUiCore/cafPdmUiCommandSystemProxy.cpp @@ -64,7 +64,7 @@ PdmUiCommandSystemProxy* PdmUiCommandSystemProxy::instance() //-------------------------------------------------------------------------------------------------- PdmUiCommandSystemProxy::PdmUiCommandSystemProxy() { - m_commandInterface = NULL; + m_commandInterface = nullptr; } diff --git a/Fwk/AppFwk/cafProjectDataModel/cafPdmUiCore/cafPdmUiEditorHandle.cpp b/Fwk/AppFwk/cafProjectDataModel/cafPdmUiCore/cafPdmUiEditorHandle.cpp index 2b7bf1c3d2..74009476b4 100644 --- a/Fwk/AppFwk/cafProjectDataModel/cafPdmUiCore/cafPdmUiEditorHandle.cpp +++ b/Fwk/AppFwk/cafProjectDataModel/cafPdmUiCore/cafPdmUiEditorHandle.cpp @@ -43,7 +43,7 @@ namespace caf //-------------------------------------------------------------------------------------------------- /// //-------------------------------------------------------------------------------------------------- -PdmUiEditorHandle::PdmUiEditorHandle() : m_pdmItem(NULL) +PdmUiEditorHandle::PdmUiEditorHandle() : m_pdmItem(nullptr) { } diff --git a/Fwk/AppFwk/cafProjectDataModel/cafPdmUiCore/cafPdmUiFieldEditorHandle.h b/Fwk/AppFwk/cafProjectDataModel/cafPdmUiCore/cafPdmUiFieldEditorHandle.h index 4f34bfbbd5..e18b411dc7 100644 --- a/Fwk/AppFwk/cafProjectDataModel/cafPdmUiCore/cafPdmUiFieldEditorHandle.h +++ b/Fwk/AppFwk/cafProjectDataModel/cafPdmUiCore/cafPdmUiFieldEditorHandle.h @@ -114,9 +114,9 @@ protected: // Virtual interface to override /// Implement one of these, or both editor and label. The widgets will be used in the parent layout according to /// being "Label" Editor" or a single combined widget. - virtual QWidget* createCombinedWidget(QWidget * parent) { return NULL; } - virtual QWidget* createEditorWidget(QWidget * parent) { return NULL; } - virtual QWidget* createLabelWidget(QWidget * parent) { return NULL; } + virtual QWidget* createCombinedWidget(QWidget * parent) { return nullptr; } + virtual QWidget* createEditorWidget(QWidget * parent) { return nullptr; } + virtual QWidget* createLabelWidget(QWidget * parent) { return nullptr; } void setValueToField(const QVariant& value); diff --git a/Fwk/AppFwk/cafProjectDataModel/cafPdmUiCore/cafPdmUiItem.cpp b/Fwk/AppFwk/cafProjectDataModel/cafPdmUiCore/cafPdmUiItem.cpp index 7d20464388..2bf1678d20 100644 --- a/Fwk/AppFwk/cafProjectDataModel/cafPdmUiCore/cafPdmUiItem.cpp +++ b/Fwk/AppFwk/cafProjectDataModel/cafPdmUiCore/cafPdmUiItem.cpp @@ -341,14 +341,14 @@ PdmUiItemInfo::LabelPosType PdmUiItem::uiLabelPosition(QString uiConfigName) con const PdmUiItemInfo* PdmUiItem::configInfo(QString uiConfigName) const { - if (uiConfigName == "" || uiConfigName.isNull()) return NULL; + if (uiConfigName == "" || uiConfigName.isNull()) return nullptr; std::map::const_iterator it; it = m_configItemInfos.find(uiConfigName); if (it != m_configItemInfos.end()) return &(it->second); - return NULL; + return nullptr; } //-------------------------------------------------------------------------------------------------- @@ -362,7 +362,7 @@ const PdmUiItemInfo* PdmUiItem::defaultInfo() const if (it != m_configItemInfos.end()) return &(it->second); - return NULL; + return nullptr; } //-------------------------------------------------------------------------------------------------- @@ -395,7 +395,7 @@ PdmUiItem::~PdmUiItem() std::set::iterator it; for (it = m_editors.begin(); it != m_editors.end(); ++it) { - (*it)->m_pdmItem = NULL; + (*it)->m_pdmItem = nullptr; } } diff --git a/Fwk/AppFwk/cafProjectDataModel/cafPdmUiCore/cafPdmUiItem.h b/Fwk/AppFwk/cafProjectDataModel/cafPdmUiCore/cafPdmUiItem.h index 4f08a63cf0..91bd07da34 100644 --- a/Fwk/AppFwk/cafProjectDataModel/cafPdmUiCore/cafPdmUiItem.h +++ b/Fwk/AppFwk/cafProjectDataModel/cafPdmUiCore/cafPdmUiItem.h @@ -191,7 +191,7 @@ bool PdmOptionItemInfo::findValues(const QList& optionList, Q class PdmUiItem { public: - PdmUiItem() : m_staticItemInfo(NULL) { } + PdmUiItem() : m_staticItemInfo(nullptr) { } virtual ~PdmUiItem(); PdmUiItem(const PdmUiItem&) = delete; diff --git a/Fwk/AppFwk/cafProjectDataModel/cafPdmUiCore/cafPdmUiObjectEditorHandle.cpp b/Fwk/AppFwk/cafProjectDataModel/cafPdmUiCore/cafPdmUiObjectEditorHandle.cpp index 4e7afdbf45..711ad73a91 100644 --- a/Fwk/AppFwk/cafProjectDataModel/cafPdmUiCore/cafPdmUiObjectEditorHandle.cpp +++ b/Fwk/AppFwk/cafProjectDataModel/cafPdmUiCore/cafPdmUiObjectEditorHandle.cpp @@ -104,7 +104,7 @@ PdmObjectHandle* PdmUiObjectEditorHandle::pdmObject() } else { - return NULL; + return nullptr; } } diff --git a/Fwk/AppFwk/cafProjectDataModel/cafPdmUiCore/cafPdmUiObjectHandle.cpp b/Fwk/AppFwk/cafProjectDataModel/cafPdmUiCore/cafPdmUiObjectHandle.cpp index 7b82d496c5..38fea693ff 100644 --- a/Fwk/AppFwk/cafProjectDataModel/cafPdmUiCore/cafPdmUiObjectHandle.cpp +++ b/Fwk/AppFwk/cafProjectDataModel/cafPdmUiCore/cafPdmUiObjectHandle.cpp @@ -25,7 +25,7 @@ PdmUiObjectHandle::PdmUiObjectHandle(PdmObjectHandle* owner, bool giveOwnership) //-------------------------------------------------------------------------------------------------- PdmUiObjectHandle* uiObj(PdmObjectHandle* obj) { - if (!obj) return NULL; + if (!obj) return nullptr; PdmUiObjectHandle* uiObject = obj->capability(); CAF_ASSERT(uiObject); return uiObject; @@ -92,7 +92,7 @@ PdmUiTreeOrdering* PdmUiObjectHandle::uiTreeOrdering(QString uiConfigName /*= "" { CAF_ASSERT(this); // This method actually is possible to call on a NULL ptr without getting a crash, so we assert instead. - PdmUiTreeOrdering* uiTreeOrdering = new PdmUiTreeOrdering(NULL, m_owner); + PdmUiTreeOrdering* uiTreeOrdering = new PdmUiTreeOrdering(nullptr, m_owner); expandUiTree(uiTreeOrdering, uiConfigName); diff --git a/Fwk/AppFwk/cafProjectDataModel/cafPdmUiCore/cafPdmUiObjectHandle.h b/Fwk/AppFwk/cafProjectDataModel/cafPdmUiCore/cafPdmUiObjectHandle.h index 68e6b86dd6..7bfe542b3a 100644 --- a/Fwk/AppFwk/cafProjectDataModel/cafPdmUiCore/cafPdmUiObjectHandle.h +++ b/Fwk/AppFwk/cafProjectDataModel/cafPdmUiCore/cafPdmUiObjectHandle.h @@ -48,10 +48,10 @@ public: // Virtual interface to override in subclasses to support special behaviour if needed public: // Virtual - virtual caf::PdmFieldHandle* userDescriptionField() { return NULL; } + virtual caf::PdmFieldHandle* userDescriptionField() { return nullptr; } /// Field used to toggle object on/off in UI-related uses of the object (ie checkbox in treeview) - virtual caf::PdmFieldHandle* objectToggleField() { return NULL; } + virtual caf::PdmFieldHandle* objectToggleField() { return nullptr; } /// Method to reimplement to catch when the field has changed due to setUiValue() virtual void fieldChangedByUi(const caf::PdmFieldHandle* changedField, const QVariant& oldValue, const QVariant& newValue) {} diff --git a/Fwk/AppFwk/cafProjectDataModel/cafPdmUiCore/cafPdmUiTreeOrdering.cpp b/Fwk/AppFwk/cafProjectDataModel/cafPdmUiCore/cafPdmUiTreeOrdering.cpp index b46913a8b9..8afceb66c4 100644 --- a/Fwk/AppFwk/cafProjectDataModel/cafPdmUiCore/cafPdmUiTreeOrdering.cpp +++ b/Fwk/AppFwk/cafProjectDataModel/cafPdmUiCore/cafPdmUiTreeOrdering.cpp @@ -140,13 +140,13 @@ bool PdmUiTreeOrdering::containsObject(const PdmObjectHandle* object) /// Creates an new root PdmUiTreeOrdering item, pointing at a PdmObject //-------------------------------------------------------------------------------------------------- PdmUiTreeOrdering::PdmUiTreeOrdering(PdmObjectHandle* pdmObject) : - m_parentItem(NULL), - m_field(NULL), + m_parentItem(nullptr), + m_field(nullptr), m_forgetRemainingFields(false), m_isToIgnoreSubTree(false), - m_uiItem(NULL), + m_uiItem(nullptr), m_object(pdmObject), - m_treeItemEditor(NULL) + m_treeItemEditor(nullptr) { } @@ -154,13 +154,13 @@ PdmUiTreeOrdering::PdmUiTreeOrdering(PdmObjectHandle* pdmObject) : /// Creates an new root PdmUiTreeOrdering item, pointing at a field //-------------------------------------------------------------------------------------------------- PdmUiTreeOrdering::PdmUiTreeOrdering( PdmFieldHandle* pdmField ) : - m_parentItem(NULL), + m_parentItem(nullptr), m_field(pdmField), m_forgetRemainingFields(false), m_isToIgnoreSubTree(false), - m_uiItem(NULL), - m_object(NULL), - m_treeItemEditor(NULL) + m_uiItem(nullptr), + m_object(nullptr), + m_treeItemEditor(nullptr) { if (pdmField) m_object = pdmField->ownerObject(); } @@ -169,13 +169,13 @@ PdmUiTreeOrdering::PdmUiTreeOrdering( PdmFieldHandle* pdmField ) : /// Creates an new root PdmUiTreeOrdering item, as a display item only //-------------------------------------------------------------------------------------------------- PdmUiTreeOrdering::PdmUiTreeOrdering(const QString & title, const QString& iconResourceName) : - m_parentItem(NULL), - m_field(NULL), + m_parentItem(nullptr), + m_field(nullptr), m_forgetRemainingFields(false), m_isToIgnoreSubTree(false), - m_uiItem(NULL), - m_object(NULL), - m_treeItemEditor(NULL) + m_uiItem(nullptr), + m_object(nullptr), + m_treeItemEditor(nullptr) { m_uiItem = new PdmUiItem(); m_uiItem->setUiName(title); @@ -188,12 +188,12 @@ PdmUiTreeOrdering::PdmUiTreeOrdering(const QString & title, const QString& iconR //-------------------------------------------------------------------------------------------------- PdmUiTreeOrdering::PdmUiTreeOrdering(PdmUiTreeOrdering* parent, PdmObjectHandle* pdmObject) : m_parentItem(parent), - m_field(NULL), + m_field(nullptr), m_forgetRemainingFields(false), m_isToIgnoreSubTree(false), - m_uiItem(NULL), + m_uiItem(nullptr), m_object(pdmObject), - m_treeItemEditor(NULL) + m_treeItemEditor(nullptr) { if (m_parentItem) { @@ -210,9 +210,9 @@ PdmUiTreeOrdering::PdmUiTreeOrdering(PdmUiTreeOrdering* parent , PdmFieldHandle* m_field(pdmField), m_forgetRemainingFields(false), m_isToIgnoreSubTree(false), - m_uiItem(NULL), - m_object(NULL), - m_treeItemEditor(NULL) + m_uiItem(nullptr), + m_object(nullptr), + m_treeItemEditor(nullptr) { if (m_parentItem) { @@ -274,7 +274,7 @@ PdmUiItem* PdmUiTreeOrdering::activeItem() const if (isRepresentingObject()) return uiObj(m_object); if (isRepresentingField()) return m_field->uiCapability(); if (isDisplayItemOnly()) return m_uiItem; - return NULL; + return nullptr; } //-------------------------------------------------------------------------------------------------- diff --git a/Fwk/AppFwk/cafProjectDataModel/cafPdmUiCore/cafPdmUiTreeOrdering.h b/Fwk/AppFwk/cafProjectDataModel/cafPdmUiCore/cafPdmUiTreeOrdering.h index c9a622d248..6528a97af4 100644 --- a/Fwk/AppFwk/cafProjectDataModel/cafPdmUiCore/cafPdmUiTreeOrdering.h +++ b/Fwk/AppFwk/cafProjectDataModel/cafPdmUiCore/cafPdmUiTreeOrdering.h @@ -82,10 +82,10 @@ public: void setIgnoreSubTree(bool doIgnoreSubTree ) { m_isToIgnoreSubTree = doIgnoreSubTree; } // Testing for the PdmItem being represented - bool isRepresentingObject() const { return !isRepresentingField() && (m_object != NULL); } - bool isRepresentingField() const { return (m_object != NULL) && (m_field != NULL);} - bool isDisplayItemOnly() const { return (m_uiItem != NULL); } - bool isValid() const { return (this->activeItem() != NULL); } + bool isRepresentingObject() const { return !isRepresentingField() && (m_object != nullptr); } + bool isRepresentingField() const { return (m_object != nullptr) && (m_field != nullptr);} + bool isDisplayItemOnly() const { return (m_uiItem != nullptr); } + bool isValid() const { return (this->activeItem() != nullptr); } // Access to the PdmItem being represented PdmUiItem* activeItem() const; diff --git a/Fwk/AppFwk/cafProjectDataModel/cafPdmUiCore/cafSelectionManager.cpp b/Fwk/AppFwk/cafProjectDataModel/cafPdmUiCore/cafSelectionManager.cpp index 9233b71ac7..42c8195fad 100644 --- a/Fwk/AppFwk/cafProjectDataModel/cafPdmUiCore/cafSelectionManager.cpp +++ b/Fwk/AppFwk/cafProjectDataModel/cafPdmUiCore/cafSelectionManager.cpp @@ -119,7 +119,7 @@ PdmUiItem* SelectionManager::selectedItem(int role /*= SelectionManager::APPLICA } } - return NULL; + return nullptr; } //-------------------------------------------------------------------------------------------------- @@ -140,8 +140,8 @@ SelectionManager::SelectionManager() { m_selectionForRole.resize(UNDEFINED); - m_notificationCenter = NULL; - m_activeChildArrayFieldHandle = NULL; + m_notificationCenter = nullptr; + m_activeChildArrayFieldHandle = nullptr; } //-------------------------------------------------------------------------------------------------- diff --git a/Fwk/AppFwk/cafProjectDataModel/cafPdmXml/cafPdmDefaultObjectFactory.cpp b/Fwk/AppFwk/cafProjectDataModel/cafPdmXml/cafPdmDefaultObjectFactory.cpp index 422e3eb8b7..b6dc8b0dfe 100644 --- a/Fwk/AppFwk/cafProjectDataModel/cafPdmXml/cafPdmDefaultObjectFactory.cpp +++ b/Fwk/AppFwk/cafProjectDataModel/cafPdmXml/cafPdmDefaultObjectFactory.cpp @@ -20,7 +20,7 @@ PdmObjectHandle * PdmDefaultObjectFactory::create(const QString& classNameKeywor } else { - return NULL; + return nullptr; } } diff --git a/Fwk/AppFwk/cafProjectDataModel/cafPdmXml/cafPdmXmlObjectHandle.cpp b/Fwk/AppFwk/cafProjectDataModel/cafPdmXml/cafPdmXmlObjectHandle.cpp index 645f8aff3a..52e6ae55de 100644 --- a/Fwk/AppFwk/cafProjectDataModel/cafPdmXml/cafPdmXmlObjectHandle.cpp +++ b/Fwk/AppFwk/cafProjectDataModel/cafPdmXml/cafPdmXmlObjectHandle.cpp @@ -28,7 +28,7 @@ PdmXmlObjectHandle::PdmXmlObjectHandle(PdmObjectHandle* owner, bool giveOwnershi //-------------------------------------------------------------------------------------------------- PdmXmlObjectHandle* xmlObj(PdmObjectHandle* obj) { - if (!obj) return NULL; + if (!obj) return nullptr; PdmXmlObjectHandle* xmlObject = obj->capability(); CAF_ASSERT(xmlObject); return xmlObject; @@ -248,7 +248,7 @@ bool PdmXmlObjectHandle::isValidXmlElementName(const QString& name) //-------------------------------------------------------------------------------------------------- void PdmXmlObjectHandle::initAfterReadRecursively(PdmObjectHandle* object) { - if (object == NULL) return; + if (object == nullptr) return; std::vector fields; object->fields(fields); @@ -278,7 +278,7 @@ void PdmXmlObjectHandle::initAfterReadRecursively(PdmObjectHandle* object) //-------------------------------------------------------------------------------------------------- void PdmXmlObjectHandle::resolveReferencesRecursively(PdmObjectHandle* object) { - if (object == NULL) return; + if (object == nullptr) return; std::vector fields; object->fields(fields); @@ -308,7 +308,7 @@ void PdmXmlObjectHandle::resolveReferencesRecursively(PdmObjectHandle* object) //-------------------------------------------------------------------------------------------------- void PdmXmlObjectHandle::setupBeforeSaveRecursively(PdmObjectHandle* object) { - if (object == NULL) return; + if (object == nullptr) return; std::vector fields; object->fields(fields); diff --git a/Fwk/AppFwk/cafTests/cafTestApplication/CustomObjectEditor.cpp b/Fwk/AppFwk/cafTests/cafTestApplication/CustomObjectEditor.cpp index 3982460086..9085e7bbe7 100644 --- a/Fwk/AppFwk/cafTests/cafTestApplication/CustomObjectEditor.cpp +++ b/Fwk/AppFwk/cafTests/cafTestApplication/CustomObjectEditor.cpp @@ -155,7 +155,7 @@ void CustomObjectEditor::recursivelyConfigureAndUpdateTopLevelUiItems(const std: { resetCellId(); - QWidget* previousTabOrderWidget = NULL; + QWidget* previousTabOrderWidget = nullptr; for (size_t i = 0; i < topLevelUiItems.size(); ++i) { diff --git a/Fwk/AppFwk/cafTests/cafTestApplication/CustomObjectEditor.h b/Fwk/AppFwk/cafTests/cafTestApplication/CustomObjectEditor.h index c6a945c686..cb5e88593c 100644 --- a/Fwk/AppFwk/cafTests/cafTestApplication/CustomObjectEditor.h +++ b/Fwk/AppFwk/cafTests/cafTestApplication/CustomObjectEditor.h @@ -71,7 +71,7 @@ public: void defineGridLayout(int rowCount, int columnCount); // See QGridLayout::addWidget - void addWidget(QWidget* widget, int row, int column, int rowSpan, int columnSpan, Qt::Alignment alignment = 0); + void addWidget(QWidget* widget, int row, int column, int rowSpan, int columnSpan, Qt::Alignment alignment = nullptr); void removeWidget(QWidget* widget); void addBlankCell(int row, int column); diff --git a/Fwk/AppFwk/cafTests/cafTestApplication/MainWindow.cpp b/Fwk/AppFwk/cafTests/cafTestApplication/MainWindow.cpp index 4e43e4d42f..b7ef99938a 100644 --- a/Fwk/AppFwk/cafTests/cafTestApplication/MainWindow.cpp +++ b/Fwk/AppFwk/cafTests/cafTestApplication/MainWindow.cpp @@ -559,7 +559,7 @@ CAF_PDM_SOURCE_INIT(DemoPdmObject, "DemoPdmObject"); -MainWindow* MainWindow::sm_mainWindowInstance = NULL; +MainWindow* MainWindow::sm_mainWindowInstance = nullptr; //-------------------------------------------------------------------------------------------------- /// @@ -789,10 +789,10 @@ void MainWindow::setPdmRoot(caf::PdmObjectHandle* pdmRoot) //-------------------------------------------------------------------------------------------------- MainWindow::~MainWindow() { - m_pdmUiTreeView->setPdmItem(NULL); - m_pdmUiTreeView2->setPdmItem(NULL); - m_pdmUiPropertyView->showProperties(NULL); - m_pdmUiTableView->setListField(NULL); + m_pdmUiTreeView->setPdmItem(nullptr); + m_pdmUiTreeView2->setPdmItem(nullptr); + m_pdmUiPropertyView->showProperties(nullptr); + m_pdmUiTableView->setListField(nullptr); delete m_pdmUiTreeView; delete m_pdmUiTreeView2; @@ -865,7 +865,7 @@ void MainWindow::slotInsert() for (size_t i = 0; i < selection.size(); ++i) { caf::PdmUiFieldHandle* uiFh = dynamic_cast(selection[i]); - caf::PdmChildArrayField< caf::PdmObjectHandle*> * field = NULL; + caf::PdmChildArrayField< caf::PdmObjectHandle*> * field = nullptr; if (uiFh) field = dynamic_cast *>(uiFh->fieldHandle()); @@ -935,8 +935,8 @@ void MainWindow::slotSimpleSelectionChanged() { std::vector selection; m_pdmUiTreeView->selectedUiItems(selection); - caf::PdmObjectHandle* obj = NULL; - caf::PdmChildArrayFieldHandle* listField = NULL; + caf::PdmObjectHandle* obj = nullptr; + caf::PdmChildArrayFieldHandle* listField = nullptr; if (selection.size()) { @@ -954,8 +954,8 @@ void MainWindow::slotShowTableView() { std::vector selection; m_pdmUiTreeView2->selectedUiItems(selection); - caf::PdmObjectHandle* obj = NULL; - caf::PdmChildArrayFieldHandle* listField = NULL; + caf::PdmObjectHandle* obj = nullptr; + caf::PdmChildArrayFieldHandle* listField = nullptr; if (selection.size()) { @@ -969,7 +969,7 @@ void MainWindow::slotShowTableView() { if (!listField->hasSameFieldCountForAllObjects()) { - listField = NULL; + listField = nullptr; } } } diff --git a/Fwk/AppFwk/cafTests/cafTestApplication/WidgetLayoutTest.cpp b/Fwk/AppFwk/cafTests/cafTestApplication/WidgetLayoutTest.cpp index ce5e33eca1..0953e82eaa 100644 --- a/Fwk/AppFwk/cafTests/cafTestApplication/WidgetLayoutTest.cpp +++ b/Fwk/AppFwk/cafTests/cafTestApplication/WidgetLayoutTest.cpp @@ -96,7 +96,7 @@ void WidgetLayoutTest::setUpInitialConfigurationA() m_mainLayout->addWidget(m_widget2); delete m_widget3; - m_widget3 = NULL; + m_widget3 = nullptr; } //-------------------------------------------------------------------------------------------------- diff --git a/Fwk/AppFwk/cafTests/cafTestApplication/WidgetLayoutTest.h b/Fwk/AppFwk/cafTests/cafTestApplication/WidgetLayoutTest.h index 662765c544..2099e34c90 100644 --- a/Fwk/AppFwk/cafTests/cafTestApplication/WidgetLayoutTest.h +++ b/Fwk/AppFwk/cafTests/cafTestApplication/WidgetLayoutTest.h @@ -13,7 +13,7 @@ class WidgetLayoutTest : public QWidget Q_OBJECT public: - WidgetLayoutTest(QWidget* parent = 0, Qt::WindowFlags f = 0); + WidgetLayoutTest(QWidget* parent = nullptr, Qt::WindowFlags f = nullptr); ~WidgetLayoutTest(); private: diff --git a/Fwk/AppFwk/cafUserInterface/QMinimizePanel.h b/Fwk/AppFwk/cafUserInterface/QMinimizePanel.h index f1738b58d8..670ffbb7c1 100644 --- a/Fwk/AppFwk/cafUserInterface/QMinimizePanel.h +++ b/Fwk/AppFwk/cafUserInterface/QMinimizePanel.h @@ -51,8 +51,8 @@ class QMinimizePanel : public QWidget { Q_OBJECT public: - explicit QMinimizePanel(QWidget* parent=0); - explicit QMinimizePanel(const QString &title, QWidget* parent=0); + explicit QMinimizePanel(QWidget* parent=nullptr); + explicit QMinimizePanel(const QString &title, QWidget* parent=nullptr); ~QMinimizePanel(); QFrame* contentFrame() { return m_contentFrame; } diff --git a/Fwk/AppFwk/cafUserInterface/cafPdmUiCheckBoxDelegate.h b/Fwk/AppFwk/cafUserInterface/cafPdmUiCheckBoxDelegate.h index ca50434112..b13b8a0bfe 100644 --- a/Fwk/AppFwk/cafUserInterface/cafPdmUiCheckBoxDelegate.h +++ b/Fwk/AppFwk/cafUserInterface/cafPdmUiCheckBoxDelegate.h @@ -52,7 +52,7 @@ class PdmUiCheckBoxDelegate : public QStyledItemDelegate Q_OBJECT public: - explicit PdmUiCheckBoxDelegate( QObject* pParent = 0 ); + explicit PdmUiCheckBoxDelegate( QObject* pParent = nullptr ); virtual ~PdmUiCheckBoxDelegate(); virtual void paint(QPainter *painter, const QStyleOptionViewItem &option, const QModelIndex &index) const; diff --git a/Fwk/AppFwk/cafUserInterface/cafPdmUiComboBoxEditor.cpp b/Fwk/AppFwk/cafUserInterface/cafPdmUiComboBoxEditor.cpp index 5efac2f178..02eef60c6e 100644 --- a/Fwk/AppFwk/cafUserInterface/cafPdmUiComboBoxEditor.cpp +++ b/Fwk/AppFwk/cafUserInterface/cafPdmUiComboBoxEditor.cpp @@ -182,7 +182,7 @@ void PdmUiComboBoxEditor::configureAndUpdateUi(const QString& uiConfigName) class CustomQComboBox : public QComboBox { public: - explicit CustomQComboBox(QWidget* parent = 0) + explicit CustomQComboBox(QWidget* parent = nullptr) : QComboBox(parent) {} diff --git a/Fwk/AppFwk/cafUserInterface/cafPdmUiDoubleSliderEditor.cpp b/Fwk/AppFwk/cafUserInterface/cafPdmUiDoubleSliderEditor.cpp index a875ac4721..92a06dc0bd 100644 --- a/Fwk/AppFwk/cafUserInterface/cafPdmUiDoubleSliderEditor.cpp +++ b/Fwk/AppFwk/cafUserInterface/cafPdmUiDoubleSliderEditor.cpp @@ -51,7 +51,7 @@ class PdmDoubleValidator : public QDoubleValidator { public: - explicit PdmDoubleValidator(QObject * parent = 0) : QDoubleValidator(parent) + explicit PdmDoubleValidator(QObject * parent = nullptr) : QDoubleValidator(parent) { } diff --git a/Fwk/AppFwk/cafUserInterface/cafPdmUiFieldEditorHelper.cpp b/Fwk/AppFwk/cafUserInterface/cafPdmUiFieldEditorHelper.cpp index 35f21b0a89..174afc9c6d 100644 --- a/Fwk/AppFwk/cafUserInterface/cafPdmUiFieldEditorHelper.cpp +++ b/Fwk/AppFwk/cafUserInterface/cafPdmUiFieldEditorHelper.cpp @@ -49,7 +49,7 @@ //-------------------------------------------------------------------------------------------------- caf::PdmUiFieldEditorHandle* caf::PdmUiFieldEditorHelper::fieldEditorForField(caf::PdmUiFieldHandle* field, const QString& uiConfigName) { - caf::PdmUiFieldEditorHandle* fieldEditor = NULL; + caf::PdmUiFieldEditorHandle* fieldEditor = nullptr; // If editor type is specified, find in factory if (!field->uiEditorTypeName(uiConfigName).isEmpty()) diff --git a/Fwk/AppFwk/cafUserInterface/cafPdmUiLineEditor.cpp b/Fwk/AppFwk/cafUserInterface/cafPdmUiLineEditor.cpp index 0f37949f40..dcea9d4c1e 100644 --- a/Fwk/AppFwk/cafUserInterface/cafPdmUiLineEditor.cpp +++ b/Fwk/AppFwk/cafUserInterface/cafPdmUiLineEditor.cpp @@ -208,7 +208,7 @@ void PdmUiLineEditor::configureAndUpdateUi(const QString& uiConfigName) { if (isMultipleFieldsWithSameKeywordSelected(field()->fieldHandle())) { - QMessageBox::information(NULL, "Invalid operation", "The field you are manipulating is defined to have unique values. A selection of multiple fields is detected. Please select a single item."); + QMessageBox::information(nullptr, "Invalid operation", "The field you are manipulating is defined to have unique values. A selection of multiple fields is detected. Please select a single item."); } m_lineEdit->setValidator(new PdmUniqueIdValidator(leab.usedIds, isMultipleFieldsWithSameKeywordSelected(field()->fieldHandle()), leab.errorMessage, this)); diff --git a/Fwk/AppFwk/cafUserInterface/cafPdmUiListEditor.cpp b/Fwk/AppFwk/cafUserInterface/cafPdmUiListEditor.cpp index ea7bf022f0..73e985ad0e 100644 --- a/Fwk/AppFwk/cafUserInterface/cafPdmUiListEditor.cpp +++ b/Fwk/AppFwk/cafUserInterface/cafPdmUiListEditor.cpp @@ -64,7 +64,7 @@ class MyStringListModel : public QStringListModel { public: - explicit MyStringListModel(QObject *parent = 0) : m_isItemsEditable(false), QStringListModel(parent) { } + explicit MyStringListModel(QObject *parent = nullptr) : m_isItemsEditable(false), QStringListModel(parent) { } virtual Qt::ItemFlags flags (const QModelIndex& index) const { @@ -90,7 +90,7 @@ private: class QListViewHeightHint : public QListView { public: - explicit QListViewHeightHint(QWidget *parent = 0) + explicit QListViewHeightHint(QWidget *parent = nullptr) : m_heightHint(-1) { } diff --git a/Fwk/AppFwk/cafUserInterface/cafPdmUiListView.h b/Fwk/AppFwk/cafUserInterface/cafPdmUiListView.h index f2a4f12e69..8ec2a9303f 100644 --- a/Fwk/AppFwk/cafUserInterface/cafPdmUiListView.h +++ b/Fwk/AppFwk/cafUserInterface/cafPdmUiListView.h @@ -54,7 +54,7 @@ class PdmUiListView : public QWidget { Q_OBJECT public: - PdmUiListView(QWidget* parent = 0, Qt::WindowFlags f = 0); + PdmUiListView(QWidget* parent = nullptr, Qt::WindowFlags f = nullptr); ~PdmUiListView(); void setPdmObject(caf::PdmObjectCollection* object); diff --git a/Fwk/AppFwk/cafUserInterface/cafPdmUiListViewEditor.cpp b/Fwk/AppFwk/cafUserInterface/cafPdmUiListViewEditor.cpp index 014efad09e..f850ee4482 100644 --- a/Fwk/AppFwk/cafUserInterface/cafPdmUiListViewEditor.cpp +++ b/Fwk/AppFwk/cafUserInterface/cafPdmUiListViewEditor.cpp @@ -59,7 +59,7 @@ UiListViewModelPdm::UiListViewModelPdm(QObject* parent) : QAbstractTableModel(parent) { m_columnCount = 0; - m_pdmObjectGroup = NULL; + m_pdmObjectGroup = nullptr; } //-------------------------------------------------------------------------------------------------- diff --git a/Fwk/AppFwk/cafUserInterface/cafPdmUiPropertyView.cpp b/Fwk/AppFwk/cafUserInterface/cafPdmUiPropertyView.cpp index 1f9408cd1b..c8b61f693c 100644 --- a/Fwk/AppFwk/cafUserInterface/cafPdmUiPropertyView.cpp +++ b/Fwk/AppFwk/cafUserInterface/cafPdmUiPropertyView.cpp @@ -98,7 +98,7 @@ PdmUiPropertyView::PdmUiPropertyView(QWidget* parent, Qt::WindowFlags f) dummy->setContentsMargins(0,0,0,0); dummy->addWidget(scrollArea); - m_currentObjectView = NULL; + m_currentObjectView = nullptr; } //-------------------------------------------------------------------------------------------------- @@ -123,7 +123,7 @@ void PdmUiPropertyView::setUiConfigurationName(QString uiConfigName) { PdmObjectHandle* object = m_currentObjectView->pdmObject(); delete m_currentObjectView; - m_currentObjectView = NULL; + m_currentObjectView = nullptr; this->showProperties(object); } } @@ -163,7 +163,7 @@ void PdmUiPropertyView::showProperties( PdmObjectHandle* object) { this->m_placeHolderLayout->removeWidget(m_currentObjectView->widget()); delete m_currentObjectView; - m_currentObjectView = NULL; + m_currentObjectView = nullptr; } if (!m_currentObjectView) @@ -192,7 +192,7 @@ void PdmUiPropertyView::showProperties( PdmObjectHandle* object) //-------------------------------------------------------------------------------------------------- PdmObjectHandle* PdmUiPropertyView::currentObject() { - if (!m_currentObjectView) return NULL; + if (!m_currentObjectView) return nullptr; return m_currentObjectView->pdmObject(); } diff --git a/Fwk/AppFwk/cafUserInterface/cafPdmUiPropertyView.h b/Fwk/AppFwk/cafUserInterface/cafPdmUiPropertyView.h index c7883b611b..9e50433023 100644 --- a/Fwk/AppFwk/cafUserInterface/cafPdmUiPropertyView.h +++ b/Fwk/AppFwk/cafUserInterface/cafPdmUiPropertyView.h @@ -53,7 +53,7 @@ class QVerticalScrollArea : public QScrollArea { Q_OBJECT public: - explicit QVerticalScrollArea(QWidget* parent = 0); + explicit QVerticalScrollArea(QWidget* parent = nullptr); virtual bool eventFilter(QObject* object, QEvent* event) override; }; @@ -72,7 +72,7 @@ class PdmUiPropertyView : public QWidget { Q_OBJECT public: - PdmUiPropertyView(QWidget* parent = 0, Qt::WindowFlags f = 0); + PdmUiPropertyView(QWidget* parent = nullptr, Qt::WindowFlags f = nullptr); ~PdmUiPropertyView(); void setUiConfigurationName(QString uiConfigName); diff --git a/Fwk/AppFwk/cafUserInterface/cafPdmUiPropertyViewDialog.cpp b/Fwk/AppFwk/cafUserInterface/cafPdmUiPropertyViewDialog.cpp index f20874fe55..e5febf3df8 100644 --- a/Fwk/AppFwk/cafUserInterface/cafPdmUiPropertyViewDialog.cpp +++ b/Fwk/AppFwk/cafUserInterface/cafPdmUiPropertyViewDialog.cpp @@ -75,7 +75,7 @@ PdmUiPropertyViewDialog::PdmUiPropertyViewDialog(QWidget* parent, PdmObject* obj //-------------------------------------------------------------------------------------------------- PdmUiPropertyViewDialog::~PdmUiPropertyViewDialog() { - m_pdmUiPropertyView->showProperties(NULL); + m_pdmUiPropertyView->showProperties(nullptr); } //-------------------------------------------------------------------------------------------------- diff --git a/Fwk/AppFwk/cafUserInterface/cafPdmUiTableView.h b/Fwk/AppFwk/cafUserInterface/cafPdmUiTableView.h index ba6e6299e4..855562ee4e 100644 --- a/Fwk/AppFwk/cafUserInterface/cafPdmUiTableView.h +++ b/Fwk/AppFwk/cafUserInterface/cafPdmUiTableView.h @@ -76,7 +76,7 @@ class PdmUiTableView : public QWidget, public DataModelObserver { Q_OBJECT public: - PdmUiTableView(QWidget* parent = 0, Qt::WindowFlags f = 0); + PdmUiTableView(QWidget* parent = nullptr, Qt::WindowFlags f = nullptr); ~PdmUiTableView(); PdmObjectHandle* pdmObjectFromModelIndex(const QModelIndex& mi); diff --git a/Fwk/AppFwk/cafUserInterface/cafPdmUiTableViewEditor.cpp b/Fwk/AppFwk/cafUserInterface/cafPdmUiTableViewEditor.cpp index 238ca9dcc4..05c89f41e5 100644 --- a/Fwk/AppFwk/cafUserInterface/cafPdmUiTableViewEditor.cpp +++ b/Fwk/AppFwk/cafUserInterface/cafPdmUiTableViewEditor.cpp @@ -91,13 +91,13 @@ private: //-------------------------------------------------------------------------------------------------- PdmUiTableViewEditor::PdmUiTableViewEditor() { - m_layout = NULL;; - m_tableView = NULL; - m_tableHeading = NULL; - m_tableModelPdm = NULL; - m_tableHeadingIcon = NULL; - m_pdmListField = NULL; - m_delegate = NULL; + m_layout = nullptr;; + m_tableView = nullptr; + m_tableHeading = nullptr; + m_tableModelPdm = nullptr; + m_tableHeadingIcon = nullptr; + m_pdmListField = nullptr; + m_delegate = nullptr; m_useDefaultContextMenu = false; @@ -201,7 +201,7 @@ void PdmUiTableViewEditor::setListField(PdmChildArrayFieldHandle* pdmListField) { m_pdmListField = pdmListField; - caf::PdmUiFieldHandle* uifield = NULL; + caf::PdmUiFieldHandle* uifield = nullptr; if (m_pdmListField) { uifield = m_pdmListField->uiCapability(); @@ -210,7 +210,7 @@ void PdmUiTableViewEditor::setListField(PdmChildArrayFieldHandle* pdmListField) if (!m_pdmListField) { - m_tableModelPdm->setPdmData(NULL, ""); + m_tableModelPdm->setPdmData(nullptr, ""); m_tableHeading->setText(""); m_tableHeadingIcon->setPixmap(QPixmap()); } @@ -297,7 +297,7 @@ void PdmUiTableViewEditor::updateContextMenuSignals() else { m_tableView->setContextMenuPolicy(Qt::DefaultContextMenu); - disconnect(m_tableView, 0, this, 0); + disconnect(m_tableView, nullptr, this, nullptr); } } @@ -375,7 +375,7 @@ PdmObjectHandle* PdmUiTableViewEditor::pdmObjectFromModelIndex(const QModelIndex return m_tableModelPdm->pdmObjectForRow(mi.row()); } - return NULL; + return nullptr; } //-------------------------------------------------------------------------------------------------- diff --git a/Fwk/AppFwk/cafUserInterface/cafPdmUiTableViewModel.cpp b/Fwk/AppFwk/cafUserInterface/cafPdmUiTableViewModel.cpp index b4da6f43d2..eb5e0c2b61 100644 --- a/Fwk/AppFwk/cafUserInterface/cafPdmUiTableViewModel.cpp +++ b/Fwk/AppFwk/cafUserInterface/cafPdmUiTableViewModel.cpp @@ -62,7 +62,7 @@ namespace caf PdmUiTableViewModel::PdmUiTableViewModel(QWidget* parent) : QAbstractTableModel(parent) { - m_pdmList = NULL; + m_pdmList = nullptr; } //-------------------------------------------------------------------------------------------------- @@ -353,7 +353,7 @@ void PdmUiTableViewModel::setPdmData(PdmChildArrayFieldHandle* listField, const std::map::iterator it; for (it = m_fieldEditors.begin(); it != m_fieldEditors.end(); ++it) { - it->second->setField(NULL); + it->second->setField(nullptr); } m_modelColumnIndexToFieldIndex.clear(); @@ -366,7 +366,7 @@ void PdmUiTableViewModel::setPdmData(PdmChildArrayFieldHandle* listField, const { PdmUiFieldHandle* field = dynamic_cast(uiItems[i]); - PdmUiFieldEditorHandle* fieldEditor = NULL; + PdmUiFieldEditorHandle* fieldEditor = nullptr; // Find or create FieldEditor std::map::iterator it; @@ -392,7 +392,7 @@ void PdmUiTableViewModel::setPdmData(PdmChildArrayFieldHandle* listField, const //TODO: Create/update is not required at this point, as UI is recreated in getEditorWidgetAndTransferOwnership() // Can be moved, but a move will require changes in PdmUiFieldEditorHandle - fieldEditor->createWidgets(NULL); + fieldEditor->createWidgets(nullptr); fieldEditor->updateUi(configName); int fieldIndex = getFieldIndex(field->fieldHandle()); @@ -407,7 +407,7 @@ void PdmUiTableViewModel::setPdmData(PdmChildArrayFieldHandle* listField, const std::vector< QString > fvhToRemoveFromMap; for (it = m_fieldEditors.begin(); it != m_fieldEditors.end(); ++it) { - if (it->second->field() == 0) + if (it->second->field() == nullptr) { PdmUiFieldEditorHandle* fvh = it->second; delete fvh; @@ -451,7 +451,7 @@ PdmFieldHandle* PdmUiTableViewModel::getField(const QModelIndex &index) const } } - return NULL; + return nullptr; } //-------------------------------------------------------------------------------------------------- @@ -462,10 +462,10 @@ PdmUiFieldEditorHandle* PdmUiTableViewModel::getEditor(const QModelIndex &index) PdmFieldHandle* field = getField(index); if (!field) { - return NULL; + return nullptr; } - PdmUiFieldEditorHandle* editor = NULL; + PdmUiFieldEditorHandle* editor = nullptr; std::map::iterator it; it = m_fieldEditors.find(field->keyword()); @@ -503,7 +503,7 @@ QWidget* PdmUiTableViewModel::getEditorWidgetAndTransferOwnership(QWidget* paren return editorWidget; } - return NULL; + return nullptr; } //-------------------------------------------------------------------------------------------------- @@ -559,7 +559,7 @@ PdmObjectHandle* PdmUiTableViewModel::pdmObjectForRow(int row) const return m_pdmList->at(row); } - return NULL; + return nullptr; } //-------------------------------------------------------------------------------------------------- diff --git a/Fwk/AppFwk/cafUserInterface/cafPdmUiTableViewModel.h b/Fwk/AppFwk/cafUserInterface/cafPdmUiTableViewModel.h index cd6904272e..18cde6c980 100644 --- a/Fwk/AppFwk/cafUserInterface/cafPdmUiTableViewModel.h +++ b/Fwk/AppFwk/cafUserInterface/cafPdmUiTableViewModel.h @@ -64,7 +64,7 @@ class TableViewPushButton : public QPushButton { Q_OBJECT public: - explicit TableViewPushButton(caf::PdmUiFieldHandle* field, const QString& text, QWidget* parent = 0); + explicit TableViewPushButton(caf::PdmUiFieldHandle* field, const QString& text, QWidget* parent = nullptr); private slots: void slotPressed(); diff --git a/Fwk/AppFwk/cafUserInterface/cafPdmUiTextEditor.h b/Fwk/AppFwk/cafUserInterface/cafPdmUiTextEditor.h index de898ed881..e0e9fc07a0 100644 --- a/Fwk/AppFwk/cafUserInterface/cafPdmUiTextEditor.h +++ b/Fwk/AppFwk/cafUserInterface/cafPdmUiTextEditor.h @@ -92,7 +92,7 @@ class TextEdit : public QTextEdit { Q_OBJECT public: - explicit TextEdit(QWidget *parent = 0); + explicit TextEdit(QWidget *parent = nullptr); virtual QSize sizeHint() const override; void setHeightHint(int heightHint); diff --git a/Fwk/AppFwk/cafUserInterface/cafPdmUiToolButtonEditor.cpp b/Fwk/AppFwk/cafUserInterface/cafPdmUiToolButtonEditor.cpp index 50b18bf29f..872565ffbf 100644 --- a/Fwk/AppFwk/cafUserInterface/cafPdmUiToolButtonEditor.cpp +++ b/Fwk/AppFwk/cafUserInterface/cafPdmUiToolButtonEditor.cpp @@ -101,7 +101,7 @@ QWidget* PdmUiToolButtonEditor::createEditorWidget(QWidget * parent) //-------------------------------------------------------------------------------------------------- QWidget* PdmUiToolButtonEditor::createLabelWidget(QWidget * parent) { - return NULL; + return nullptr; } //-------------------------------------------------------------------------------------------------- diff --git a/Fwk/AppFwk/cafUserInterface/cafPdmUiTreeItemEditor.cpp b/Fwk/AppFwk/cafUserInterface/cafPdmUiTreeItemEditor.cpp index 011abca12a..3e6d148890 100644 --- a/Fwk/AppFwk/cafUserInterface/cafPdmUiTreeItemEditor.cpp +++ b/Fwk/AppFwk/cafUserInterface/cafPdmUiTreeItemEditor.cpp @@ -46,7 +46,7 @@ namespace caf //-------------------------------------------------------------------------------------------------- PdmUiTreeItemEditor::PdmUiTreeItemEditor(PdmUiItem* uiItem) { - m_treeViewEditor = NULL; + m_treeViewEditor = nullptr; this->bindToPdmItem(uiItem); } diff --git a/Fwk/AppFwk/cafUserInterface/cafPdmUiTreeSelectionEditor.cpp b/Fwk/AppFwk/cafUserInterface/cafPdmUiTreeSelectionEditor.cpp index ca3caf59d7..c481bfd86e 100644 --- a/Fwk/AppFwk/cafUserInterface/cafPdmUiTreeSelectionEditor.cpp +++ b/Fwk/AppFwk/cafUserInterface/cafPdmUiTreeSelectionEditor.cpp @@ -61,7 +61,7 @@ class QTreeViewHeightHint : public QTreeView { public: - explicit QTreeViewHeightHint(QWidget *parent = 0) + explicit QTreeViewHeightHint(QWidget *parent = nullptr) : m_heightHint(-1) { } @@ -100,7 +100,7 @@ private: class FilterLeafNodesOnlyProxyModel : public QSortFilterProxyModel { public: - FilterLeafNodesOnlyProxyModel(QObject *parent = 0) + FilterLeafNodesOnlyProxyModel(QObject *parent = nullptr) : QSortFilterProxyModel(parent) { } @@ -131,7 +131,7 @@ protected: class PlaceholderLineEdit : public QLineEdit { public: - explicit PlaceholderLineEdit(const QString& placeholderText, QWidget* parent = 0) + explicit PlaceholderLineEdit(const QString& placeholderText, QWidget* parent = nullptr) : QLineEdit(parent), m_placeholderText(placeholderText) { diff --git a/Fwk/AppFwk/cafUserInterface/cafPdmUiTreeSelectionQModel.h b/Fwk/AppFwk/cafUserInterface/cafPdmUiTreeSelectionQModel.h index a80f788422..9b4191a793 100644 --- a/Fwk/AppFwk/cafUserInterface/cafPdmUiTreeSelectionQModel.h +++ b/Fwk/AppFwk/cafUserInterface/cafPdmUiTreeSelectionQModel.h @@ -58,7 +58,7 @@ class PdmUiTreeSelectionQModel : public QAbstractItemModel { Q_OBJECT public: - explicit PdmUiTreeSelectionQModel(QObject *parent = 0); + explicit PdmUiTreeSelectionQModel(QObject *parent = nullptr); ~PdmUiTreeSelectionQModel(); static int headingRole(); diff --git a/Fwk/AppFwk/cafUserInterface/cafPdmUiTreeView.cpp b/Fwk/AppFwk/cafUserInterface/cafPdmUiTreeView.cpp index 6867a4133c..a0b0e7c16e 100644 --- a/Fwk/AppFwk/cafUserInterface/cafPdmUiTreeView.cpp +++ b/Fwk/AppFwk/cafUserInterface/cafPdmUiTreeView.cpp @@ -132,7 +132,7 @@ void PdmUiTreeView::slotOnSelectionChanged() std::vector objects; m_treeViewEditor->selectedUiItems(objects); - PdmObjectHandle* objHandle = NULL; + PdmObjectHandle* objHandle = nullptr; if (objects.size()) { diff --git a/Fwk/AppFwk/cafUserInterface/cafPdmUiTreeView.h b/Fwk/AppFwk/cafUserInterface/cafPdmUiTreeView.h index 91685bbc11..366e0baaf2 100644 --- a/Fwk/AppFwk/cafUserInterface/cafPdmUiTreeView.h +++ b/Fwk/AppFwk/cafUserInterface/cafPdmUiTreeView.h @@ -61,7 +61,7 @@ class PdmUiTreeView : public QWidget { Q_OBJECT public: - PdmUiTreeView(QWidget* parent = 0, Qt::WindowFlags f = 0); + PdmUiTreeView(QWidget* parent = nullptr, Qt::WindowFlags f = nullptr); ~PdmUiTreeView(); void enableDefaultContextMenu(bool enable); diff --git a/Fwk/AppFwk/cafUserInterface/cafPdmUiTreeViewEditor.cpp b/Fwk/AppFwk/cafUserInterface/cafPdmUiTreeViewEditor.cpp index 3cd2538941..e6dbc4cacf 100644 --- a/Fwk/AppFwk/cafUserInterface/cafPdmUiTreeViewEditor.cpp +++ b/Fwk/AppFwk/cafUserInterface/cafPdmUiTreeViewEditor.cpp @@ -64,7 +64,7 @@ namespace caf class PdmUiTreeViewWidget : public QTreeView { public: - explicit PdmUiTreeViewWidget(QWidget* parent = 0) : QTreeView(parent) {}; + explicit PdmUiTreeViewWidget(QWidget* parent = nullptr) : QTreeView(parent) {}; virtual ~PdmUiTreeViewWidget() {}; bool isTreeItemEditWidgetActive() const @@ -115,7 +115,7 @@ PdmUiTreeViewEditor::PdmUiTreeViewEditor() //-------------------------------------------------------------------------------------------------- PdmUiTreeViewEditor::~PdmUiTreeViewEditor() { - m_treeViewModel->setPdmItemRoot(NULL); + m_treeViewModel->setPdmItemRoot(nullptr); } //-------------------------------------------------------------------------------------------------- @@ -249,7 +249,7 @@ void PdmUiTreeViewEditor::updateContextMenuSignals() else { m_treeView->setContextMenuPolicy(Qt::DefaultContextMenu); - disconnect(m_treeView, 0, this, 0); + disconnect(m_treeView, nullptr, this, nullptr); } } @@ -303,7 +303,7 @@ PdmChildArrayFieldHandle* PdmUiTreeViewEditor::currentChildArrayFieldHandle() } } - return NULL; + return nullptr; } //-------------------------------------------------------------------------------------------------- diff --git a/Fwk/AppFwk/cafUserInterface/cafPdmUiTreeViewModel.cpp b/Fwk/AppFwk/cafUserInterface/cafPdmUiTreeViewModel.cpp index 2cb1ef0cda..846581f362 100644 --- a/Fwk/AppFwk/cafUserInterface/cafPdmUiTreeViewModel.cpp +++ b/Fwk/AppFwk/cafUserInterface/cafPdmUiTreeViewModel.cpp @@ -56,8 +56,8 @@ namespace caf //-------------------------------------------------------------------------------------------------- PdmUiTreeViewModel::PdmUiTreeViewModel(PdmUiTreeViewEditor* treeViewEditor) { - m_treeOrderingRoot = NULL; - m_dragDropInterface = NULL; + m_treeOrderingRoot = nullptr; + m_dragDropInterface = nullptr; m_treeViewEditor = treeViewEditor; } @@ -75,7 +75,7 @@ void PdmUiTreeViewModel::setPdmItemRoot(PdmUiItem* rootItem) return; } - PdmUiTreeOrdering* newRoot = NULL; + PdmUiTreeOrdering* newRoot = nullptr; PdmUiFieldHandle* field = dynamic_cast (rootItem); if (field) @@ -92,7 +92,7 @@ void PdmUiTreeViewModel::setPdmItemRoot(PdmUiItem* rootItem) } } - CAF_ASSERT( newRoot || rootItem == NULL ); // Only fields, objects or NULL is allowed. + CAF_ASSERT( newRoot || rootItem == nullptr ); // Only fields, objects or NULL is allowed. //if (newRoot) newRoot->debugDump(0); @@ -141,7 +141,7 @@ void PdmUiTreeViewModel::updateSubTree(PdmUiItem* pdmRoot) { // Build the new "Correct" Tree - PdmUiTreeOrdering* newTreeRootTmp = NULL; + PdmUiTreeOrdering* newTreeRootTmp = nullptr; PdmUiFieldHandle* field = dynamic_cast (pdmRoot); if (field) { @@ -167,7 +167,7 @@ void PdmUiTreeViewModel::updateSubTree(PdmUiItem* pdmRoot) QModelIndex existingSubTreeRootModIdx = findModelIndex(pdmRoot); - PdmUiTreeOrdering* existingSubTreeRoot = NULL; + PdmUiTreeOrdering* existingSubTreeRoot = nullptr; if (existingSubTreeRootModIdx.isValid()) { existingSubTreeRoot = treeItemFromIndex(existingSubTreeRootModIdx); @@ -460,7 +460,7 @@ QModelIndex PdmUiTreeViewModel::index(int row, int column, const QModelIndex &pa if (!m_treeOrderingRoot) return QModelIndex(); - PdmUiTreeOrdering* parentItem = NULL; + PdmUiTreeOrdering* parentItem = nullptr; if (!parentIndex.isValid()) parentItem = m_treeOrderingRoot; @@ -794,7 +794,7 @@ PdmUiItem* PdmUiTreeViewModel::uiItemFromModelIndex(const QModelIndex& index) co return treeItem->activeItem(); } - return NULL; + return nullptr; } //-------------------------------------------------------------------------------------------------- diff --git a/Fwk/AppFwk/cafUserInterface/cafPdmUiWidgetBasedObjectEditor.cpp b/Fwk/AppFwk/cafUserInterface/cafPdmUiWidgetBasedObjectEditor.cpp index 6419e3b31d..4d725388c4 100644 --- a/Fwk/AppFwk/cafUserInterface/cafPdmUiWidgetBasedObjectEditor.cpp +++ b/Fwk/AppFwk/cafUserInterface/cafPdmUiWidgetBasedObjectEditor.cpp @@ -76,7 +76,7 @@ void caf::PdmUiWidgetBasedObjectEditor::recursivelyConfigureAndUpdateUiItemsInGr CAF_ASSERT(containerWidgetWithGridLayout); int currentRowIndex = 0; - QWidget* previousTabOrderWidget = NULL; + QWidget* previousTabOrderWidget = nullptr; // Currently, only QGridLayout is supported QGridLayout* parentLayout = dynamic_cast(containerWidgetWithGridLayout->layout()); @@ -204,8 +204,8 @@ bool caf::PdmUiWidgetBasedObjectEditor::isUiGroupExpanded(const PdmUiGroup* uiGr QMinimizePanel* caf::PdmUiWidgetBasedObjectEditor::findOrCreateGroupBox(QWidget* parent, PdmUiGroup* group, const QString& uiConfigName) { QString groupBoxKey = group->keyword(); - QMinimizePanel* groupBox = NULL; - QGridLayout* groupBoxLayout = NULL; + QMinimizePanel* groupBox = nullptr; + QGridLayout* groupBoxLayout = nullptr; // Find or create groupBox std::map >::iterator it; @@ -338,7 +338,7 @@ void caf::PdmUiWidgetBasedObjectEditor::configureAndUpdateUi(const QString& uiCo std::map::iterator it; for (it = m_fieldViews.begin(); it != m_fieldViews.end(); ++it) { - it->second->setField(NULL); + it->second->setField(nullptr); } // Set all group Boxes to be unvisited @@ -352,7 +352,7 @@ void caf::PdmUiWidgetBasedObjectEditor::configureAndUpdateUi(const QString& uiCo std::vector< PdmFieldHandle* > fvhToRemoveFromMap; for (it = m_fieldViews.begin(); it != m_fieldViews.end(); ++it) { - if (it->second->field() == 0) + if (it->second->field() == nullptr) { PdmUiFieldEditorHandle* fvh = it->second; delete fvh; diff --git a/Fwk/AppFwk/cafUserInterface/cafProgressInfo.cpp b/Fwk/AppFwk/cafUserInterface/cafProgressInfo.cpp index f93989f57a..a288998d7a 100644 --- a/Fwk/AppFwk/cafUserInterface/cafProgressInfo.cpp +++ b/Fwk/AppFwk/cafUserInterface/cafProgressInfo.cpp @@ -407,7 +407,7 @@ namespace caf { //progressDialog()->setWindowModality(Qt::ApplicationModal); progressDialog()->setMinimum(0); progressDialog()->setWindowTitle(title); - progressDialog()->setCancelButton(NULL); + progressDialog()->setCancelButton(nullptr); progressDialog()->show(); } @@ -557,7 +557,7 @@ namespace caf { // If we are finishing the last level, clean up if (!maxProgressStack_v.size()) { - if (progressDialog() != NULL) + if (progressDialog() != nullptr) { progressDialog()->reset(); progressDialog()->close(); diff --git a/Fwk/AppFwk/cafUserInterface/cafUiProcess.h b/Fwk/AppFwk/cafUserInterface/cafUiProcess.h index b7d365cddb..cdae59e947 100644 --- a/Fwk/AppFwk/cafUserInterface/cafUiProcess.h +++ b/Fwk/AppFwk/cafUserInterface/cafUiProcess.h @@ -60,7 +60,7 @@ private: QTime m_timer; public: - explicit UiProcess(QObject* pParent = 0); + explicit UiProcess(QObject* pParent = nullptr); private: void doEmitStatusMsg(const QString& msg, int statusMsgType);