mirror of
https://github.com/subsurface/subsurface.git
synced 2025-02-19 22:16:15 +00:00
models: pass header descriptions in CleanerTableModel constructor
For the "CleanerHeaderModel" to work, the deriving class has to set the header descriptions. Failing to do so led to bug #4294. To avoid that in the future force the deriving class to pass the headers in the constructor. Signed-off-by: Berthold Stoeger <bstoeger@mail.tuwien.ac.at>
This commit is contained in:
parent
7106c4d5f0
commit
c0e8ea5188
8 changed files with 19 additions and 29 deletions
|
@ -10,12 +10,11 @@
|
|||
#include "commands/command.h"
|
||||
#endif
|
||||
|
||||
WeightModel::WeightModel(QObject *parent) : CleanerTableModel(parent),
|
||||
WeightModel::WeightModel(QObject *parent) :
|
||||
CleanerTableModel(QStringList { QString(), tr("Type"), tr("Weight") }, parent),
|
||||
d(nullptr),
|
||||
tempRow(-1)
|
||||
{
|
||||
//enum Column {REMOVE, TYPE, WEIGHT};
|
||||
setHeaderDataStrings(QStringList() << tr("") << tr("Type") << tr("Weight"));
|
||||
connect(&diveListNotifier, &DiveListNotifier::weightsystemsReset, this, &WeightModel::weightsystemsReset);
|
||||
connect(&diveListNotifier, &DiveListNotifier::weightAdded, this, &WeightModel::weightAdded);
|
||||
connect(&diveListNotifier, &DiveListNotifier::weightRemoved, this, &WeightModel::weightRemoved);
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue