Cleanup: make cylinder_t argument to CylinderObjectHelper const

CylinderObjectHelper copies state from the passed in cylinder_t
but does not modify it.

Signed-off-by: Berthold Stoeger <bstoeger@mail.tuwien.ac.at>
This commit is contained in:
Berthold Stoeger 2019-08-13 22:30:36 +02:00 committed by bstoeger
parent 06974f1a2c
commit 981c230706
2 changed files with 2 additions and 2 deletions

View file

@ -3,7 +3,7 @@
#include "../qthelper.h"
static QString EMPTY_CYLINDER_STRING = QStringLiteral("");
CylinderObjectHelper::CylinderObjectHelper(cylinder_t *cylinder)
CylinderObjectHelper::CylinderObjectHelper(const cylinder_t *cylinder)
{
if (!cylinder)
return;

View file

@ -15,7 +15,7 @@ class CylinderObjectHelper {
Q_PROPERTY(QString endPressure MEMBER endPressure CONSTANT)
Q_PROPERTY(QString gasMix MEMBER gasMix CONSTANT)
public:
CylinderObjectHelper(cylinder_t *cylinder = NULL);
CylinderObjectHelper(const cylinder_t *cylinder = NULL);
QString description;
QString size;
QString workingPressure;