Skip to content
Snippets Groups Projects
Commit 296509dc authored by Matthias Puchner's avatar Matthias Puchner
Browse files

rm default ctor and delayed init

parent 746efcf6
No related branches found
No related tags found
1 merge request!386Introduce value descriptors
Pipeline #46212 passed
......@@ -53,8 +53,6 @@ DoubleDescriptor::DoubleDescriptor(const QString& label, const QString& tooltip,
path = [] { return QString(); };
}
DoubleDescriptor::DoubleDescriptor() {}
DoubleDescriptor::DoubleDescriptor(const QString& label, const QString& tooltip, double* var,
const variant<QString, Unit>& unit)
: DoubleDescriptor(label, tooltip, 3, RealLimits::nonnegative(), var, unit)
......@@ -70,11 +68,6 @@ DoubleDescriptor::DoubleDescriptor(const QString& label, const QString& tooltip,
{
}
void DoubleDescriptor::init(SessionItem* item, const variant<QString, Unit>& unit)
{
operator=(DoubleDescriptor(item, unit));
}
DoubleDescriptor::operator double() const
{
return get();
......
......@@ -67,14 +67,6 @@ private: // private as long as path initialization is not included in params (to
function<double()> getter, const variant<QString, Unit>& unit);
public:
//! For delayed initialization.
//! Call init before usage!
DoubleDescriptor();
//! Initialize with a session item. To be used if an initialization already in the constructor
//! is not possible. Only for easier migration. Should be removed after SessionItem refactoring.
void init(SessionItem* item, const variant<QString, Unit>& unit);
//! Return the current value of the handled parameter.
operator double() const;
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment