aboutsummaryrefslogtreecommitdiffstats
path: root/qt-ui/models.cpp
diff options
context:
space:
mode:
authorGravatar Dirk Hohndel <dirk@hohndel.org>2013-11-12 16:33:01 +0900
committerGravatar Dirk Hohndel <dirk@hohndel.org>2013-11-12 16:33:01 +0900
commit83a7f1f5b46a4cbd33fcd197f2a956f765def871 (patch)
tree69820d87a9eb2a00234575158b08910f36a4c2af /qt-ui/models.cpp
parent662b1061f0e6a83ce25b4a187bf7fa3b2efd59e1 (diff)
downloadsubsurface-83a7f1f5b46a4cbd33fcd197f2a956f765def871.tar.gz
Use existing helper function
And remove spurious extra ';' Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
Diffstat (limited to 'qt-ui/models.cpp')
-rw-r--r--qt-ui/models.cpp6
1 files changed, 3 insertions, 3 deletions
diff --git a/qt-ui/models.cpp b/qt-ui/models.cpp
index 7a80521a2..2a9208389 100644
--- a/qt-ui/models.cpp
+++ b/qt-ui/models.cpp
@@ -175,7 +175,7 @@ cylinder_t* CylindersModel::cylinderAt(const QModelIndex& index)
// so we only implement the two columns we care about
void CylindersModel::passInData(const QModelIndex& index, const QVariant& value)
{
- cylinder_t *cyl = &current->cylinder[index.row()];
+ cylinder_t *cyl = cylinderAt(index);
switch(index.column()) {
case SIZE:
if (cyl->type.size.mliter != value.toInt()) {
@@ -196,7 +196,7 @@ void CylindersModel::passInData(const QModelIndex& index, const QVariant& value)
bool CylindersModel::setData(const QModelIndex& index, const QVariant& value, int role)
{
- cylinder_t *cyl = &current->cylinder[index.row()];
+ cylinder_t *cyl = cylinderAt(index);
switch(index.column()) {
case TYPE:
if (!value.isNull()) {
@@ -1510,7 +1510,7 @@ QVariant ProfilePrintModel::data(const QModelIndex &index, int role) const
switch (role) {
case Qt::DisplayRole: {
struct DiveItem di;
- di.dive = dive;;
+ di.dive = dive;
char buf[80];
const QString unknown = tr("unknown");