This commit is contained in:
Klaus Basan
2019-01-16 19:45:13 +01:00
committed by Mat Sutcliffe
parent 13c67e4838
commit 25df1921eb
9 changed files with 14 additions and 13 deletions

View File

@@ -271,7 +271,7 @@ namespace BlackCore
//! Repeat all matchings
virtual int doMatchingsAgain() = 0;
//! Repeat the matching
//! Repeat the matching callsign
virtual bool doMatchingAgain(const BlackMisc::Aviation::CCallsign &callsign) = 0;
//! Current matching statistics

View File

@@ -347,6 +347,7 @@ namespace BlackCore
virtual BlackMisc::Simulation::CMatchingStatistics getCurrentMatchingStatistics(bool missingOnly) const override
{
Q_UNUSED(missingOnly);
logEmptyContextWarning(Q_FUNC_INFO);
return BlackMisc::Simulation::CMatchingStatistics();
}
@@ -354,11 +355,13 @@ namespace BlackCore
virtual void setMatchingSetup(const BlackMisc::Simulation::CAircraftMatcherSetup &setup) override
{
Q_UNUSED(setup);
logEmptyContextWarning(Q_FUNC_INFO);
}
//! \copydoc IContextSimulator::setMatchingSetup
virtual BlackMisc::Simulation::CAircraftMatcherSetup getMatchingSetup() const override
{
logEmptyContextWarning(Q_FUNC_INFO);
return BlackMisc::Simulation::CAircraftMatcherSetup();
}
@@ -368,6 +371,7 @@ namespace BlackCore
Q_UNUSED(simulator);
return BlackMisc::CStatusMessageList();
}
};
} // namespace
} // namespace

View File

@@ -250,11 +250,11 @@ namespace BlackCore
void initByLastUsedModelSet();
QPair<BlackMisc::Simulation::CSimulatorPluginInfo, QPointer<ISimulator>> m_simulatorPlugin; //!< Currently loaded simulator plugin
QMap<BlackMisc::Aviation::CCallsign, BlackMisc::CStatusMessageList> m_matchingMessages; //!< all matching log messages per callsign
CPluginManagerSimulator *m_plugins = nullptr; //!< plugin manager
BlackMisc::CRegularThread m_listenersThread; //!< waiting for plugin
CWeatherManager m_weatherManager { this }; //!< weather management
CAircraftMatcher m_aircraftMatcher { this }; //!< model matcher
QMap<BlackMisc::Aviation::CCallsign, BlackMisc::CStatusMessageList> m_matchingMessages; //!< all matching log messages per callsign
bool m_wasSimulating = false;
bool m_initallyAddAircraft = false;

View File

@@ -31,7 +31,7 @@ namespace BlackCore
{
const CLogCategoryList &CBackgroundDataUpdater::getLogCategories()
{
static const BlackMisc::CLogCategoryList cats { BlackMisc::CLogCategory::worker() };
static const CLogCategoryList cats({ CLogCategory::worker(), CLogCategory::modelSetCache(), CLogCategory::modelCache() });
return cats;
}

View File

@@ -14,8 +14,8 @@
#include "blackcore/data/dbcaches.h"
#include "blackcore/blackcoreexport.h"
#include "blackmisc/network/entityflags.h"
#include "blackmisc/simulation/data/modelcaches.h"
#include "blackmisc/network/entityflags.h"
#include "blackmisc/statusmessagelist.h"
#include "blackmisc/worker.h"
@@ -48,7 +48,7 @@ namespace BlackCore
void consolidating(bool running);
private:
mutable QReadWriteLock m_lockMsg; //!< lock snapshot
mutable QReadWriteLock m_lockMsg; //!< lock history messages
std::atomic_int m_cycle { 0 }; //!< cycle
std::atomic_bool m_inWork { false }; //!< indicates a running update
std::atomic_bool m_updatePublishedModels { true }; //!< update when models have been updated

View File

@@ -61,9 +61,6 @@ namespace BlackGui
void CSettingsMatchingComponent::showButtons(bool show)
{
ui->fr_Buttons->setVisible(show);
// ui->pb_MatchingAgain->setVisible(show);
// ui->pb_Reload->setVisible(show);
// ui->pb_Save->setVisible(show);
}
void CSettingsMatchingComponent::onSavePressed() const

View File

@@ -22,9 +22,9 @@
#include <QScopedPointer>
#include <QString>
namespace Ui { class CSettingsSimulatorComponent; }
namespace BlackCore { class CPluginManagerSimulator; }
namespace BlackMisc { namespace Simulation { class CSimulatorPluginInfo; } }
namespace Ui { class CSettingsSimulatorComponent; }
namespace BlackGui
{
namespace Components

View File

@@ -27,15 +27,15 @@ namespace BlackGui
m_description(description.trimmed()),
m_combinedType(combinedType.trimmed().toUpper())
{
this->m_valid = !(this->m_id < 0 && this->m_combinedType.isEmpty() && this->m_designator.isEmpty() &&
this->m_family.isEmpty() && this->m_description.isEmpty() && this->m_manufacturer.isEmpty());
m_valid = !(m_id < 0 && m_combinedType.isEmpty() && m_designator.isEmpty() &&
m_family.isEmpty() && m_description.isEmpty() && m_manufacturer.isEmpty());
}
CAircraftIcaoCodeList CAircraftIcaoFilter::filter(const CAircraftIcaoCodeList &inContainer) const
{
if (!this->isValid()) { return inContainer; }
CAircraftIcaoCodeList outContainer;
const bool filterCombinedCode = !this->m_combinedType.isEmpty() && !this->m_combinedType.contains('-') && CAircraftIcaoCode::isValidCombinedType(this->m_combinedType);
const bool filterCombinedCode = !m_combinedType.isEmpty() && !m_combinedType.contains('-') && CAircraftIcaoCode::isValidCombinedType(m_combinedType);
for (const CAircraftIcaoCode &icao : inContainer)
{

View File

@@ -195,7 +195,7 @@ namespace BlackMisc
void CContinuousWorker::startUpdating(int updateTimeSecs)
{
Q_ASSERT_X(hasStarted(), Q_FUNC_INFO, "Worker not yet started");
Q_ASSERT_X(this->hasStarted(), Q_FUNC_INFO, "Worker not yet started");
if (!CThreadUtils::isCurrentThreadObjectThread(this))
{
// shift in correct thread