Skip to content
Snippets Groups Projects

Should throw error on reading ill-formed .pet-file (e.g. wrong decimal separator)

We didn't check if the values from the pet file are parsed successfully, which lead to errors. This MR introduces helper methods that check that. I tried my best to divide my changes with commits so one can look at one commit at once when reviewing.

Reviewer Checklist

Formatting

  • the pre-build checks succeed

General code quality

  • naming conventions are met (see .clang-tidy for detailed information)
  • no static analyzer warnings in new code parts (e.g., use clang-tidy for checking)

General usability

  • old versions of pet-files are still loadable

Only if changes in UI

  • new elements are also saved and loaded from pet-file
  • check if tab order is still correct
  • all new SpinBoxes are promoted
  • new keybindings added to Petrack::keyBindings()
Edited by d.kilic

Merge request reports

Pipeline #149242 passed

Pipeline passed for 1a5f2e58 on 470-should-throw-error-on-reading-ill-formed-pet-file-e-g-wrong-decimal-separator

Merged by l.dressenl.dressen 8 months ago (Jul 3, 2024 11:52am UTC)

Loading

Pipeline #149251 passed

Pipeline passed for dd6b6c39 on master

Activity

Filter activity
  • Approvals
  • Assignees & reviewers
  • Comments (from bots)
  • Comments (from users)
  • Commits & branches
  • Edits
  • Labels
  • Lock status
  • Mentions
  • Merge request status
  • Tracking
  • d.kilic
  • d.kilic
  • d.kilic
  • d.kilic
  • d.kilic
  • d.kilic
  • d.kilic
  • d.kilic
  • d.kilic
  • d.kilic
  • d.kilic
  • d.kilic
    • Resolved by d.kilic

      Do you think it is worth putting these functions into their own file? I don't see why we should force all classes that are in the pet-file to include <opencv2/opencv.hpp> transitively, i.e. helper.h is a kinda heavy header.

  • d.kilic
    • Resolved by d.kilic

      This is mostly a matter of taste. You can decide whether you want to do it like that.

      With this many very similar functions I like it when many of them are visible at once, so comparisions are easy. Towards that goal, one can separate the implementation and decalratoin of the templated functions. See here for an example. Alternatively, one could put the templated functions of a "group" at the end of the group. This way, the definition also does not introduce a "gap" between the different related declarations.

  • Loading
  • Loading
  • Loading
  • Loading
  • Loading
  • Loading
  • Loading
  • Loading
  • Loading
  • Loading
  • Please register or sign in to reply
    Loading