summaryrefslogtreecommitdiff
path: root/plugins/DbChecker
diff options
context:
space:
mode:
authorGoraf <22941576+Goraf@users.noreply.github.com>2017-11-13 15:03:31 +0100
committerGoraf <22941576+Goraf@users.noreply.github.com>2017-11-13 15:07:33 +0100
commita7c24ca48995cf2bf436156302f96b91bf135409 (patch)
tree953835509ff1b778833e78fd7b74b05e05e77c84 /plugins/DbChecker
parent591ec17b1c99db7f120c22ca9fb20ae05fe78325 (diff)
Code modernize ...
* replace 0/NULL with nullptr [using clang-tidy]
Diffstat (limited to 'plugins/DbChecker')
-rw-r--r--plugins/DbChecker/src/main.cpp4
-rw-r--r--plugins/DbChecker/src/openerror.cpp2
-rw-r--r--plugins/DbChecker/src/progress.cpp28
-rw-r--r--plugins/DbChecker/src/selectdb.cpp26
-rw-r--r--plugins/DbChecker/src/welcome.cpp4
-rw-r--r--plugins/DbChecker/src/wizard.cpp26
-rw-r--r--plugins/DbChecker/src/worker.cpp18
7 files changed, 54 insertions, 54 deletions
diff --git a/plugins/DbChecker/src/main.cpp b/plugins/DbChecker/src/main.cpp
index b4123abe50..1f9ed55889 100644
--- a/plugins/DbChecker/src/main.cpp
+++ b/plugins/DbChecker/src/main.cpp
@@ -64,7 +64,7 @@ static INT_PTR ServiceMode(WPARAM, LPARAM)
{
bLaunchMiranda = bShortMode = bAutoExit = false;
bServiceMode = true;
- DialogBox(hInst, MAKEINTRESOURCE(IDD_WIZARD), NULL, WizardDlgProc);
+ DialogBox(hInst, MAKEINTRESOURCE(IDD_WIZARD), nullptr, WizardDlgProc);
return (bLaunchMiranda) ? SERVICE_CONTINUE : SERVICE_FAILED;
}
@@ -75,7 +75,7 @@ static INT_PTR CheckProfile(WPARAM wParam, LPARAM lParam)
bAutoExit = lParam == 2;
bServiceMode = false;
wcsncpy(opts.filename, (wchar_t*)wParam, _countof(opts.filename));
- return DialogBox(hInst, MAKEINTRESOURCE(IDD_WIZARD), NULL, WizardDlgProc);
+ return DialogBox(hInst, MAKEINTRESOURCE(IDD_WIZARD), nullptr, WizardDlgProc);
}
extern "C" __declspec(dllexport) int Load(void)
diff --git a/plugins/DbChecker/src/openerror.cpp b/plugins/DbChecker/src/openerror.cpp
index a5ea7c99a6..3c98c1e8b2 100644
--- a/plugins/DbChecker/src/openerror.cpp
+++ b/plugins/DbChecker/src/openerror.cpp
@@ -29,7 +29,7 @@ INT_PTR CALLBACK OpenErrorDlgProc(HWND hdlg, UINT message, WPARAM wParam, LPARAM
case WM_INITDIALOG:
{
wchar_t szError[256];
- FormatMessage(FORMAT_MESSAGE_FROM_SYSTEM, NULL, opts.error, 0, szError, _countof(szError), NULL);
+ FormatMessage(FORMAT_MESSAGE_FROM_SYSTEM, nullptr, opts.error, 0, szError, _countof(szError), nullptr);
SetDlgItemText(hdlg, IDC_ERRORTEXT, szError);
}
if (opts.error == ERROR_SHARING_VIOLATION) ShowWindow(GetDlgItem(hdlg, IDC_INUSE), SW_SHOW);
diff --git a/plugins/DbChecker/src/progress.cpp b/plugins/DbChecker/src/progress.cpp
index ffac34c610..5949c9e89c 100644
--- a/plugins/DbChecker/src/progress.cpp
+++ b/plugins/DbChecker/src/progress.cpp
@@ -24,7 +24,7 @@ Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
void __cdecl WorkerThread(void *unused);
static HWND hwndStatus, hdlgProgress, hwndBar;
static bool bShortModeDone;
-HANDLE hEventRun = NULL, hEventAbort = NULL;
+HANDLE hEventRun = nullptr, hEventAbort = nullptr;
int errorCount;
LRESULT wizardResult;
@@ -39,7 +39,7 @@ void AddToStatus(int flags, const wchar_t* fmt, ...)
int i = SendMessage(hwndStatus, LB_ADDSTRING, 0, (LPARAM)str);
SendMessage(hwndStatus, LB_SETITEMDATA, i, flags);
- InvalidateRect(hwndStatus, NULL, FALSE);
+ InvalidateRect(hwndStatus, nullptr, FALSE);
SendMessage(hwndStatus, LB_SETTOPINDEX, i, 0);
#ifdef _DEBUG
@@ -68,7 +68,7 @@ INT_PTR CALLBACK ProgressDlgProc(HWND hdlg, UINT message, WPARAM wParam, LPARAM
{
static int fontHeight, listWidth;
static int manualAbort;
- static HFONT hBoldFont = NULL;
+ static HFONT hBoldFont = nullptr;
INT_PTR bReturn;
if (DoMyControlProcessing(hdlg, message, wParam, lParam, &bReturn))
@@ -87,12 +87,12 @@ INT_PTR CALLBACK ProgressDlgProc(HWND hdlg, UINT message, WPARAM wParam, LPARAM
HDC hdc;
HFONT hFont, hoFont;
SIZE s;
- hdc = GetDC(NULL);
+ hdc = GetDC(nullptr);
hFont = (HFONT)SendMessage(hdlg, WM_GETFONT, 0, 0);
hoFont = (HFONT)SelectObject(hdc, hFont);
GetTextExtentPoint32(hdc, L"x", 1, &s);
SelectObject(hdc, hoFont);
- ReleaseDC(NULL, hdc);
+ ReleaseDC(nullptr, hdc);
fontHeight = s.cy;
RECT rc;
@@ -105,10 +105,10 @@ INT_PTR CALLBACK ProgressDlgProc(HWND hdlg, UINT message, WPARAM wParam, LPARAM
hBoldFont = CreateFontIndirect(&lf);
}
manualAbort = 0;
- hEventRun = CreateEvent(NULL, TRUE, TRUE, NULL);
- hEventAbort = CreateEvent(NULL, TRUE, FALSE, NULL);
+ hEventRun = CreateEvent(nullptr, TRUE, TRUE, nullptr);
+ hEventAbort = CreateEvent(nullptr, TRUE, FALSE, nullptr);
TranslateDialogDefault(hdlg);
- _beginthread(WorkerThread, 0, NULL);
+ _beginthread(WorkerThread, 0, nullptr);
return TRUE;
case WM_MEASUREITEM:
@@ -124,7 +124,7 @@ INT_PTR CALLBACK ProgressDlgProc(HWND hdlg, UINT message, WPARAM wParam, LPARAM
{
LPDRAWITEMSTRUCT dis = (LPDRAWITEMSTRUCT)lParam;
int bold = 0;
- HFONT hoFont = NULL;
+ HFONT hoFont = nullptr;
if ((int)dis->itemID == -1) break;
SendMessage(dis->hwndItem, LB_GETTEXT, dis->itemID, (LPARAM)str);
switch (dis->itemData & STATUS_CLASSMASK) {
@@ -147,7 +147,7 @@ INT_PTR CALLBACK ProgressDlgProc(HWND hdlg, UINT message, WPARAM wParam, LPARAM
break;
}
if (bold) hoFont = (HFONT)SelectObject(dis->hDC, hBoldFont);
- ExtTextOut(dis->hDC, dis->rcItem.left, dis->rcItem.top, ETO_CLIPPED | ETO_OPAQUE, &dis->rcItem, str, (UINT)mir_wstrlen(str), NULL);
+ ExtTextOut(dis->hDC, dis->rcItem.left, dis->rcItem.top, ETO_CLIPPED | ETO_OPAQUE, &dis->rcItem, str, (UINT)mir_wstrlen(str), nullptr);
if (bold) SelectObject(dis->hDC, hoFont);
}
return TRUE;
@@ -175,7 +175,7 @@ INT_PTR CALLBACK ProgressDlgProc(HWND hdlg, UINT message, WPARAM wParam, LPARAM
else {
PostMessage(GetParent(hdlg), WZM_GOTOPAGE, IDD_CLEANING, (LPARAM)CleaningDlgProc);
CloseHandle(opts.hOutFile);
- opts.hOutFile = NULL;
+ opts.hOutFile = nullptr;
}
break;
}
@@ -231,15 +231,15 @@ INT_PTR CALLBACK ProgressDlgProc(HWND hdlg, UINT message, WPARAM wParam, LPARAM
case WM_DESTROY:
if (hEventAbort) {
CloseHandle(hEventAbort);
- hEventAbort = NULL;
+ hEventAbort = nullptr;
}
if (hEventRun) {
CloseHandle(hEventRun);
- hEventRun = NULL;
+ hEventRun = nullptr;
}
if (hBoldFont) {
DeleteObject(hBoldFont);
- hBoldFont = NULL;
+ hBoldFont = nullptr;
}
break;
}
diff --git a/plugins/DbChecker/src/selectdb.cpp b/plugins/DbChecker/src/selectdb.cpp
index 5fe836c21d..559dc5d7fd 100644
--- a/plugins/DbChecker/src/selectdb.cpp
+++ b/plugins/DbChecker/src/selectdb.cpp
@@ -22,7 +22,7 @@ Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
static bool CheckBroken(const wchar_t *ptszFullPath)
{
DATABASELINK *dblink = FindDatabasePlugin(ptszFullPath);
- if (dblink == NULL || dblink->CheckDB == NULL)
+ if (dblink == nullptr || dblink->CheckDB == nullptr)
return true;
return dblink->grokHeader(ptszFullPath) != EGROKPRF_NOERROR;
@@ -33,9 +33,9 @@ int OpenDatabase(HWND hdlg, INT iNextPage)
wchar_t tszMsg[1024];
int error = 0;
- if (opts.dbChecker == NULL) {
+ if (opts.dbChecker == nullptr) {
DATABASELINK* dblink = FindDatabasePlugin(opts.filename);
- if (dblink == NULL) {
+ if (dblink == nullptr) {
mir_snwprintf(tszMsg,
TranslateT("Database Checker cannot find a suitable database plugin to open '%s'."),
opts.filename);
@@ -44,7 +44,7 @@ int OpenDatabase(HWND hdlg, INT iNextPage)
return false;
}
- if (dblink->CheckDB == NULL) {
+ if (dblink->CheckDB == nullptr) {
mir_snwprintf(tszMsg,
TranslateT("Database driver '%s' doesn't support checking."),
TranslateW(dblink->szFullName));
@@ -52,7 +52,7 @@ int OpenDatabase(HWND hdlg, INT iNextPage)
}
opts.dbChecker = dblink->CheckDB(opts.filename, &error);
- if (opts.dbChecker == NULL) {
+ if (opts.dbChecker == nullptr) {
if ((opts.error = GetLastError()) == 0)
opts.error = error;
PostMessage(GetParent(hdlg), WZM_GOTOPAGE, IDD_OPENERROR, (LPARAM)OpenErrorDlgProc);
@@ -108,7 +108,7 @@ static int AddDatabaseToList(HWND hwndList, const wchar_t* filename, wchar_t* di
bool isBroken = CheckBroken(filename);
const wchar_t *pName = wcsrchr(filename, '\\');
- if (pName == NULL)
+ if (pName == nullptr)
pName = (LPTSTR)filename;
else
pName++;
@@ -117,7 +117,7 @@ static int AddDatabaseToList(HWND hwndList, const wchar_t* filename, wchar_t* di
mir_snwprintf(szName, L"%s%s", dir, pName);
wchar_t *pDot = wcsrchr(szName, '.');
- if (pDot != NULL && !mir_wstrcmpi(pDot, L".dat"))
+ if (pDot != nullptr && !mir_wstrcmpi(pDot, L".dat"))
*pDot = 0;
lvi.iItem = 0;
@@ -192,9 +192,9 @@ INT_PTR CALLBACK SelectDbDlgProc(HWND hdlg, UINT message, WPARAM wParam, LPARAM
ListView_InsertColumn(GetDlgItem(hdlg, IDC_DBLIST), 1, &lvc);
wchar_t szMirandaPath[MAX_PATH];
- GetModuleFileName(NULL, szMirandaPath, _countof(szMirandaPath));
+ GetModuleFileName(nullptr, szMirandaPath, _countof(szMirandaPath));
wchar_t *str2 = wcsrchr(szMirandaPath, '\\');
- if (str2 != NULL)
+ if (str2 != nullptr)
*str2 = 0;
int i = 0;
@@ -217,7 +217,7 @@ INT_PTR CALLBACK SelectDbDlgProc(HWND hdlg, UINT message, WPARAM wParam, LPARAM
// search in profile dir (using registry path + ini file)
if (RegOpenKeyEx(HKEY_LOCAL_MACHINE, L"Software\\Microsoft\\Windows\\CurrentVersion\\App Paths\\miranda32.exe", 0, KEY_QUERY_VALUE, &hKey) == ERROR_SUCCESS) {
- if (RegQueryValueEx(hKey, L"Path", NULL, NULL, (PBYTE)szMirandaPath, &cbData) == ERROR_SUCCESS) {
+ if (RegQueryValueEx(hKey, L"Path", nullptr, nullptr, (PBYTE)szMirandaPath, &cbData) == ERROR_SUCCESS) {
if (mir_wstrcmp(szProfileDir, szMirandaPath)) {
GetProfileDirectory(szMirandaPath, szProfileDir, _countof(szProfileDir));
FindAdd(hdlg, szProfileDir, L"[reg]\\");
@@ -233,9 +233,9 @@ INT_PTR CALLBACK SelectDbDlgProc(HWND hdlg, UINT message, WPARAM wParam, LPARAM
ListView_SetItemState(GetDlgItem(hdlg, IDC_DBLIST), i, LVIS_SELECTED, LVIS_SELECTED);
}
- if (opts.dbChecker != NULL) {
+ if (opts.dbChecker != nullptr) {
opts.dbChecker->Destroy();
- opts.dbChecker = NULL;
+ opts.dbChecker = nullptr;
}
if (bShortMode)
@@ -275,7 +275,7 @@ INT_PTR CALLBACK SelectDbDlgProc(HWND hdlg, UINT message, WPARAM wParam, LPARAM
GetDlgItemText(hdlg, IDC_FILE, str, _countof(str));
ofn.lStructSize = sizeof(ofn);
ofn.hwndOwner = hdlg;
- ofn.hInstance = NULL;
+ ofn.hInstance = nullptr;
ofn.lpstrFilter = filter;
ofn.lpstrDefExt = L"dat";
ofn.lpstrFile = str;
diff --git a/plugins/DbChecker/src/welcome.cpp b/plugins/DbChecker/src/welcome.cpp
index 321eba23a8..5f9f74b4c5 100644
--- a/plugins/DbChecker/src/welcome.cpp
+++ b/plugins/DbChecker/src/welcome.cpp
@@ -44,11 +44,11 @@ INT_PTR CALLBACK WelcomeDlgProc(HWND hdlg, UINT message, WPARAM wParam, LPARAM l
TitleLogFont.lfWeight = FW_BOLD;
mir_wstrcpy(TitleLogFont.lfFaceName, TEXT("Verdana Bold"));
- HDC hdc = GetDC(NULL);
+ HDC hdc = GetDC(nullptr);
INT FontSize = 12;
TitleLogFont.lfHeight = 0 - GetDeviceCaps(hdc, LOGPIXELSY) * FontSize / 72;
hTitleFont = CreateFontIndirect(&TitleLogFont);
- ReleaseDC(NULL, hdc);
+ ReleaseDC(nullptr, hdc);
}
SendDlgItemMessage(hdlg, IDC_TITLE, WM_SETFONT, (WPARAM)hTitleFont, 0);
EnableWindow(GetDlgItem(GetParent(hdlg), IDC_BACK), FALSE);
diff --git a/plugins/DbChecker/src/wizard.cpp b/plugins/DbChecker/src/wizard.cpp
index 62f30e1c42..86a038ae20 100644
--- a/plugins/DbChecker/src/wizard.cpp
+++ b/plugins/DbChecker/src/wizard.cpp
@@ -21,8 +21,8 @@ Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
#include "stdafx.h"
-static HFONT hBoldFont = NULL;
-static HENHMETAFILE hEmfHeaderLogo = NULL;
+static HFONT hBoldFont = nullptr;
+static HENHMETAFILE hEmfHeaderLogo = nullptr;
static BOOL CALLBACK MyControlsEnumChildren(HWND hwnd, LPARAM)
{
@@ -41,7 +41,7 @@ static BOOL CALLBACK MyControlsEnumChildren(HWND hwnd, LPARAM)
makeBold = 1;
}
if (makeBold) {
- if (hBoldFont == NULL) {
+ if (hBoldFont == nullptr) {
LOGFONT lf;
hBoldFont = (HFONT)SendMessage(hwnd, WM_GETFONT, 0, 0);
GetObject(hBoldFont, sizeof(lf), &lf);
@@ -50,7 +50,7 @@ static BOOL CALLBACK MyControlsEnumChildren(HWND hwnd, LPARAM)
}
SendMessage(hwnd, WM_SETFONT, (WPARAM)hBoldFont, 0);
SetWindowLongPtr(hwnd, GWL_EXSTYLE, exstyle&~WS_EX_CLIENTEDGE);
- SetWindowPos(hwnd, 0, 0, 0, 0, 0, SWP_NOZORDER | SWP_NOMOVE | SWP_NOSIZE | SWP_FRAMECHANGED);
+ SetWindowPos(hwnd, nullptr, 0, 0, 0, 0, SWP_NOZORDER | SWP_NOMOVE | SWP_NOSIZE | SWP_FRAMECHANGED);
}
return TRUE;
}
@@ -60,7 +60,7 @@ int DoMyControlProcessing(HWND hdlg, UINT message, WPARAM wParam, LPARAM lParam,
switch (message) {
case WM_INITDIALOG:
EnumChildWindows(hdlg, MyControlsEnumChildren, 0);
- if (hEmfHeaderLogo == NULL) {
+ if (hEmfHeaderLogo == nullptr) {
HRSRC hRsrc = FindResourceA(hInst, MAKEINTRESOURCEA(IDE_HDRLOGO), "EMF");
HGLOBAL hGlob = LoadResource(hInst, hRsrc);
hEmfHeaderLogo = SetEnhMetaFileBits(SizeofResource(hInst, hRsrc), (PBYTE)LockResource(hGlob));
@@ -97,7 +97,7 @@ INT_PTR CALLBACK WizardDlgProc(HWND hdlg, UINT message, WPARAM wParam, LPARAM lP
switch (message) {
case WM_INITDIALOG:
SendMessage(hdlg, WM_SETICON, ICON_SMALL, (LPARAM)LoadIcon(hInst, MAKEINTRESOURCE(IDI_DBTOOL)));
- hdlgPage = NULL;
+ hdlgPage = nullptr;
if (bShortMode)
SendMessage(hdlg, WZM_GOTOPAGE, IDD_SELECTDB, (LPARAM)SelectDbDlgProc);
else
@@ -106,14 +106,14 @@ INT_PTR CALLBACK WizardDlgProc(HWND hdlg, UINT message, WPARAM wParam, LPARAM lP
return TRUE;
case WZM_GOTOPAGE:
- if (hdlgPage != NULL) DestroyWindow(hdlgPage);
+ if (hdlgPage != nullptr) DestroyWindow(hdlgPage);
EnableWindow(GetDlgItem(hdlg, IDC_BACK), TRUE);
EnableWindow(GetDlgItem(hdlg, IDOK), TRUE);
EnableWindow(GetDlgItem(hdlg, IDCANCEL), TRUE);
SetDlgItemText(hdlg, IDCANCEL, TranslateT("Cancel"));
hdlgPage = CreateDialog(hInst, MAKEINTRESOURCE(wParam), hdlg, (DLGPROC)lParam);
TranslateDialogDefault(hdlgPage);
- SetWindowPos(hdlgPage, 0, 0, 0, 0, 0, SWP_NOZORDER | SWP_NOSIZE);
+ SetWindowPos(hdlgPage, nullptr, 0, 0, 0, 0, SWP_NOZORDER | SWP_NOSIZE);
ShowWindow(hdlgPage, SW_SHOW);
break;
@@ -136,20 +136,20 @@ INT_PTR CALLBACK WizardDlgProc(HWND hdlg, UINT message, WPARAM wParam, LPARAM lP
case WM_DESTROY:
if (opts.dbChecker) {
opts.dbChecker->Destroy();
- opts.dbChecker = NULL;
+ opts.dbChecker = nullptr;
}
if (opts.hOutFile)
CloseHandle(opts.hOutFile);
DestroyWindow(hdlgPage);
- if (hBoldFont != NULL) {
+ if (hBoldFont != nullptr) {
DeleteObject(hBoldFont);
- hBoldFont = NULL;
+ hBoldFont = nullptr;
}
- if (hEmfHeaderLogo != NULL) {
+ if (hEmfHeaderLogo != nullptr) {
DeleteEnhMetaFile(hEmfHeaderLogo);
- hEmfHeaderLogo = NULL;
+ hEmfHeaderLogo = nullptr;
}
break;
}
diff --git a/plugins/DbChecker/src/worker.cpp b/plugins/DbChecker/src/worker.cpp
index ab97b54b33..7ae4bdc0b2 100644
--- a/plugins/DbChecker/src/worker.cpp
+++ b/plugins/DbChecker/src/worker.cpp
@@ -24,27 +24,27 @@ void ProcessingDone(void);
static void Finalize(time_t& ts)
{
opts.dbChecker->Destroy();
- opts.dbChecker = NULL;
+ opts.dbChecker = nullptr;
if (opts.hOutFile) {
CloseHandle(opts.hOutFile);
- opts.hOutFile = NULL;
+ opts.hOutFile = nullptr;
}
if (errorCount && !opts.bBackup && !opts.bCheckOnly) {
- time_t dlg_ts = time(NULL);
- if (IDYES == MessageBox(NULL,
+ time_t dlg_ts = time(nullptr);
+ if (IDYES == MessageBox(nullptr,
TranslateT("Errors were encountered, however you selected not to backup the original database. It is strongly recommended that you do so in case important data was omitted. Do you wish to keep a backup of the original database?"),
TranslateT("Miranda Database Tool"), MB_YESNO))
opts.bBackup = 1;
- ts += time(NULL) - dlg_ts;
+ ts += time(nullptr) - dlg_ts;
}
if (opts.bBackup) {
wchar_t dbPath[MAX_PATH], dbFile[MAX_PATH];
mir_wstrcpy(dbPath, opts.filename);
wchar_t* str2 = wcsrchr(dbPath, '\\');
- if (str2 != NULL) {
+ if (str2 != nullptr) {
mir_wstrcpy(dbFile, str2 + 1);
*str2 = 0;
}
@@ -75,7 +75,7 @@ static void Finalize(time_t& ts)
void __cdecl WorkerThread(void *)
{
int task, firstTime;
- time_t ts = time(NULL);
+ time_t ts = time(nullptr);
AddToStatus(STATUS_MESSAGE, TranslateT("Database worker thread activated"));
@@ -89,7 +89,7 @@ void __cdecl WorkerThread(void *)
mir_wstrcpy(opts.outputFilename, opts.filename);
*wcsrchr(opts.outputFilename, '.') = 0;
mir_wstrcat(opts.outputFilename, TranslateT(" (Output).dat"));
- opts.hOutFile = CreateFile(opts.outputFilename, GENERIC_WRITE, FILE_SHARE_READ, NULL, CREATE_ALWAYS, FILE_FLAG_SEQUENTIAL_SCAN, NULL);
+ opts.hOutFile = CreateFile(opts.outputFilename, GENERIC_WRITE, FILE_SHARE_READ, nullptr, CREATE_ALWAYS, FILE_FLAG_SEQUENTIAL_SCAN, nullptr);
if (opts.hOutFile == INVALID_HANDLE_VALUE) {
AddToStatus(STATUS_FATAL, TranslateT("Can't create output file (%u)"), GetLastError());
ProcessingDone();
@@ -129,7 +129,7 @@ void __cdecl WorkerThread(void *)
firstTime = 0;
if (ret == ERROR_OUT_OF_PAPER) {
Finalize(ts);
- AddToStatus(STATUS_MESSAGE, TranslateT("Elapsed time: %d sec"), time(NULL) - ts);
+ AddToStatus(STATUS_MESSAGE, TranslateT("Elapsed time: %d sec"), time(nullptr) - ts);
if (errorCount)
AddToStatus(STATUS_SUCCESS, TranslateT("All tasks completed but with errors (%d)"), errorCount);
else