mirror of
https://github.com/swift-project/pilotclient.git
synced 2026-04-19 12:15:29 +08:00
Ref T171, allow opening the interpolation log dir by command
This commit is contained in:
@@ -27,6 +27,9 @@
|
|||||||
#include <QDateTime>
|
#include <QDateTime>
|
||||||
#include <QString>
|
#include <QString>
|
||||||
#include <QThread>
|
#include <QThread>
|
||||||
|
#include <QDir>
|
||||||
|
#include <QUrl>
|
||||||
|
#include <QDesktopServices>
|
||||||
#include <functional>
|
#include <functional>
|
||||||
|
|
||||||
using namespace BlackMisc;
|
using namespace BlackMisc;
|
||||||
@@ -419,6 +422,20 @@ namespace BlackCore
|
|||||||
CLogMessage(this).info("Started writing interpolation log");
|
CLogMessage(this).info("Started writing interpolation log");
|
||||||
return true;
|
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();
|
const QString cs = part2.toUpper();
|
||||||
if (!CCallsign::isValidAircraftCallsign(cs)) { return false; }
|
if (!CCallsign::isValidAircraftCallsign(cs)) { return false; }
|
||||||
@@ -606,6 +623,4 @@ namespace BlackCore
|
|||||||
m_statsPhysicallyRemovedAircraft++;
|
m_statsPhysicallyRemovedAircraft++;
|
||||||
this->physicallyRemoveRemoteAircraft(remoteCallsign);
|
this->physicallyRemoveRemoteAircraft(remoteCallsign);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
} // namespace
|
} // namespace
|
||||||
|
|||||||
Reference in New Issue
Block a user