(clang-tidy) : modernize-use-nullptr

This commit is contained in:
Magne Sjaastad
2018-02-18 18:56:43 +01:00
parent 69875eec8f
commit 1ae30ef11a
195 changed files with 552 additions and 552 deletions

View File

@@ -47,7 +47,7 @@ void RicEditPreferencesFeature::onActionTriggered(bool isChecked)
RiaApplication* app = RiaApplication::instance();
QStringList tabNames = app->preferences()->tabNames();
RiuPropertyViewTabWidget propertyDialog(NULL, app->preferences(), "Preferences", tabNames);
RiuPropertyViewTabWidget propertyDialog(nullptr, app->preferences(), "Preferences", tabNames);
if (propertyDialog.exec() == QDialog::Accepted)
{
// Write preferences using QSettings and apply them to the application

View File

@@ -50,7 +50,7 @@ void RicHelpAboutFeature::onActionTriggered(bool isChecked)
{
this->disableModelChangeContribution();
caf::AboutDialog dlg(NULL);
caf::AboutDialog dlg(nullptr);
dlg.setApplicationName(RI_APPLICATION_NAME);
dlg.setApplicationVersion(RiaApplication::getVersionStringApp(true));

View File

@@ -46,7 +46,7 @@ void RicOpenProjectFeature::onActionTriggered(bool isChecked)
if (!app->askUserToSaveModifiedProject()) return;
QString defaultDir = app->lastUsedDialogDirectory("BINARY_GRID");
QString fileName = QFileDialog::getOpenFileName(NULL, "Open ResInsight Project", defaultDir, "ResInsight project (*.rsp *.rip);;All files(*.*)");
QString fileName = QFileDialog::getOpenFileName(nullptr, "Open ResInsight Project", defaultDir, "ResInsight project (*.rsp *.rip);;All files(*.*)");
if (fileName.isEmpty()) return;

View File

@@ -49,7 +49,7 @@ void RicAppendIntersectionFeature::onActionTriggered(bool isChecked)
caf::SelectionManager::instance()->objectsByType(&collection);
CVF_ASSERT(collection.size() == 1);
RimIntersectionCollection* intersectionCollection = NULL;
RimIntersectionCollection* intersectionCollection = nullptr;
collection[0]->firstAncestorOrThisOfType(intersectionCollection);
CVF_ASSERT(intersectionCollection);
@@ -71,7 +71,7 @@ void RicAppendIntersectionFeature::setupActionLook(QAction* actionToSetup)
///
//--------------------------------------------------------------------------------------------------
RicAppendIntersectionFeatureCmd::RicAppendIntersectionFeatureCmd(RimIntersectionCollection* intersectionCollection)
: CmdExecuteCommand(NULL),
: CmdExecuteCommand(nullptr),
m_intersectionCollection(intersectionCollection)
{
}

View File

@@ -81,7 +81,7 @@ void RicNewAzimuthDipIntersectionFeature::setupActionLook(QAction* actionToSetup
///
//--------------------------------------------------------------------------------------------------
RicNewAzimuthDipIntersectionFeatureCmd::RicNewAzimuthDipIntersectionFeatureCmd(RimIntersectionCollection* intersectionCollection)
: CmdExecuteCommand(NULL),
: CmdExecuteCommand(nullptr),
m_intersectionCollection(intersectionCollection)
{
}

View File

@@ -80,7 +80,7 @@ void RicNewPolylineIntersectionFeature::setupActionLook(QAction* actionToSetup)
///
//--------------------------------------------------------------------------------------------------
RicNewPolylineIntersectionFeatureCmd::RicNewPolylineIntersectionFeatureCmd(RimIntersectionCollection* intersectionCollection)
: CmdExecuteCommand(NULL),
: CmdExecuteCommand(nullptr),
m_intersectionCollection(intersectionCollection)
{
}

View File

@@ -52,7 +52,7 @@ void RicNewSimWellIntersectionFeature::onActionTriggered(bool isChecked)
RimSimWellInView* simWell = collection[0];
RimEclipseView* eclView = NULL;
RimEclipseView* eclView = nullptr;
simWell->firstAncestorOrThisOfType(eclView);
CVF_ASSERT(eclView);
@@ -73,7 +73,7 @@ void RicNewSimWellIntersectionFeature::setupActionLook(QAction* actionToSetup)
///
//--------------------------------------------------------------------------------------------------
RicNewSimWellIntersectionCmd::RicNewSimWellIntersectionCmd(RimIntersectionCollection* intersectionCollection, RimSimWellInView* simWell)
: CmdExecuteCommand(NULL),
: CmdExecuteCommand(nullptr),
m_intersectionCollection(intersectionCollection),
m_simWell(simWell)
{

View File

@@ -82,7 +82,7 @@ void RicNewWellPathIntersectionFeature::setupActionLook(QAction* actionToSetup)
///
//--------------------------------------------------------------------------------------------------
RicNewWellPathIntersectionFeatureCmd::RicNewWellPathIntersectionFeatureCmd(RimIntersectionCollection* intersectionCollection, RimWellPath* wellPath)
: CmdExecuteCommand(NULL),
: CmdExecuteCommand(nullptr),
m_intersectionCollection(intersectionCollection),
m_wellPath(wellPath)
{

View File

@@ -39,7 +39,7 @@ CAF_CMD_SOURCE_INIT(RicAddEclipseInputPropertyFeature, "RicAddEclipseInputProper
//--------------------------------------------------------------------------------------------------
bool RicAddEclipseInputPropertyFeature::isCommandEnabled()
{
return selectedInputPropertyCollection() != NULL;
return selectedInputPropertyCollection() != nullptr;
}
//--------------------------------------------------------------------------------------------------

View File

@@ -43,10 +43,10 @@ bool RicComputeStatisticsFeature::isCommandEnabled()
RimEclipseStatisticsCase* statisticsCase = selection[0];
if (statisticsCase)
{
RimIdenticalGridCaseGroup* gridCaseGroup = NULL;
RimIdenticalGridCaseGroup* gridCaseGroup = nullptr;
statisticsCase->firstAncestorOrThisOfType(gridCaseGroup);
RimCaseCollection* caseCollection = gridCaseGroup ? gridCaseGroup->caseCollection() : NULL;
RimCaseCollection* caseCollection = gridCaseGroup ? gridCaseGroup->caseCollection() : nullptr;
return caseCollection ? caseCollection->reservoirs.size() > 0 : false;
}
}

View File

@@ -50,7 +50,7 @@ void RicCreateGridCaseGroupFromFilesFeature::onActionTriggered(bool isChecked)
RiaApplication* app = RiaApplication::instance();
QString defaultDir = app->lastUsedDialogDirectory("INPUT_FILES");
RicFileHierarchyDialogResult result = RicFileHierarchyDialog::getOpenFileNames(NULL, "Create Grid Case Group from Files", defaultDir, m_pathFilter, m_fileNameFilter, QStringList(".EGRID"));
RicFileHierarchyDialogResult result = RicFileHierarchyDialog::getOpenFileNames(nullptr, "Create Grid Case Group from Files", defaultDir, m_pathFilter, m_fileNameFilter, QStringList(".EGRID"));
// Remember filters
m_pathFilter = result.pathFilter;

View File

@@ -33,7 +33,7 @@
///
//--------------------------------------------------------------------------------------------------
RicEclipseCaseNewGroupExec::RicEclipseCaseNewGroupExec()
: CmdExecuteCommand(NULL)
: CmdExecuteCommand(nullptr)
{
}
@@ -60,7 +60,7 @@ void RicEclipseCaseNewGroupExec::redo()
RimProject* proj = RiaApplication::instance()->project();
CVF_ASSERT(proj);
RimEclipseCaseCollection* analysisModels = proj->activeOilField() ? proj->activeOilField()->analysisModels() : NULL;
RimEclipseCaseCollection* analysisModels = proj->activeOilField() ? proj->activeOilField()->analysisModels() : nullptr;
if (analysisModels)
{

View File

@@ -91,7 +91,7 @@ void RicEclipsePropertyFilterFeatureImpl::insertPropertyFilter(RimEclipsePropert
//--------------------------------------------------------------------------------------------------
bool RicEclipsePropertyFilterFeatureImpl::isPropertyFilterCommandAvailable(caf::PdmObjectHandle* object)
{
Rim3dView* rimView = NULL;
Rim3dView* rimView = nullptr;
object->firstAncestorOrThisOfType(rimView);
if (rimView)
{

View File

@@ -31,7 +31,7 @@
///
//--------------------------------------------------------------------------------------------------
RicEclipsePropertyFilterInsertExec::RicEclipsePropertyFilterInsertExec(RimEclipsePropertyFilter* propertyFilter)
: CmdExecuteCommand(NULL)
: CmdExecuteCommand(nullptr)
{
CVF_ASSERT(propertyFilter);
m_propertyFilter = propertyFilter;

View File

@@ -30,7 +30,7 @@
///
//--------------------------------------------------------------------------------------------------
RicEclipsePropertyFilterNewExec::RicEclipsePropertyFilterNewExec(RimEclipsePropertyFilterCollection* propertyFilterCollection)
: CmdExecuteCommand(NULL)
: CmdExecuteCommand(nullptr)
{
assert(propertyFilterCollection);
m_propertyFilterCollection = propertyFilterCollection;

View File

@@ -52,7 +52,7 @@ void RicImportEclipseCasesFeature::onActionTriggered(bool isChecked)
RiaApplication* app = RiaApplication::instance();
QString defaultDir = app->lastUsedDialogDirectory("BINARY_GRID");
RicFileHierarchyDialogResult result = RicFileHierarchyDialog::getOpenFileNames(NULL,
RicFileHierarchyDialogResult result = RicFileHierarchyDialog::getOpenFileNames(nullptr,
"Import Eclipse Cases",
defaultDir,
m_pathFilter,

View File

@@ -39,7 +39,7 @@ CAF_CMD_SOURCE_INIT(RicNewStatisticsCaseFeature, "RicNewStatisticsCaseFeature");
//--------------------------------------------------------------------------------------------------
bool RicNewStatisticsCaseFeature::isCommandEnabled()
{
return selectedValidUIItem() != NULL;
return selectedValidUIItem() != nullptr;
}
//--------------------------------------------------------------------------------------------------
@@ -90,7 +90,7 @@ caf::PdmUiItem* RicNewStatisticsCaseFeature::selectedValidUIItem()
}
}
return NULL;
return nullptr;
}
//--------------------------------------------------------------------------------------------------
@@ -98,7 +98,7 @@ caf::PdmUiItem* RicNewStatisticsCaseFeature::selectedValidUIItem()
//--------------------------------------------------------------------------------------------------
RimEclipseStatisticsCase* RicNewStatisticsCaseFeature::addStatisticalCalculation(caf::PdmUiItem* uiItem)
{
RimIdenticalGridCaseGroup* caseGroup = NULL;
RimIdenticalGridCaseGroup* caseGroup = nullptr;
if (dynamic_cast<RimEclipseStatisticsCase*>(uiItem))
{
@@ -122,6 +122,6 @@ RimEclipseStatisticsCase* RicNewStatisticsCaseFeature::addStatisticalCalculation
}
else
{
return NULL;
return nullptr;
}
}

View File

@@ -69,7 +69,7 @@ void RicExportFaultsFeature::onActionTriggered(bool isChecked)
QString projectFolder = app->currentProjectPath();
QString defaultDir = RiaApplication::instance()->lastUsedDialogDirectoryWithFallback("FAULTS", projectFolder);
QString selectedDir = QFileDialog::getExistingDirectory(NULL, tr("Select Directory"), defaultDir);
QString selectedDir = QFileDialog::getExistingDirectory(nullptr, tr("Select Directory"), defaultDir);
if (selectedDir.isNull()) {
// Stop if folder selection was cancelled.

View File

@@ -79,7 +79,7 @@ void RicExportToLasFileFeature::onActionTriggered(bool isChecked)
featureUi.setRkbDiffs(wellNames, rkbDiffs);
}
caf::PdmUiPropertyViewDialog propertyDialog(NULL, &featureUi, "Export Curve Data to LAS file(s)", "", QDialogButtonBox::Ok | QDialogButtonBox::Cancel);
caf::PdmUiPropertyViewDialog propertyDialog(nullptr, &featureUi, "Export Curve Data to LAS file(s)", "", QDialogButtonBox::Ok | QDialogButtonBox::Cancel);
RicExportFeatureImpl::configureForExport(&propertyDialog);
propertyDialog.resize(QSize(400, 200));

View File

@@ -46,7 +46,7 @@ CAF_CMD_SOURCE_INIT(RicSaveEclipseInputPropertyFeature, "RicSaveEclipseInputProp
//--------------------------------------------------------------------------------------------------
bool RicSaveEclipseInputPropertyFeature::isCommandEnabled()
{
return selectedInputProperty() != NULL;
return selectedInputProperty() != nullptr;
}
//--------------------------------------------------------------------------------------------------
@@ -78,7 +78,7 @@ void RicSaveEclipseInputPropertyFeature::onActionTriggered(bool isChecked)
exportSettings.eclipseKeyword = inputProperty->eclipseKeyword;
// Find input reservoir for this property
RimEclipseInputCase* inputReservoir = NULL;
RimEclipseInputCase* inputReservoir = nullptr;
{
RimEclipseInputPropertyCollection* inputPropertyCollection = dynamic_cast<RimEclipseInputPropertyCollection*>(inputProperty->parentField()->ownerObject());
if (!inputPropertyCollection) return;

View File

@@ -45,7 +45,7 @@
///
//--------------------------------------------------------------------------------------------------
RicSaveEclipseResultAsInputPropertyExec::RicSaveEclipseResultAsInputPropertyExec(RimEclipseCellColors* cellColors)
: CmdExecuteCommand(NULL)
: CmdExecuteCommand(nullptr)
{
CVF_ASSERT(cellColors);
m_cellColors = cellColors;

View File

@@ -90,7 +90,7 @@ void RicSnapshotViewToFileFeature::saveToFile(const QImage& image, const QString
}
QString defaultAbsFileName = caf::Utils::constructFullFileName(startPath, defaultFileBaseName, ".png");
QString fileName = QFileDialog::getSaveFileName(NULL, tr("Export to File"), defaultAbsFileName);
QString fileName = QFileDialog::getSaveFileName(nullptr, tr("Export to File"), defaultAbsFileName);
if (fileName.isEmpty())
{
return;

View File

@@ -67,7 +67,7 @@ void RicIntersectionBoxAtPosFeature::onActionTriggered(bool isChecked)
coll->updateConnectedEditors();
RiuMainWindow::instance()->selectAsCurrentItem(intersectionBox);
RimGridView* rimView = NULL;
RimGridView* rimView = nullptr;
coll->firstAncestorOrThisOfType(rimView);
if (rimView)
{

View File

@@ -67,7 +67,7 @@ void RicIntersectionBoxXSliceFeature::onActionTriggered(bool isChecked)
coll->updateConnectedEditors();
RiuMainWindow::instance()->selectAsCurrentItem(intersectionBox);
RimGridView* rimView = NULL;
RimGridView* rimView = nullptr;
coll->firstAncestorOrThisOfType(rimView);
if (rimView)
{

View File

@@ -67,7 +67,7 @@ void RicIntersectionBoxYSliceFeature::onActionTriggered(bool isChecked)
coll->updateConnectedEditors();
RiuMainWindow::instance()->selectAsCurrentItem(intersectionBox);
RimGridView* rimView = NULL;
RimGridView* rimView = nullptr;
coll->firstAncestorOrThisOfType(rimView);
if (rimView)
{

View File

@@ -66,7 +66,7 @@ void RicIntersectionBoxZSliceFeature::onActionTriggered(bool isChecked)
coll->updateConnectedEditors();
RiuMainWindow::instance()->selectAsCurrentItem(intersectionBox);
RimGridView* rimView = NULL;
RimGridView* rimView = nullptr;
coll->firstAncestorOrThisOfType(rimView);
if (rimView)
{

View File

@@ -86,7 +86,7 @@ void RicNewScriptFeature::onActionTriggered(bool isChecked)
}
bool ok;
fullPathFilenameNewScript = QInputDialog::getText(NULL,
fullPathFilenameNewScript = QInputDialog::getText(nullptr,
"Specify new script file",
"File name",
QLineEdit::Normal,

View File

@@ -126,7 +126,7 @@ void RicPasteEclipseCasesFeature::addCasesToGridCaseGroup(caf::PdmObjectGroup& o
return;
}
RimEclipseResultCase* mainResultCase = NULL;
RimEclipseResultCase* mainResultCase = nullptr;
std::vector< std::vector<int> > mainCaseGridDimensions;
// Read out main grid and main grid dimensions if present in case group
@@ -184,8 +184,8 @@ void RicPasteEclipseCasesFeature::addCasesToGridCaseGroup(caf::PdmObjectGroup& o
}
}
RimOilField* activeOilField = proj ? proj->activeOilField() : NULL;
RimEclipseCaseCollection* analysisModels = (activeOilField) ? activeOilField->analysisModels() : NULL;
RimOilField* activeOilField = proj ? proj->activeOilField() : nullptr;
RimEclipseCaseCollection* analysisModels = (activeOilField) ? activeOilField->analysisModels() : nullptr;
if (analysisModels) analysisModels->insertCaseInCaseGroup(gridCaseGroup, rimResultReservoir);
caf::PdmDocument::updateUiIconStateRecursively(rimResultReservoir);

View File

@@ -95,13 +95,13 @@ RimIdenticalGridCaseGroup* RicPasteFeatureImpl::findGridCaseGroup(caf::PdmObject
else if (dynamic_cast<RimCaseCollection*>(objectHandle) ||
dynamic_cast<RimEclipseCase*>(objectHandle))
{
RimIdenticalGridCaseGroup* gridCaseGroup = NULL;
RimIdenticalGridCaseGroup* gridCaseGroup = nullptr;
objectHandle->firstAncestorOrThisOfType(gridCaseGroup);
return gridCaseGroup;
}
return NULL;
return nullptr;
}
//--------------------------------------------------------------------------------------------------
@@ -120,7 +120,7 @@ RimEclipseCase* RicPasteFeatureImpl::findEclipseCase(caf::PdmObjectHandle* objec
return reservoirView->eclipseCase();
}
return NULL;
return nullptr;
}
//--------------------------------------------------------------------------------------------------

View File

@@ -49,7 +49,7 @@ CAF_CMD_SOURCE_INIT(RicCloseCaseFeature, "RicCloseCaseFeature");
//--------------------------------------------------------------------------------------------------
bool RicCloseCaseFeature::isCommandEnabled()
{
return selectedEclipseCase() != NULL || selectedGeoMechCase() != NULL;
return selectedEclipseCase() != nullptr || selectedGeoMechCase() != nullptr;
}
//--------------------------------------------------------------------------------------------------
@@ -102,7 +102,7 @@ RimEclipseCase* RicCloseCaseFeature::selectedEclipseCase() const
return selection[0];
}
return NULL;
return nullptr;
}
//--------------------------------------------------------------------------------------------------
@@ -118,7 +118,7 @@ RimGeoMechCase* RicCloseCaseFeature::selectedGeoMechCase() const
return selection[0];
}
return NULL;
return nullptr;
}
//--------------------------------------------------------------------------------------------------
@@ -129,8 +129,8 @@ void RicCloseCaseFeature::removeCaseFromAllGroups(RimEclipseCase* eclipseCase)
CVF_ASSERT(eclipseCase);
RimProject* proj = RiaApplication::instance()->project();
RimOilField* activeOilField = proj ? proj->activeOilField() : NULL;
RimEclipseCaseCollection* analysisModels = (activeOilField) ? activeOilField->analysisModels() : NULL;
RimOilField* activeOilField = proj ? proj->activeOilField() : nullptr;
RimEclipseCaseCollection* analysisModels = (activeOilField) ? activeOilField->analysisModels() : nullptr;
if (analysisModels)
{
analysisModels->removeCaseFromAllGroups(eclipseCase);
@@ -197,8 +197,8 @@ void RicCloseCaseFeature::deleteGeoMechCase(RimGeoMechCase* geoMechCase)
CVF_ASSERT(geoMechCase);
RimProject* proj = RiaApplication::instance()->project();
RimOilField* activeOilField = proj ? proj->activeOilField() : NULL;
RimGeoMechModels* models = (activeOilField) ? activeOilField->geoMechModels() : NULL;
RimOilField* activeOilField = proj ? proj->activeOilField() : nullptr;
RimGeoMechModels* models = (activeOilField) ? activeOilField->geoMechModels() : nullptr;
if (models)
{
models->cases.removeChildObject(geoMechCase);
@@ -240,7 +240,7 @@ bool RicCloseCaseFeature::userConfirmedGridCaseGroupChange(const std::vector<Rim
for (size_t i = 0; i < casesToBeDeleted.size(); i++)
{
RimIdenticalGridCaseGroup* gridCaseGroup = NULL;
RimIdenticalGridCaseGroup* gridCaseGroup = nullptr;
casesToBeDeleted[i]->firstAncestorOrThisOfType(gridCaseGroup);
if (gridCaseGroup && hasAnyStatisticsResults(gridCaseGroup))

View File

@@ -97,7 +97,7 @@ void RicDeleteItemExec::redo()
caf::PdmObjectHandle* parentObj = listField->ownerObject();
parentObj->uiCapability()->updateConnectedEditors();
Rim3dView* view = NULL;
Rim3dView* view = nullptr;
parentObj->firstAncestorOrThisOfType(view);
// Range Filters
@@ -107,7 +107,7 @@ void RicDeleteItemExec::redo()
if (rangeFilterColl)
{
rangeFilterColl->updateDisplayModeNotifyManagedViews(NULL);
rangeFilterColl->updateDisplayModeNotifyManagedViews(nullptr);
}
// Prop Filter
@@ -219,7 +219,7 @@ void RicDeleteItemExec::redo()
{
if (wellLogPlotCollection->wellLogPlots.empty())
{
RimProject* project = NULL;
RimProject* project = nullptr;
parentObj->firstAncestorOrThisOfType(project);
if (project)
{
@@ -230,13 +230,13 @@ void RicDeleteItemExec::redo()
// Linked views
RimViewLinkerCollection* viewLinkerCollection = NULL;
RimViewLinkerCollection* viewLinkerCollection = nullptr;
parentObj->firstAncestorOrThisOfType(viewLinkerCollection);
if (viewLinkerCollection)
{
viewLinkerCollection->uiCapability()->updateConnectedEditors();
RimProject* project = NULL;
RimProject* project = nullptr;
parentObj->firstAncestorOrThisOfType(project);
if (project)
{

View File

@@ -273,7 +273,7 @@ void RicFileHierarchyDialog::clearFileList()
void RicFileHierarchyDialog::updateStatus(Status status, bool force)
{
static time_t lastStatusUpdate = 0;
time_t now = time(0);
time_t now = time(nullptr);
// If less than one second since last update, then return
if (!force && now == lastStatusUpdate) return;

View File

@@ -46,7 +46,7 @@ public:
RicFileHierarchyDialog(QWidget* parent);
~RicFileHierarchyDialog();
static RicFileHierarchyDialogResult getOpenFileNames(QWidget *parent = 0,
static RicFileHierarchyDialogResult getOpenFileNames(QWidget *parent = nullptr,
const QString& caption = QString(),
const QString& dir = QString(),
const QString& pathFilter = QString(),

View File

@@ -31,7 +31,7 @@
///
//--------------------------------------------------------------------------------------------------
RicGeoMechPropertyFilterInsertExec::RicGeoMechPropertyFilterInsertExec(RimGeoMechPropertyFilter* propertyFilter)
: CmdExecuteCommand(NULL)
: CmdExecuteCommand(nullptr)
{
CVF_ASSERT(propertyFilter);
m_propertyFilter = propertyFilter;

View File

@@ -29,7 +29,7 @@
///
//--------------------------------------------------------------------------------------------------
RicGeoMechPropertyFilterNewExec::RicGeoMechPropertyFilterNewExec(RimGeoMechPropertyFilterCollection* propertyFilterCollection)
: CmdExecuteCommand(NULL)
: CmdExecuteCommand(nullptr)
{
assert(propertyFilterCollection);
m_propertyFilterCollection = propertyFilterCollection;

View File

@@ -41,7 +41,7 @@ void RicImportGeoMechCaseFeature::onActionTriggered(bool isChecked)
RiaApplication* app = RiaApplication::instance();
QString defaultDir = app->lastUsedDialogDirectory("GEOMECH_MODEL");
QStringList fileNames = QFileDialog::getOpenFileNames(NULL, "Import Geo-Mechanical Model", defaultDir, "Abaqus results (*.odb)");
QStringList fileNames = QFileDialog::getOpenFileNames(nullptr, "Import Geo-Mechanical Model", defaultDir, "Abaqus results (*.odb)");
if (fileNames.size()) defaultDir = QFileInfo(fileNames.last()).absolutePath();
app->setLastUsedDialogDirectory("GEOMECH_MODEL", defaultDir);

View File

@@ -54,7 +54,7 @@ void RicImportSummaryCaseFeature::onActionTriggered(bool isChecked)
{
RiaApplication* app = RiaApplication::instance();
QString defaultDir = app->lastUsedDialogDirectory("INPUT_FILES");
QStringList fileNames = QFileDialog::getOpenFileNames(NULL, "Import Summary Case", defaultDir, "Eclipse Summary File (*.SMSPEC);;All Files (*.*)");
QStringList fileNames = QFileDialog::getOpenFileNames(nullptr, "Import Summary Case", defaultDir, "Eclipse Summary File (*.SMSPEC);;All Files (*.*)");
if (fileNames.isEmpty()) return;

View File

@@ -57,7 +57,7 @@ void RicImportSummaryCasesFeature::onActionTriggered(bool isChecked)
RiaApplication* app = RiaApplication::instance();
QString defaultDir = app->lastUsedDialogDirectory("INPUT_FILES");
RicFileHierarchyDialogResult result = RicFileHierarchyDialog::getOpenFileNames(NULL, "Import Summary Cases", defaultDir, m_pathFilter, m_fileNameFilter, QStringList(".SMSPEC"));
RicFileHierarchyDialogResult result = RicFileHierarchyDialog::getOpenFileNames(nullptr, "Import Summary Cases", defaultDir, m_pathFilter, m_fileNameFilter, QStringList(".SMSPEC"));
// Remember filters
m_pathFilter = result.pathFilter;

View File

@@ -52,10 +52,10 @@ void RicNewViewFeature::addReservoirView(RimEclipseCase* eclipseCase, RimGeoMech
//--------------------------------------------------------------------------------------------------
bool RicNewViewFeature::isCommandEnabled()
{
return selectedEclipseCase() != NULL
|| selectedEclipseView() != NULL
|| selectedGeoMechCase() != NULL
|| selectedGeoMechView() != NULL;
return selectedEclipseCase() != nullptr
|| selectedEclipseView() != nullptr
|| selectedGeoMechCase() != nullptr
|| selectedGeoMechView() != nullptr;
}
//--------------------------------------------------------------------------------------------------
@@ -91,7 +91,7 @@ void RicNewViewFeature::setupActionLook(QAction* actionToSetup)
//--------------------------------------------------------------------------------------------------
Rim3dView* RicNewViewFeature::createReservoirView(RimEclipseCase* eclipseCase, RimGeoMechCase* geomCase)
{
Rim3dView* insertedView = NULL;
Rim3dView* insertedView = nullptr;
if (eclipseCase)
{
@@ -131,7 +131,7 @@ RimEclipseCase* RicNewViewFeature::selectedEclipseCase()
return selection[0];
}
return NULL;
return nullptr;
}
//--------------------------------------------------------------------------------------------------
@@ -147,7 +147,7 @@ RimGeoMechCase* RicNewViewFeature::selectedGeoMechCase()
return selection[0];
}
return NULL;
return nullptr;
}
//--------------------------------------------------------------------------------------------------
@@ -163,7 +163,7 @@ RimEclipseView* RicNewViewFeature::selectedEclipseView()
return selection[0];
}
return NULL;
return nullptr;
}
//--------------------------------------------------------------------------------------------------
@@ -179,5 +179,5 @@ RimGeoMechView* RicNewViewFeature::selectedGeoMechView()
return selection[0];
}
return NULL;
return nullptr;
}

View File

@@ -28,7 +28,7 @@
///
//--------------------------------------------------------------------------------------------------
RicRangeFilterExecImpl::RicRangeFilterExecImpl(RimCellRangeFilterCollection* rangeFilterCollection, RimCellRangeFilter* rangeFilter)
: CmdExecuteCommand(NULL)
: CmdExecuteCommand(nullptr)
{
CVF_ASSERT(rangeFilterCollection);
m_cellRangeFilterCollection = rangeFilterCollection;

View File

@@ -31,7 +31,7 @@ class RimCellRangeFilterCollection;
class RicRangeFilterExecImpl : public caf::CmdExecuteCommand
{
public:
RicRangeFilterExecImpl(RimCellRangeFilterCollection* rangeFilterCollection, RimCellRangeFilter* rangeFilter = 0);
RicRangeFilterExecImpl(RimCellRangeFilterCollection* rangeFilterCollection, RimCellRangeFilter* rangeFilter = nullptr);
virtual ~RicRangeFilterExecImpl();
virtual QString name() = 0;

View File

@@ -65,7 +65,7 @@ void RicRangeFilterInsertExec::redo()
rangeFilter->setDefaultValues();
applyCommandDataOnFilter(rangeFilter);
m_cellRangeFilterCollection->updateDisplayModeNotifyManagedViews(NULL);
m_cellRangeFilterCollection->updateDisplayModeNotifyManagedViews(nullptr);
m_cellRangeFilterCollection->updateConnectedEditors();

View File

@@ -30,7 +30,7 @@ class RimCellRangeFilterCollection;
class RicRangeFilterInsertExec : public RicRangeFilterExecImpl
{
public:
RicRangeFilterInsertExec(RimCellRangeFilterCollection* rangeFilterCollection, RimCellRangeFilter* rangeFilter = 0);
RicRangeFilterInsertExec(RimCellRangeFilterCollection* rangeFilterCollection, RimCellRangeFilter* rangeFilter = nullptr);
virtual ~RicRangeFilterInsertExec();
virtual QString name();

View File

@@ -71,7 +71,7 @@ void RicRangeFilterNewExec::redo()
rangeFilter->setDefaultValues();
applyCommandDataOnFilter(rangeFilter);
m_cellRangeFilterCollection->updateDisplayModeNotifyManagedViews(NULL);
m_cellRangeFilterCollection->updateDisplayModeNotifyManagedViews(nullptr);
m_cellRangeFilterCollection->updateConnectedEditors();
@@ -94,7 +94,7 @@ void RicRangeFilterNewExec::undo()
m_cellRangeFilterCollection->rangeFilters.erase(m_cellRangeFilterCollection->rangeFilters.size() - 1);
m_cellRangeFilterCollection->updateDisplayModeNotifyManagedViews(NULL);
m_cellRangeFilterCollection->updateDisplayModeNotifyManagedViews(nullptr);
m_cellRangeFilterCollection->updateConnectedEditors();
}

View File

@@ -27,7 +27,7 @@
class RicRangeFilterNewExec : public RicRangeFilterExecImpl
{
public:
RicRangeFilterNewExec(RimCellRangeFilterCollection* rangeFilterCollection, RimCellRangeFilter* rangeFilter = 0);
RicRangeFilterNewExec(RimCellRangeFilterCollection* rangeFilterCollection, RimCellRangeFilter* rangeFilter = nullptr);
virtual ~RicRangeFilterNewExec();
virtual QString name();

View File

@@ -47,7 +47,7 @@ RimEclipseView* RicSelectOrCreateViewFeatureImpl::showViewSelection(RimEclipseRe
featureUi.setCase(resultCase);
}
caf::PdmUiPropertyViewDialog propertyDialog(NULL, &featureUi, dialogTitle, "");
caf::PdmUiPropertyViewDialog propertyDialog(nullptr, &featureUi, dialogTitle, "");
propertyDialog.resize(QSize(400, 200));
if (propertyDialog.exec() != QDialog::Accepted) return nullptr;

View File

@@ -112,7 +112,7 @@ RimSummaryPlot* RicNewGridTimeHistoryCurveFeature::userSelectedSummaryPlot()
QString newPlotName = RicNewGridTimeHistoryCurveFeature::suggestedNewPlotName();
featureUi.setSuggestedPlotName(newPlotName);
caf::PdmUiPropertyViewDialog propertyDialog(NULL, &featureUi, "Select Destination Plot", "");
caf::PdmUiPropertyViewDialog propertyDialog(nullptr, &featureUi, "Select Destination Plot", "");
propertyDialog.resize(QSize(400, 200));
if (propertyDialog.exec() != QDialog::Accepted) return nullptr;

View File

@@ -84,7 +84,7 @@ void RicPasteAsciiDataToSummaryPlotFeature::onActionTriggered(bool isChecked)
if (!summaryPlot) pasteOptions.createNewPlot();
pasteOptions.setUiModePasteText(text);
caf::PdmUiPropertyViewDialog propertyDialog(NULL, &pasteOptions, "Set Paste Options", "");
caf::PdmUiPropertyViewDialog propertyDialog(nullptr, &pasteOptions, "Set Paste Options", "");
if (propertyDialog.exec() != QDialog::Accepted) return;
std::vector<RimAsciiDataCurve*> curves = parseCurves(text, pasteOptions);

View File

@@ -692,7 +692,7 @@ void RicSummaryCurveCreator::createNewPlot()
{
bool ok = false;
candidatePlotName = QInputDialog::getText(NULL,
candidatePlotName = QInputDialog::getText(nullptr,
"New Summary Plot Name", "New Summary Plot Name",
QLineEdit::Normal,
candidatePlotName,

View File

@@ -152,7 +152,7 @@ void RicLinkVisibleViewsFeature::linkViews(std::vector<RimGridView*>& views)
RicLinkVisibleViewsFeatureUi featureUi;
featureUi.setViews(views);
caf::PdmUiPropertyViewDialog propertyDialog(NULL, &featureUi, "Select Master View", "");
caf::PdmUiPropertyViewDialog propertyDialog(nullptr, &featureUi, "Select Master View", "");
propertyDialog.setWindowIcon(QIcon(":/chain.png"));
if (propertyDialog.exec() != QDialog::Accepted) return;

View File

@@ -49,7 +49,7 @@ void RicShowAllLinkedViewsFeature::onActionTriggered(bool isChecked)
caf::SelectionManager::instance()->objectsByType(&managedViews);
for (size_t i = 0; i < managedViews.size(); i++)
{
RimViewLinker* rimLinked = NULL;
RimViewLinker* rimLinked = nullptr;
managedViews[i]->firstAncestorOrThisOfType(rimLinked);
CVF_ASSERT(rimLinked);

View File

@@ -75,10 +75,10 @@ void RicAddWellLogToPlotFeature::onActionTriggered(bool isChecked)
{
RimWellLogFileChannel* wellLog = selection[wlIdx];
RimWellPath* wellPath = NULL;
RimWellPath* wellPath = nullptr;
wellLog->firstAncestorOrThisOfType(wellPath);
RimWellLogFile* wellLogFile = NULL;
RimWellLogFile* wellLogFile = nullptr;
wellLog->firstAncestorOrThisOfType(wellLogFile);
if (wellLogFile)
{

View File

@@ -43,7 +43,7 @@ bool RicDeleteWellLogPlotTrackFeature::isCommandEnabled()
if (selection.size() > 0)
{
RimWellLogPlot* wellLogPlot = NULL;
RimWellLogPlot* wellLogPlot = nullptr;
selection[0]->firstAncestorOrThisOfType(wellLogPlot);
if (wellLogPlot && wellLogPlot->trackCount() > 1)
{
@@ -68,7 +68,7 @@ void RicDeleteWellLogPlotTrackFeature::onActionTriggered(bool isChecked)
{
RimWellLogTrack* track = selection[i];
RimWellLogPlot* wellLogPlot = NULL;
RimWellLogPlot* wellLogPlot = nullptr;
track->firstAncestorOrThisOfType(wellLogPlot);
if (wellLogPlot && wellLogPlot->trackCount() > 1)
{

View File

@@ -44,7 +44,7 @@ bool RicNewWellLogPlotTrackFeature::isCommandEnabled()
return false;
}
return selectedWellLogPlot() != NULL;
return selectedWellLogPlot() != nullptr;
}
//--------------------------------------------------------------------------------------------------