Ref T35, optional model description when mapping

This commit is contained in:
Klaus Basan
2017-04-23 22:24:12 +02:00
committed by Mathew Sutcliffe
parent 5687f5c176
commit fad7d4b8c9
3 changed files with 4 additions and 4 deletions

View File

@@ -23,7 +23,6 @@
class QWidget; class QWidget;
namespace Ui { class CModelMappingForm; } namespace Ui { class CModelMappingForm; }
namespace BlackGui namespace BlackGui
{ {
namespace Editors namespace Editors
@@ -40,7 +39,7 @@ namespace BlackGui
explicit CModelMappingForm(QWidget *parent = nullptr); explicit CModelMappingForm(QWidget *parent = nullptr);
//! Destructor //! Destructor
~CModelMappingForm(); virtual ~CModelMappingForm();
//! Value //! Value
BlackMisc::Simulation::CAircraftModel getValue() const; BlackMisc::Simulation::CAircraftModel getValue() const;

View File

@@ -636,7 +636,8 @@ namespace BlackMisc
CStatusMessageList msgs; CStatusMessageList msgs;
if (!hasModelString()) { msgs.push_back(CStatusMessage(cats, CStatusMessage::SeverityError, "Model: missing model string (aka key)")); } if (!hasModelString()) { msgs.push_back(CStatusMessage(cats, CStatusMessage::SeverityError, "Model: missing model string (aka key)")); }
if (!hasValidSimulator()) {msgs.push_back(CStatusMessage(cats, CStatusMessage::SeverityError, "Model: no simulator set")); } if (!hasValidSimulator()) {msgs.push_back(CStatusMessage(cats, CStatusMessage::SeverityError, "Model: no simulator set")); }
if (!hasDescription()) {msgs.push_back(CStatusMessage(cats, CStatusMessage::SeverityWarning, "Model: no description")); } // as of T34 made description optional, lines can be removed after 6/2017
// if (!hasDescription()) {msgs.push_back(CStatusMessage(cats, CStatusMessage::SeverityWarning, "Model: no description")); }
if (withNestedObjects) if (withNestedObjects)
{ {
msgs.push_back(m_aircraftIcao.validate()); msgs.push_back(m_aircraftIcao.validate());

View File

@@ -164,7 +164,7 @@ namespace BlackMisc
const QString &getDescription() const { return this->m_description; } const QString &getDescription() const { return this->m_description; }
//! Descriptive text //! Descriptive text
void setDescription(const QString &description) { this->m_description = description; } void setDescription(const QString &description) { this->m_description = description.trimmed(); }
//! Set queried model string //! Set queried model string
void setQueriedModelString(const QString &model) { this->m_modelString = model; this->m_modelType = TypeQueriedFromNetwork; } void setQueriedModelString(const QString &model) { this->m_modelString = model; this->m_modelType = TypeQueriedFromNetwork; }