Skip to content

Commit

Permalink
Merge pull request #916 from matty0ung/usability
Browse files Browse the repository at this point in the history
Bump version number and move some source files around
  • Loading branch information
matty0ung authored Jan 2, 2025
2 parents 988de14 + 866fd37 commit c643f74
Show file tree
Hide file tree
Showing 264 changed files with 1,950 additions and 745 deletions.
12 changes: 12 additions & 0 deletions CHANGES.markdown
Original file line number Diff line number Diff line change
Expand Up @@ -13,6 +13,18 @@ happens, so I'm now setting it to a slightly arbitrary time early in the morning
* Additional methods for calculating IBU
* We'll list other new features here...

## v4.0.16
Bug fixes and minor enhancements.

### New Features
* None

### Bug Fixes
* None yet!

### Release Timestamp
Wed, 1 Jan 2025 04:00:16 +0100

## v4.0.15
Bug fixes and minor enhancements.

Expand Down
12 changes: 11 additions & 1 deletion CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -115,7 +115,7 @@ endif()
#=======================================================================================================================
# It's simplest to keep the project name all lower-case as it means we can use a lot more of the default settings for
# Linux packaging (where directory names etc are expected to be all lower-case).
project(brewtarget VERSION 4.0.15 LANGUAGES CXX)
project(brewtarget VERSION 4.0.16 LANGUAGES CXX)
message(STATUS "Building ${PROJECT_NAME} version ${PROJECT_VERSION}")
message(STATUS "PROJECT_SOURCE_DIR is ${PROJECT_SOURCE_DIR}")
# Sometimes we do need the capitalised version of the project name
Expand Down Expand Up @@ -456,6 +456,16 @@ endif()
# declarations etc.
set(CMAKE_AUTOMOC ON)

# Although AUTOMOC is pretty neat when it works, it can be problematic. Part of what it does is #include all the
# generated files (eg "moc_AboutDialog.cpp") into a single intermediate source file, which it then compiles. We have
# sometimes had compiler errors from this because of various Qt headers complaining about things being redefined. The
# brute-force workaround is, on CMake builds, to manually include these generated files in our corresponding .cpp file
# (eg "AboutDialog.cpp"), which then stops CMake pulling those generated files into its intermediate source file.
#
# (We don't want to do this extra manual include on the Meson builds because then we'd get duplicate symbols at the
# linking stage.)
add_compile_definitions(BUILDING_WITH_CMAKE)

# Set the AUTOUIC property on all targets. This tells CMake to automatically handle the Qt uic code generator, without
# having to use commands such as QT4_WRAP_UI(), QT5_WRAP_UI(), etc.
set(CMAKE_AUTOUIC ON)
Expand Down
206 changes: 103 additions & 103 deletions meson.build
Original file line number Diff line number Diff line change
Expand Up @@ -189,7 +189,7 @@
#
#
project('brewtarget', 'cpp',
version: '4.0.15',
version: '4.0.16',
license: 'GPL-3.0-or-later',
meson_version: '>=0.63.0',
default_options : ['cpp_std=c++23',
Expand Down Expand Up @@ -690,23 +690,6 @@ commonSourceFiles = files([
'src/editors/StyleEditor.cpp',
'src/editors/WaterEditor.cpp',
'src/editors/YeastEditor.cpp',
'src/listModels/BoilListModel.cpp',
'src/listModels/EquipmentListModel.cpp',
'src/listModels/FermentableListModel.cpp',
'src/listModels/FermentationListModel.cpp',
'src/listModels/HopListModel.cpp',
'src/listModels/MashListModel.cpp',
'src/listModels/MashStepListModel.cpp',
'src/listModels/MiscListModel.cpp',
'src/listModels/RecipeAdditionFermentableListModel.cpp',
'src/listModels/RecipeAdditionHopListModel.cpp',
'src/listModels/RecipeAdditionMiscListModel.cpp',
'src/listModels/RecipeAdditionYeastListModel.cpp',
'src/listModels/RecipeAdjustmentSaltListModel.cpp',
'src/listModels/SaltListModel.cpp',
'src/listModels/StyleListModel.cpp',
'src/listModels/WaterListModel.cpp',
'src/listModels/YeastListModel.cpp',
'src/measurement/Amount.cpp',
'src/measurement/ColorMethods.cpp',
'src/measurement/IbuMethods.cpp',
Expand Down Expand Up @@ -750,6 +733,57 @@ commonSourceFiles = files([
'src/model/Style.cpp',
'src/model/Water.cpp',
'src/model/Yeast.cpp',
'src/qtModels/listModels/BoilListModel.cpp',
'src/qtModels/listModels/EquipmentListModel.cpp',
'src/qtModels/listModels/FermentableListModel.cpp',
'src/qtModels/listModels/FermentationListModel.cpp',
'src/qtModels/listModels/HopListModel.cpp',
'src/qtModels/listModels/MashListModel.cpp',
'src/qtModels/listModels/MashStepListModel.cpp',
'src/qtModels/listModels/MiscListModel.cpp',
'src/qtModels/listModels/RecipeAdditionFermentableListModel.cpp',
'src/qtModels/listModels/RecipeAdditionHopListModel.cpp',
'src/qtModels/listModels/RecipeAdditionMiscListModel.cpp',
'src/qtModels/listModels/RecipeAdditionYeastListModel.cpp',
'src/qtModels/listModels/RecipeAdjustmentSaltListModel.cpp',
'src/qtModels/listModels/SaltListModel.cpp',
'src/qtModels/listModels/StyleListModel.cpp',
'src/qtModels/listModels/WaterListModel.cpp',
'src/qtModels/listModels/YeastListModel.cpp',
'src/qtModels/sortFilterProxyModels/BoilSortFilterProxyModel.cpp',
'src/qtModels/sortFilterProxyModels/EquipmentSortFilterProxyModel.cpp',
'src/qtModels/sortFilterProxyModels/FermentationSortFilterProxyModel.cpp',
'src/qtModels/sortFilterProxyModels/FermentableSortFilterProxyModel.cpp',
'src/qtModels/sortFilterProxyModels/HopSortFilterProxyModel.cpp',
'src/qtModels/sortFilterProxyModels/MashSortFilterProxyModel.cpp',
'src/qtModels/sortFilterProxyModels/MiscSortFilterProxyModel.cpp',
'src/qtModels/sortFilterProxyModels/RecipeAdditionFermentableSortFilterProxyModel.cpp',
'src/qtModels/sortFilterProxyModels/RecipeAdditionHopSortFilterProxyModel.cpp',
'src/qtModels/sortFilterProxyModels/RecipeAdditionMiscSortFilterProxyModel.cpp',
'src/qtModels/sortFilterProxyModels/RecipeAdditionYeastSortFilterProxyModel.cpp',
'src/qtModels/sortFilterProxyModels/StyleSortFilterProxyModel.cpp',
'src/qtModels/sortFilterProxyModels/WaterSortFilterProxyModel.cpp',
'src/qtModels/sortFilterProxyModels/YeastSortFilterProxyModel.cpp',
'src/qtModels/tableModels/BoilStepTableModel.cpp',
'src/qtModels/tableModels/BoilTableModel.cpp',
'src/qtModels/tableModels/BtTableModel.cpp',
'src/qtModels/tableModels/EquipmentTableModel.cpp',
'src/qtModels/tableModels/FermentableTableModel.cpp',
'src/qtModels/tableModels/FermentationStepTableModel.cpp',
'src/qtModels/tableModels/FermentationTableModel.cpp',
'src/qtModels/tableModels/HopTableModel.cpp',
'src/qtModels/tableModels/MashStepTableModel.cpp',
'src/qtModels/tableModels/MashTableModel.cpp',
'src/qtModels/tableModels/MiscTableModel.cpp',
'src/qtModels/tableModels/RecipeAdditionFermentableTableModel.cpp',
'src/qtModels/tableModels/RecipeAdditionHopTableModel.cpp',
'src/qtModels/tableModels/RecipeAdditionMiscTableModel.cpp',
'src/qtModels/tableModels/RecipeAdditionYeastTableModel.cpp',
'src/qtModels/tableModels/RecipeAdjustmentSaltTableModel.cpp',
'src/qtModels/tableModels/SaltTableModel.cpp',
'src/qtModels/tableModels/StyleTableModel.cpp',
'src/qtModels/tableModels/WaterTableModel.cpp',
'src/qtModels/tableModels/YeastTableModel.cpp',
'src/serialization/ImportExport.cpp',
'src/serialization/SerializationRecord.cpp',
'src/serialization/json/BeerJson.cpp',
Expand All @@ -768,40 +802,6 @@ commonSourceFiles = files([
'src/serialization/xml/XmlRecipeRecord.cpp',
'src/serialization/xml/XmlRecord.cpp',
'src/serialization/xml/XmlRecordDefinition.cpp',
'src/sortFilterProxyModels/BoilSortFilterProxyModel.cpp',
'src/sortFilterProxyModels/EquipmentSortFilterProxyModel.cpp',
'src/sortFilterProxyModels/FermentationSortFilterProxyModel.cpp',
'src/sortFilterProxyModels/FermentableSortFilterProxyModel.cpp',
'src/sortFilterProxyModels/HopSortFilterProxyModel.cpp',
'src/sortFilterProxyModels/MashSortFilterProxyModel.cpp',
'src/sortFilterProxyModels/MiscSortFilterProxyModel.cpp',
'src/sortFilterProxyModels/RecipeAdditionFermentableSortFilterProxyModel.cpp',
'src/sortFilterProxyModels/RecipeAdditionHopSortFilterProxyModel.cpp',
'src/sortFilterProxyModels/RecipeAdditionMiscSortFilterProxyModel.cpp',
'src/sortFilterProxyModels/RecipeAdditionYeastSortFilterProxyModel.cpp',
'src/sortFilterProxyModels/StyleSortFilterProxyModel.cpp',
'src/sortFilterProxyModels/WaterSortFilterProxyModel.cpp',
'src/sortFilterProxyModels/YeastSortFilterProxyModel.cpp',
'src/tableModels/BoilStepTableModel.cpp',
'src/tableModels/BoilTableModel.cpp',
'src/tableModels/BtTableModel.cpp',
'src/tableModels/EquipmentTableModel.cpp',
'src/tableModels/FermentableTableModel.cpp',
'src/tableModels/FermentationStepTableModel.cpp',
'src/tableModels/FermentationTableModel.cpp',
'src/tableModels/HopTableModel.cpp',
'src/tableModels/MashStepTableModel.cpp',
'src/tableModels/MashTableModel.cpp',
'src/tableModels/MiscTableModel.cpp',
'src/tableModels/RecipeAdditionFermentableTableModel.cpp',
'src/tableModels/RecipeAdditionHopTableModel.cpp',
'src/tableModels/RecipeAdditionMiscTableModel.cpp',
'src/tableModels/RecipeAdditionYeastTableModel.cpp',
'src/tableModels/RecipeAdjustmentSaltTableModel.cpp',
'src/tableModels/SaltTableModel.cpp',
'src/tableModels/StyleTableModel.cpp',
'src/tableModels/WaterTableModel.cpp',
'src/tableModels/YeastTableModel.cpp',
'src/trees/TreeFilterProxyModel.cpp',
'src/trees/TreeModel.cpp',
'src/trees/TreeNode.cpp',
Expand Down Expand Up @@ -923,23 +923,6 @@ mocHeaders = files([
'src/editors/StyleEditor.h',
'src/editors/WaterEditor.h',
'src/editors/YeastEditor.h',
'src/listModels/BoilListModel.h',
'src/listModels/EquipmentListModel.h',
'src/listModels/FermentableListModel.h',
'src/listModels/FermentationListModel.h',
'src/listModels/HopListModel.h',
'src/listModels/MashListModel.h',
'src/listModels/MashStepListModel.h',
'src/listModels/MiscListModel.h',
'src/listModels/RecipeAdditionFermentableListModel.h',
'src/listModels/RecipeAdditionHopListModel.h',
'src/listModels/RecipeAdditionMiscListModel.h',
'src/listModels/RecipeAdditionYeastListModel.h',
'src/listModels/RecipeAdjustmentSaltListModel.h',
'src/listModels/SaltListModel.h',
'src/listModels/StyleListModel.h',
'src/listModels/WaterListModel.h',
'src/listModels/YeastListModel.h',
'src/model/Boil.h',
'src/model/BoilStep.h',
'src/model/BrewNote.h',
Expand Down Expand Up @@ -978,40 +961,57 @@ mocHeaders = files([
'src/model/Style.h',
'src/model/Water.h',
'src/model/Yeast.h',
'src/sortFilterProxyModels/BoilSortFilterProxyModel.h',
'src/sortFilterProxyModels/EquipmentSortFilterProxyModel.h',
'src/sortFilterProxyModels/FermentableSortFilterProxyModel.h',
'src/sortFilterProxyModels/FermentationSortFilterProxyModel.h',
'src/sortFilterProxyModels/HopSortFilterProxyModel.h',
'src/sortFilterProxyModels/MashSortFilterProxyModel.h',
'src/sortFilterProxyModels/MiscSortFilterProxyModel.h',
'src/sortFilterProxyModels/RecipeAdditionFermentableSortFilterProxyModel.h',
'src/sortFilterProxyModels/RecipeAdditionHopSortFilterProxyModel.h',
'src/sortFilterProxyModels/RecipeAdditionMiscSortFilterProxyModel.h',
'src/sortFilterProxyModels/RecipeAdditionYeastSortFilterProxyModel.h',
'src/sortFilterProxyModels/StyleSortFilterProxyModel.h',
'src/sortFilterProxyModels/WaterSortFilterProxyModel.h',
'src/sortFilterProxyModels/YeastSortFilterProxyModel.h',
'src/tableModels/BoilStepTableModel.h',
'src/tableModels/BoilTableModel.h',
'src/tableModels/BtTableModel.h',
'src/tableModels/EquipmentTableModel.h',
'src/tableModels/FermentableTableModel.h',
'src/tableModels/FermentationStepTableModel.h',
'src/tableModels/FermentationTableModel.h',
'src/tableModels/HopTableModel.h',
'src/tableModels/MashStepTableModel.h',
'src/tableModels/MashTableModel.h',
'src/tableModels/MiscTableModel.h',
'src/tableModels/RecipeAdditionFermentableTableModel.h',
'src/tableModels/RecipeAdditionHopTableModel.h',
'src/tableModels/RecipeAdditionMiscTableModel.h',
'src/tableModels/RecipeAdditionYeastTableModel.h',
'src/tableModels/RecipeAdjustmentSaltTableModel.h',
'src/tableModels/SaltTableModel.h',
'src/tableModels/StyleTableModel.h',
'src/tableModels/WaterTableModel.h',
'src/tableModels/YeastTableModel.h',
'src/qtModels/listModels/BoilListModel.h',
'src/qtModels/listModels/EquipmentListModel.h',
'src/qtModels/listModels/FermentableListModel.h',
'src/qtModels/listModels/FermentationListModel.h',
'src/qtModels/listModels/HopListModel.h',
'src/qtModels/listModels/MashListModel.h',
'src/qtModels/listModels/MashStepListModel.h',
'src/qtModels/listModels/MiscListModel.h',
'src/qtModels/listModels/RecipeAdditionFermentableListModel.h',
'src/qtModels/listModels/RecipeAdditionHopListModel.h',
'src/qtModels/listModels/RecipeAdditionMiscListModel.h',
'src/qtModels/listModels/RecipeAdditionYeastListModel.h',
'src/qtModels/listModels/RecipeAdjustmentSaltListModel.h',
'src/qtModels/listModels/SaltListModel.h',
'src/qtModels/listModels/StyleListModel.h',
'src/qtModels/listModels/WaterListModel.h',
'src/qtModels/listModels/YeastListModel.h',
'src/qtModels/sortFilterProxyModels/BoilSortFilterProxyModel.h',
'src/qtModels/sortFilterProxyModels/EquipmentSortFilterProxyModel.h',
'src/qtModels/sortFilterProxyModels/FermentableSortFilterProxyModel.h',
'src/qtModels/sortFilterProxyModels/FermentationSortFilterProxyModel.h',
'src/qtModels/sortFilterProxyModels/HopSortFilterProxyModel.h',
'src/qtModels/sortFilterProxyModels/MashSortFilterProxyModel.h',
'src/qtModels/sortFilterProxyModels/MiscSortFilterProxyModel.h',
'src/qtModels/sortFilterProxyModels/RecipeAdditionFermentableSortFilterProxyModel.h',
'src/qtModels/sortFilterProxyModels/RecipeAdditionHopSortFilterProxyModel.h',
'src/qtModels/sortFilterProxyModels/RecipeAdditionMiscSortFilterProxyModel.h',
'src/qtModels/sortFilterProxyModels/RecipeAdditionYeastSortFilterProxyModel.h',
'src/qtModels/sortFilterProxyModels/StyleSortFilterProxyModel.h',
'src/qtModels/sortFilterProxyModels/WaterSortFilterProxyModel.h',
'src/qtModels/sortFilterProxyModels/YeastSortFilterProxyModel.h',
'src/qtModels/tableModels/BoilStepTableModel.h',
'src/qtModels/tableModels/BoilTableModel.h',
'src/qtModels/tableModels/BtTableModel.h',
'src/qtModels/tableModels/EquipmentTableModel.h',
'src/qtModels/tableModels/FermentableTableModel.h',
'src/qtModels/tableModels/FermentationStepTableModel.h',
'src/qtModels/tableModels/FermentationTableModel.h',
'src/qtModels/tableModels/HopTableModel.h',
'src/qtModels/tableModels/MashStepTableModel.h',
'src/qtModels/tableModels/MashTableModel.h',
'src/qtModels/tableModels/MiscTableModel.h',
'src/qtModels/tableModels/RecipeAdditionFermentableTableModel.h',
'src/qtModels/tableModels/RecipeAdditionHopTableModel.h',
'src/qtModels/tableModels/RecipeAdditionMiscTableModel.h',
'src/qtModels/tableModels/RecipeAdditionYeastTableModel.h',
'src/qtModels/tableModels/RecipeAdjustmentSaltTableModel.h',
'src/qtModels/tableModels/SaltTableModel.h',
'src/qtModels/tableModels/StyleTableModel.h',
'src/qtModels/tableModels/WaterTableModel.h',
'src/qtModels/tableModels/YeastTableModel.h',
'src/trees/TreeFilterProxyModel.h',
'src/trees/TreeModel.h',
'src/trees/TreeView.h',
Expand Down
9 changes: 7 additions & 2 deletions src/AboutDialog.cpp
100755 → 100644
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
/*╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌
* AboutDialog.cpp is part of Brewtarget, and is copyright the following authors 2009-2022:
* AboutDialog.cpp is part of Brewtarget, and is copyright the following authors 2009-2025:
* • Matt Young <[email protected]>
* • Philip Greggory Lee <[email protected]>
*
Expand Down Expand Up @@ -27,6 +27,11 @@

#include "config.h"

#ifdef BUILDING_WITH_CMAKE
// Explicitly doing this include reduces potential problems with AUTOMOC when compiling with CMake
#include "moc_AboutDialog.cpp"
#endif

AboutDialog::AboutDialog(QWidget * parent) :
QDialog(parent),
label(0) {
Expand Down Expand Up @@ -139,7 +144,7 @@ AboutDialog::AboutDialog(QWidget * parent) :
" <li>2015 Markus Mårtensson &lt;[email protected]&gt;</li>"
" <li>2017 Matt Anderson &lt;[email protected]&gt;</li>" // Commit is "andersonm <[email protected]>", but second name clear from email
" <li>2020-2022 Mattias Måhl &lt;[email protected]&gt;</li>"
" <li>2020-2024 Matt Young &lt;[email protected]&gt;</li>"
" <li>2020-2025 Matt Young &lt;[email protected]&gt;</li>"
" <li>2014-2017 Maxime Lavigne &lt;[email protected]&gt;</li>"
" <li>2018 Medic Momcilo &lt;[email protected]&gt;</li>"
" <li>2016 Mike Evans &lt;[email protected]&gt;</li>"
Expand Down
5 changes: 5 additions & 0 deletions src/AlcoholTool.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -34,6 +34,11 @@
#include "measurement/SystemOfMeasurement.h"
#include "widgets/ToggleSwitch.h"

#ifdef BUILDING_WITH_CMAKE
// Explicitly doing this include reduces potential problems with AUTOMOC when compiling with CMake
#include "moc_AlcoholTool.cpp"
#endif

// Settings we only use in this file under the PersistentSettings::Sections::alcoholTool section
#define AddSettingName(name) namespace { BtStringConst const name{#name}; }
AddSettingName(advancedInputsEnabled)
Expand Down
5 changes: 5 additions & 0 deletions src/AncestorDialog.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -37,6 +37,11 @@
#include "model/NamedEntity.h"
#include "model/Recipe.h"

#ifdef BUILDING_WITH_CMAKE
// Explicitly doing this include reduces potential problems with AUTOMOC when compiling with CMake
#include "moc_AncestorDialog.cpp"
#endif

AncestorDialog::AncestorDialog(QWidget * parent) : QDialog(parent) {

setupUi(this);
Expand Down
5 changes: 5 additions & 0 deletions src/BeerColorWidget.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -26,6 +26,11 @@

#include "config.h"

#ifdef BUILDING_WITH_CMAKE
// Explicitly doing this include reduces potential problems with AUTOMOC when compiling with CMake
#include "moc_BeerColorWidget.cpp"
#endif

// TODO: make the size adjust inside the container.
BeerColorWidget::BeerColorWidget(QWidget* parent) : QWidget(parent) {
//setFixedSize(QSize(90,130));
Expand Down
5 changes: 5 additions & 0 deletions src/BrewDayFormatter.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -30,6 +30,11 @@
#include "model/Style.h"
#include "PersistentSettings.h"

#ifdef BUILDING_WITH_CMAKE
// Explicitly doing this include reduces potential problems with AUTOMOC when compiling with CMake
#include "moc_BrewDayFormatter.cpp"
#endif

BrewDayFormatter::BrewDayFormatter(QObject * parent)
: QObject(parent) {
recObs = nullptr;
Expand Down
5 changes: 5 additions & 0 deletions src/BrewDayScrollWidget.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -41,6 +41,11 @@
#include "PersistentSettings.h"
#include "TimerWidget.h"

#ifdef BUILDING_WITH_CMAKE
// Explicitly doing this include reduces potential problems with AUTOMOC when compiling with CMake
#include "moc_BrewDayScrollWidget.cpp"
#endif

namespace {
QString styleName(Style const * style) {
if (!style) {
Expand Down
5 changes: 5 additions & 0 deletions src/BrewNoteWidget.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -29,6 +29,11 @@
#include "model/BrewNote.h"
#include "PersistentSettings.h"

#ifdef BUILDING_WITH_CMAKE
// Explicitly doing this include reduces potential problems with AUTOMOC when compiling with CMake
#include "moc_BrewNoteWidget.cpp"
#endif

namespace {
double const lowLimitPct = 0.95;
double const highLimitPct = 1.05;
Expand Down
Loading

0 comments on commit c643f74

Please sign in to comment.