Eliminate repeated enumerations #75

Closed
N3Roaster opened this Issue Mar 27, 2013 · 4 comments

Comments

Projects
None yet
1 participant
@N3Roaster
Owner

N3Roaster commented Mar 27, 2013

Enumerations that are required in multiple classes should be removed from these classes so they can use a shared definition.

@N3Roaster

This comment has been minimized.

Show comment Hide comment
@N3Roaster

N3Roaster Mar 29, 2013

Owner

Measurement::TemperatureUnits
DAQ::TemperatureUnits
TemperatureDisplay::DisplayUnits
MeasurementModel::DisplayUnits

These four enumerations are all the same thing. This appears to be the only case of an enum replicated across multiple classes within the main code base. There is some replication in bringing in enumerations from QextSerialPort, but changing that would require less maintainable code in the relevant selector widgets so this should be kept until it is reasonable to switch to either a version of QextSerialPort that makes its enumerations discoverable through the meta-object system or if the QtSerialPort module gets into a stable release it may be possible to similarly trim things down.

While I don't like its current existence in the DAQ class, DAQ::ThermocoupleType does not appear to be replicated elsewhere at present.

Owner

N3Roaster commented Mar 29, 2013

Measurement::TemperatureUnits
DAQ::TemperatureUnits
TemperatureDisplay::DisplayUnits
MeasurementModel::DisplayUnits

These four enumerations are all the same thing. This appears to be the only case of an enum replicated across multiple classes within the main code base. There is some replication in bringing in enumerations from QextSerialPort, but changing that would require less maintainable code in the relevant selector widgets so this should be kept until it is reasonable to switch to either a version of QextSerialPort that makes its enumerations discoverable through the meta-object system or if the QtSerialPort module gets into a stable release it may be possible to similarly trim things down.

While I don't like its current existence in the DAQ class, DAQ::ThermocoupleType does not appear to be replicated elsewhere at present.

@N3Roaster

This comment has been minimized.

Show comment Hide comment
@N3Roaster

N3Roaster Mar 30, 2013

Owner

Work on this issue is in the issue75 branch.

Owner

N3Roaster commented Mar 30, 2013

Work on this issue is in the issue75 branch.

@N3Roaster

This comment has been minimized.

Show comment Hide comment
@N3Roaster

N3Roaster Apr 19, 2013

Owner

Testing uncovers several issues that need to be resolved before this branch can be merged into development. The issue75 branch should be considered dangerous.

Owner

N3Roaster commented Apr 19, 2013

Testing uncovers several issues that need to be resolved before this branch can be merged into development. The issue75 branch should be considered dangerous.

@N3Roaster

This comment has been minimized.

Show comment Hide comment
@N3Roaster

N3Roaster Apr 19, 2013

Owner

All known issues resolved and tested as working. Branch merged to development.

Owner

N3Roaster commented Apr 19, 2013

All known issues resolved and tested as working. Branch merged to development.

@N3Roaster N3Roaster closed this in f494c96 Jun 8, 2013

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment