aboutsummaryrefslogtreecommitdiffstats
path: root/desktop-widgets
diff options
context:
space:
mode:
authorGravatar Tomaz Canabrava <tcanabrava@kde.org>2018-09-15 08:25:10 -0700
committerGravatar Dirk Hohndel <dirk@hohndel.org>2018-09-15 15:51:26 -0700
commit2d6633eee04de7ce2315ecf141267e50babe1ffa (patch)
tree80e1c4eb9a9f5fd7fa96c1151709adcb1ff500c8 /desktop-widgets
parent17a6f288277514ad4e9a44610b7b3b023c69f3cb (diff)
downloadsubsurface-2d6633eee04de7ce2315ecf141267e50babe1ffa.tar.gz
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>
Diffstat (limited to 'desktop-widgets')
-rw-r--r--desktop-widgets/mainwindow.cpp16
1 files changed, 8 insertions, 8 deletions
diff --git a/desktop-widgets/mainwindow.cpp b/desktop-widgets/mainwindow.cpp
index 00ccc893f..72001ff4b 100644
--- a/desktop-widgets/mainwindow.cpp
+++ b/desktop-widgets/mainwindow.cpp
@@ -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;
}
}