code cleanup: use nullptr in C++ files

Using 0 or NULL are C idioms.

Signed-off-by: Tomaz Canabrava <tcanabrava@kde.org>
Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
This commit is contained in:
Tomaz Canabrava 2018-09-15 08:25:10 -07:00 committed by Dirk Hohndel
parent 17a6f28827
commit 2d6633eee0

View file

@ -103,7 +103,7 @@ extern "C" int updateProgress(const char *text)
return progressDialogCanceled;
}
MainWindow *MainWindow::m_Instance = NULL;
MainWindow *MainWindow::m_Instance = nullptr;
extern "C" void showErrorFromC(char *buf)
{
@ -113,14 +113,14 @@ extern "C" void showErrorFromC(char *buf)
}
MainWindow::MainWindow() : QMainWindow(),
actionNextDive(0),
actionPreviousDive(0),
actionNextDive(nullptr),
actionPreviousDive(nullptr),
#ifndef NO_USERMANUAL
helpView(0),
#endif
state(VIEWALL),
survey(0),
findMovedImagesDialog(0)
survey(nullptr),
findMovedImagesDialog(nullptr)
{
Q_ASSERT_X(m_Instance == NULL, "MainWindow", "MainWindow recreated!");
m_Instance = this;
@ -376,7 +376,7 @@ MainWindow::MainWindow() : QMainWindow(),
MainWindow::~MainWindow()
{
write_hashes();
m_Instance = NULL;
m_Instance = nullptr;
}
void MainWindow::setupSocialNetworkMenu()
@ -743,7 +743,7 @@ void MainWindow::closeCurrentFile()
/* free the dives and trips */
clear_git_id();
clear_dive_file_data();
setCurrentFile(NULL);
setCurrentFile(nullptr);
cleanUpEmpty();
mark_divelist_changed(false);
@ -2030,7 +2030,7 @@ void MainWindow::hideProgressBar()
if (progressDialog) {
progressDialog->setValue(100);
delete progressDialog;
progressDialog = NULL;
progressDialog = nullptr;
}
}