From 17a6f288277514ad4e9a44610b7b3b023c69f3cb Mon Sep 17 00:00:00 2001 From: Tomaz Canabrava Date: Thu, 13 Sep 2018 17:55:47 +0200 Subject: 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 Signed-off-by: Dirk Hohndel --- desktop-widgets/mainwindow.cpp | 8 +++++--- 1 file changed, 5 insertions(+), 3 deletions(-) (limited to 'desktop-widgets') 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) { -- cgit v1.2.3-70-g09d2