diff --git a/core/include/Variable/Variable.h b/core/include/Variable/Variable.h index 0232cb1..304cf58 100644 --- a/core/include/Variable/Variable.h +++ b/core/include/Variable/Variable.h @@ -22,12 +22,9 @@ class Variable : public QObject { Q_OBJECT public: - explicit Variable(const QString &name, const QString &unit, const QString &mission, - const SqpDateTime &dateTime); + explicit Variable(const QString &name, const SqpDateTime &dateTime); QString name() const noexcept; - QString mission() const noexcept; - QString unit() const noexcept; SqpDateTime dateTime() const noexcept; void setDateTime(const SqpDateTime &dateTime) noexcept; diff --git a/core/src/Variable/Variable.cpp b/core/src/Variable/Variable.cpp index 2a2ba89..08a1c71 100644 --- a/core/src/Variable/Variable.cpp +++ b/core/src/Variable/Variable.cpp @@ -9,27 +9,19 @@ Q_LOGGING_CATEGORY(LOG_Variable, "Variable") struct Variable::VariablePrivate { - explicit VariablePrivate(const QString &name, const QString &unit, const QString &mission, - const SqpDateTime &dateTime) - : m_Name{name}, - m_Unit{unit}, - m_Mission{mission}, - m_DateTime{dateTime}, - m_DataSeries{nullptr} + explicit VariablePrivate(const QString &name, const SqpDateTime &dateTime) + : m_Name{name}, m_DateTime{dateTime}, m_DataSeries{nullptr} { } QString m_Name; - QString m_Unit; - QString m_Mission; SqpDateTime m_DateTime; // The dateTime available in the view and loaded. not the cache. std::unique_ptr m_DataSeries; }; -Variable::Variable(const QString &name, const QString &unit, const QString &mission, - const SqpDateTime &dateTime) - : impl{spimpl::make_unique_impl(name, unit, mission, dateTime)} +Variable::Variable(const QString &name, const SqpDateTime &dateTime) + : impl{spimpl::make_unique_impl(name, dateTime)} { } @@ -38,16 +30,6 @@ QString Variable::name() const noexcept return impl->m_Name; } -QString Variable::mission() const noexcept -{ - return impl->m_Mission; -} - -QString Variable::unit() const noexcept -{ - return impl->m_Unit; -} - SqpDateTime Variable::dateTime() const noexcept { return impl->m_DateTime; diff --git a/core/src/Variable/VariableModel.cpp b/core/src/Variable/VariableModel.cpp index af06461..2b0ccc8 100644 --- a/core/src/Variable/VariableModel.cpp +++ b/core/src/Variable/VariableModel.cpp @@ -65,9 +65,7 @@ std::shared_ptr VariableModel::createVariable(const QString &name, auto insertIndex = rowCount(); beginInsertRows({}, insertIndex, insertIndex); - /// @todo For the moment, the other data of the variable is initialized with default values - auto variable = std::make_shared(name, QStringLiteral("unit"), - QStringLiteral("mission"), dateTime); + auto variable = std::make_shared(name, dateTime); impl->m_Variables.push_back(variable); connect(variable.get(), &Variable::updated, this, &VariableModel::onVariableUpdated); diff --git a/core/tests/Variable/TestVariableCacheController.cpp b/core/tests/Variable/TestVariableCacheController.cpp index 6a6600d..92f886b 100644 --- a/core/tests/Variable/TestVariableCacheController.cpp +++ b/core/tests/Variable/TestVariableCacheController.cpp @@ -35,7 +35,7 @@ void TestVariableCacheController::testProvideNotInCacheDateTimeList() auto sqp2 = SqpDateTime{static_cast(ts2.toMSecsSinceEpoch()), static_cast(te2.toMSecsSinceEpoch())}; - auto var0 = std::make_shared("", "", "", sqp0); + auto var0 = std::make_shared("", sqp0); variableCacheController.addDateTime(var0, sqp0); variableCacheController.addDateTime(var0, sqp1); @@ -289,7 +289,7 @@ void TestVariableCacheController::testAddDateTime() static_cast(te03.toMSecsSinceEpoch())}; - auto var0 = std::make_shared("", "", "", sqp0); + auto var0 = std::make_shared("", sqp0); // First case: add the first interval to the variable :sqp0