beam-ui
beam-ui copied to clipboard
Refactor the folder ui/viewmodel and ELSeedValidator. Replace RegExpValidator (deprecated) with RegularExpressionValidator.
Refactor ui/viewmodel
Determine which files and classes are considered "helper" files/objects and move them into appropriate subfolders. This requires feedback from other contributors to decide best layout.
Suggested (or to be considered) files -- along with their .h counterparts of course
- currencies
- el_seed_validator
- fee_helpers
- qml_globals
- settings_helpers
- ui_helpers
- window_event_filter
Refactor class ELSeedValidator
- ELSeedValidator inherits from
QValidator, and then seems to implement a regular expression validation manually in its validate() method. The validate method contains the allowed regular expression to be checked against. - Shouldn't this operate in the same way as every other validate method? That is, the regular expression is defined in the QML file, in this case SeedInput.qml.
- So, shouldn't
ELSeedValidatorsimply inherit fromRegularExpressionValidatorso it can call the parent validate() method to check the regular expression, and then do the extra code in its validate() method?
Refactor RegExpValidator references
RegExpValidator is apparently deprecated and it is recommended to use RegularExpressionValidator
@anatolse