mirror of
https://github.com/swift-project/pilotclient.git
synced 2026-04-03 15:45:46 +08:00
Ref T660, utility functions
* check if model is in path * addAsValidOrInvalidModel * set corresponding simulator for validation * display validation of empty model set
This commit is contained in:
committed by
Mat Sutcliffe
parent
d59e1c3332
commit
f3ec7a8a68
@@ -130,19 +130,22 @@ namespace BlackMisc
|
||||
|
||||
onlyErrorsAndWarnings = setup.onlyShowVerificationWarningsAndErrors();
|
||||
const CAircraftModelList models = m_modelSets.getCachedModels(simulator);
|
||||
const qint64 now = QDateTime::currentMSecsSinceEpoch();
|
||||
validated = true;
|
||||
|
||||
if (models.isEmpty())
|
||||
{
|
||||
msgs.push_back(CStatusMessage(this, CStatusMessage::SeverityWarning, QStringLiteral("No models in set for '%1'").arg(simulator.toQString(true))));
|
||||
break;
|
||||
}
|
||||
msgs = CAircraftModelUtilities::validateModelFiles(models, valid, invalid, false, 25, wasStopped, m_simDirectory);
|
||||
else
|
||||
{
|
||||
msgs = CAircraftModelUtilities::validateModelFiles(simulator, models, valid, invalid, false, 25, wasStopped, m_simDirectory);
|
||||
}
|
||||
|
||||
const qint64 now = QDateTime::currentMSecsSinceEpoch();
|
||||
const qint64 deltaTimeMs = now - started;
|
||||
msgs.push_back(CStatusMessage(this, CStatusMessage::SeverityInfo, QStringLiteral("Validated in %1ms").arg(deltaTimeMs)));
|
||||
msgs.sortBySeverityHighestFirst();
|
||||
msgs.freezeOrder();
|
||||
validated = true;
|
||||
|
||||
QWriteLocker l(&m_lock);
|
||||
m_lastResultValid = valid;
|
||||
|
||||
Reference in New Issue
Block a user