From d4af25c52a28b93484ffb55e0a8027bc4ce7856f Mon Sep 17 00:00:00 2001 From: Daniel Wilhelm Date: Fri, 18 Apr 2014 17:21:59 +0200 Subject: 5.9 --- ui/gui_status_handler.cpp | 12 ++++++++++-- 1 file changed, 10 insertions(+), 2 deletions(-) (limited to 'ui/gui_status_handler.cpp') diff --git a/ui/gui_status_handler.cpp b/ui/gui_status_handler.cpp index 63e394ff..120eab39 100644 --- a/ui/gui_status_handler.cpp +++ b/ui/gui_status_handler.cpp @@ -194,7 +194,8 @@ SyncStatusHandler::SyncStatusHandler(MainDialog* parentDlg, SyncStatusHandler::~SyncStatusHandler() { - const int totalErrors = errorLog.getItemCount(TYPE_ERROR | TYPE_FATAL_ERROR); //evaluate before finalizing log + const int totalErrors = errorLog.getItemCount(TYPE_ERROR | TYPE_FATAL_ERROR); //evaluate before finalizing log + const int totalWarnings = errorLog.getItemCount(TYPE_WARNING); //finalize error log //finalize error log @@ -207,7 +208,12 @@ SyncStatusHandler::~SyncStatusHandler() else if (totalErrors > 0) { finalStatus = _("Synchronization completed with errors!"); - errorLog.logMsg(finalStatus, TYPE_WARNING); + errorLog.logMsg(finalStatus, TYPE_ERROR); + } + else if (totalWarnings > 0) + { + finalStatus = _("Synchronization completed with warnings!"); + errorLog.logMsg(finalStatus, TYPE_WARNING); //give status code same warning priority as display category! } else { @@ -250,6 +256,8 @@ SyncStatusHandler::~SyncStatusHandler() syncStatusFrame.processHasFinished(SyncStatus::RESULT_ABORTED, errorLog); //enable okay and close events else if (totalErrors > 0) syncStatusFrame.processHasFinished(SyncStatus::RESULT_FINISHED_WITH_ERROR, errorLog); + else if (totalWarnings > 0) + syncStatusFrame.processHasFinished(SyncStatus::RESULT_FINISHED_WITH_WARNINGS, errorLog); else syncStatusFrame.processHasFinished(SyncStatus::RESULT_FINISHED_WITH_SUCCESS, errorLog); } -- cgit