Corrected spelling of "weight" in the preferences dialog and code

"weight" was spelled as "weigth" in a few places in the code, but
more importantly, it was misspelled in the preferences dialog.
A minor nit-pick, maybe, but it still drew the eye in the dialog
and looked weird.

Signed-off-by: Benjamin Fogel <benjaminfogel@yahoo.co.uk>
Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
This commit is contained in:
Benjamin 2013-08-05 12:23:20 +02:00 committed by Dirk Hohndel
parent db17edda65
commit c68296c5bb
2 changed files with 9 additions and 9 deletions

View file

@ -201,17 +201,17 @@ QWidget* TankInfoDelegate::createEditor(QWidget* parent, const QStyleOptionViewI
return delegate;
}
struct RevertWeigthData {
struct RevertWeightData {
QString type;
int weigth;
} currWeigth;
int weight;
} currWeight;
void WSInfoDelegate::revertModelData(QWidget* widget, QAbstractItemDelegate::EndEditHint hint)
{
if (hint == QAbstractItemDelegate::NoHint || hint == QAbstractItemDelegate::RevertModelCache){
WeightModel *mymodel = qobject_cast<WeightModel *>(currCombo.model);
mymodel->setData(IDX(WeightModel::TYPE), currWeigth.type, Qt::EditRole);
mymodel->passInData(IDX(WeightModel::WEIGHT), currWeigth.weigth);
mymodel->setData(IDX(WeightModel::TYPE), currWeight.type, Qt::EditRole);
mymodel->passInData(IDX(WeightModel::WEIGHT), currWeight.weight);
}
}
@ -238,7 +238,7 @@ void WSInfoDelegate::setModelData(QWidget* editor, QAbstractItemModel* model, co
}
mymodel->setData(IDX(WeightModel::TYPE), v, Qt::EditRole);
mymodel->passInData(IDX(WeightModel::WEIGHT), grams);
qDebug() << "Fixme, every weigth is 0.0 grams. see:" << grams;
qDebug() << "Fixme, every weight is 0.0 grams. see:" << grams;
}
WSInfoDelegate::WSInfoDelegate(QObject* parent): ComboBoxDelegate(WSInfoModel::instance(), parent)
@ -251,8 +251,8 @@ QWidget* WSInfoDelegate::createEditor(QWidget* parent, const QStyleOptionViewIte
QWidget *editor = ComboBoxDelegate::createEditor(parent, option, index);
WeightModel *mymodel = qobject_cast<WeightModel *>(currCombo.model);
weightsystem_t *ws = mymodel->weightSystemAt(index);
currWeigth.type = ws->description;
currWeigth.weigth = ws->weight.grams;
currWeight.type = ws->description;
currWeight.weight = ws->weight.grams;
return editor;
}

View file

@ -374,7 +374,7 @@
<item row="4" column="0">
<widget class="QLabel" name="label_5">
<property name="text">
<string>Weigth</string>
<string>Weight</string>
</property>
</widget>
</item>