Brewtarget / brewtarget

Main brewtarget source code repository.
GNU General Public License v3.0
310 stars 134 forks source link

Crash fixes #749

Closed matty0ung closed 1 year ago

matty0ung commented 1 year ago

Fixes for https://github.com/Brewtarget/brewtarget/issues/748 and https://github.com/Brewtarget/brewtarget/issues/747

The former is just adding a check to allow for the fact that a new Recipe has no Style. (Not sure why this hasn't happened before. Either maybe we gave it a default style in the past, or we didn't go down this particular code path?)

The latter is a bit of tidy-up I missed from the last commit. Essentially, now that we have SmartField, the SmartDigitWidget class (formerly BtDigitWidget) doesn't need to do so much, because it can use the share functionality of SmartField. So, mostly just needed to delete some no-longer-needed member functions.

Whilst I was working on SmartField etc, I decided to move all the SmartXxxx base classes into the widgets folder as, although they are not technically widgets in their own right, it was too confusing having two different places to look for everything. (Maybe I just get confused easily.)

There's also a bit more stuff come across on optional fields from the ongoing BeerJSON work. Not currently used in anger, but not worth excluding from the merge either IMHO.

Lastly, but not leastly (err, that isn't a word, is it), since we finally got packaging working on Mac (hurrah!) I'm officially switching to meson + bt as the "preferred" build and packaging tools. I'm happy to keep supporting CMake for compilation and local install, but I'm not planning to do any more work on CPack for packaging via CMake as it was (a) just too painful on Windows and Mac and (b) is a bit clunky even on Linux.