mirror of
https://github.com/swift-project/pilotclient.git
synced 2026-04-03 07:35:48 +08:00
Ref T241, misc. logger improvements
* string formatting of logger info * display longer in simulator * better formatting of message
This commit is contained in:
@@ -811,8 +811,15 @@ namespace BlackCore
|
||||
|
||||
QString dm;
|
||||
static const QString sep("\n");
|
||||
if (s.tsCurrent > 0) { dm = QStringLiteral("Situation: ") % s.toQString(true, true, true, true, true, true, sep); }
|
||||
if (p.tsCurrent > 0) { dm += (dm.isEmpty() ? QStringLiteral("") : "\n\n") % QStringLiteral("Parts: ") % p.toQString(sep); }
|
||||
if (s.tsCurrent > 0)
|
||||
{
|
||||
dm = QStringLiteral("Hints: ") % s.usedHints.asString(false, true) %
|
||||
QStringLiteral("\n") %
|
||||
QStringLiteral("Setup: ") % s.usedSetup.toQString(true) %
|
||||
QStringLiteral("\n\n") %
|
||||
QStringLiteral("Situation: ") % s.toQString(false, false, true, true, true, true, sep);
|
||||
}
|
||||
if (p.tsCurrent > 0) { dm += (dm.isEmpty() ? QStringLiteral("") : QStringLiteral("\n\n")) % QStringLiteral("Parts: ") % p.toQString(sep); }
|
||||
if (!dm.isEmpty()) { this->displayStatusMessage(CStatusMessage(this).info(dm)); }
|
||||
|
||||
const int t = 4500 + (qrand() % 1000); // makes sure not always using the same time difference
|
||||
|
||||
@@ -260,7 +260,7 @@ namespace BlackCore
|
||||
void callPhysicallyRemoveRemoteAircraft(const BlackMisc::Aviation::CCallsign &remoteCallsign);
|
||||
|
||||
//! Display a logged situation in simulator
|
||||
void displayLoggedSituationInSimulator(const BlackMisc::Aviation::CCallsign &cs, bool stopLogging, int times = 10);
|
||||
void displayLoggedSituationInSimulator(const BlackMisc::Aviation::CCallsign &cs, bool stopLogging, int times = 25);
|
||||
|
||||
bool m_blinkCycle = false; //!< used for highlighting
|
||||
qint64 m_highlightEndTimeMsEpoch = 0; //!< end highlighting
|
||||
|
||||
Reference in New Issue
Block a user