From dafb3b056945d487d946fda3f38500753d8d90b7 Mon Sep 17 00:00:00 2001 From: Klaus Basan Date: Fri, 13 Oct 2017 20:22:02 +0200 Subject: [PATCH] Ref T171, allow opening the interpolation log dir by command --- src/blackcore/simulatorcommon.cpp | 19 +++++++++++++++++-- 1 file changed, 17 insertions(+), 2 deletions(-) diff --git a/src/blackcore/simulatorcommon.cpp b/src/blackcore/simulatorcommon.cpp index e3ea97304..b145499dc 100644 --- a/src/blackcore/simulatorcommon.cpp +++ b/src/blackcore/simulatorcommon.cpp @@ -27,6 +27,9 @@ #include #include #include +#include +#include +#include #include using namespace BlackMisc; @@ -419,6 +422,20 @@ namespace BlackCore CLogMessage(this).info("Started writing interpolation log"); return true; } + if (part2 == "show") + { + QDir dir(CInterpolationLogger::getLogDirectory()); + if (dir.exists()) + { + const QUrl dirUrl = QUrl::fromLocalFile(dir.absolutePath()); + QDesktopServices::openUrl(dirUrl); // show dir in browser + } + else + { + CLogMessage(this).warning("No interpolation log directory"); + } + return true; + } const QString cs = part2.toUpper(); if (!CCallsign::isValidAircraftCallsign(cs)) { return false; } @@ -606,6 +623,4 @@ namespace BlackCore m_statsPhysicallyRemovedAircraft++; this->physicallyRemoveRemoteAircraft(remoteCallsign); } - - } // namespace