From bcc5cc28c6dc5178e8f4fd0cc521034ae5def388 Mon Sep 17 00:00:00 2001 From: Daniel Wilhelm Date: Fri, 18 Apr 2014 17:22:18 +0200 Subject: 5.10 --- ui/gui_status_handler.cpp | 17 ++++++++++++----- 1 file changed, 12 insertions(+), 5 deletions(-) (limited to 'ui/gui_status_handler.cpp') diff --git a/ui/gui_status_handler.cpp b/ui/gui_status_handler.cpp index 120eab39..c8311811 100644 --- a/ui/gui_status_handler.cpp +++ b/ui/gui_status_handler.cpp @@ -175,16 +175,18 @@ void CompareStatusHandler::abortThisProcess() requestAbortion(); //just make sure... throw GuiAbortProcess(); } -//######################################################################################################## +//######################################################################################################## SyncStatusHandler::SyncStatusHandler(MainDialog* parentDlg, + size_t lastSyncsLogFileSizeMax, OnGuiError handleError, const std::wstring& jobName, const std::wstring& execWhenFinished, std::vector& execFinishedHistory) : parentDlg_(parentDlg), syncStatusFrame(*this, *this, parentDlg, true, jobName, execWhenFinished, execFinishedHistory), + lastSyncsLogFileSizeMax_(lastSyncsLogFileSizeMax), handleError_(handleError), jobName_(jobName) { @@ -225,12 +227,17 @@ SyncStatusHandler::~SyncStatusHandler() errorLog.logMsg(finalStatus, TYPE_INFO); } - const Utf8String logStream = generateLogStream(errorLog, jobName_, finalStatus, - getObjectsCurrent(PHASE_SYNCHRONIZING), getDataCurrent(PHASE_SYNCHRONIZING), - getObjectsTotal (PHASE_SYNCHRONIZING), getDataTotal (PHASE_SYNCHRONIZING), totalTime.Time() / 1000); + const SummaryInfo summary = + { + jobName_, finalStatus, + getObjectsCurrent(PHASE_SYNCHRONIZING), getDataCurrent(PHASE_SYNCHRONIZING), + getObjectsTotal (PHASE_SYNCHRONIZING), getDataTotal (PHASE_SYNCHRONIZING), + totalTime.Time() / 1000 + }; + try { - saveToLastSyncsLog(logStream); //throw FileError + saveToLastSyncsLog(summary, errorLog, lastSyncsLogFileSizeMax_); //throw FileError } catch (FileError&) {} -- cgit