diff options
author | Tomaz Canabrava <tcanabrava@kde.org> | 2018-09-13 17:55:47 +0200 |
---|---|---|
committer | Dirk Hohndel <dirk@hohndel.org> | 2018-09-15 15:51:26 -0700 |
commit | 17a6f288277514ad4e9a44610b7b3b023c69f3cb (patch) | |
tree | 1aca2afc936f7e0f24e14550a107ec4f09a6cab4 /desktop-widgets/mainwindow.cpp | |
parent | 3b4877a0731eafaa32972234ca3018e4b30ec0c3 (diff) | |
download | subsurface-17a6f288277514ad4e9a44610b7b3b023c69f3cb.tar.gz |
code cleanup: unamed namespace instead of global or static variables
Unamed namespace behaves the same way as static variables in C source.
Signed-off-by: Tomaz Canabrava <tcanabrava@kde.org>
Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
Diffstat (limited to 'desktop-widgets/mainwindow.cpp')
-rw-r--r-- | desktop-widgets/mainwindow.cpp | 8 |
1 files changed, 5 insertions, 3 deletions
diff --git a/desktop-widgets/mainwindow.cpp b/desktop-widgets/mainwindow.cpp index d73aa799a..00ccc893f 100644 --- a/desktop-widgets/mainwindow.cpp +++ b/desktop-widgets/mainwindow.cpp @@ -77,10 +77,12 @@ #include "plugins/facebook/facebookconnectwidget.h" #endif -QProgressDialog *progressDialog = NULL; -bool progressDialogCanceled = false; +namespace { + QProgressDialog *progressDialog = nullptr; + bool progressDialogCanceled = false; + int progressCounter = 0; +} -static int progressCounter = 0; extern "C" int updateProgress(const char *text) { |