diff --git a/src/lib/component/controller/StatusBarController.cpp b/src/lib/component/controller/StatusBarController.cpp index 47c806bb..547619f3 100644 --- a/src/lib/component/controller/StatusBarController.cpp +++ b/src/lib/component/controller/StatusBarController.cpp @@ -29,7 +29,7 @@ void StatusBarController::handleMessage(MessageFinishedParsing* message) getView()->setErrorCount(errorCount); std::string status = message->getStatusStr(); - status += " " + std::to_string(errorCount.total) + " error" + (errorCount.total > 1 ? "s" : ""); + status += " " + std::to_string(errorCount.total) + " error" + (errorCount.total != 1 ? "s" : ""); if (errorCount.fatal > 0) { status += " (" + std::to_string(errorCount.fatal) + " fatal)"; diff --git a/src/lib/utility/messaging/type/MessageFinishedParsing.h b/src/lib/utility/messaging/type/MessageFinishedParsing.h index dec65a97..e47b2f9c 100644 --- a/src/lib/utility/messaging/type/MessageFinishedParsing.h +++ b/src/lib/utility/messaging/type/MessageFinishedParsing.h @@ -33,8 +33,26 @@ public: { std::stringstream ss; ss << "Finished analysis: "; - ss << fileCount << "/" << totalFileCount << " files, "; - ss << std::setprecision(2) << std::fixed << parseTime << " seconds."; + ss << fileCount << "/" << totalFileCount << " files; "; + + float secondsLeft = parseTime; + int hours = int(secondsLeft / 3600); + secondsLeft -= hours * 3600; + int minutes = int(secondsLeft / 60); + secondsLeft -= minutes * 60; + int seconds = int(secondsLeft); + + if (hours > 9) + { + ss << hours; + } + else + { + ss << std::setw(2) << std::setfill('0') << hours; + } + ss << ":" << std::setw(2) << std::setfill('0') << minutes; + ss << ":" << std::setw(2) << std::setfill('0') << seconds << ". "; + return ss.str(); }