Random whitespace cleanup

Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
This commit is contained in:
Dirk Hohndel 2015-01-08 10:02:28 -08:00
parent 17b9597f3e
commit 1ce2d42e8d

View file

@ -533,9 +533,12 @@ QVariant DiveImportedModel::data(const QModelIndex& index, int role) const
struct dive *d = get_dive(index.row() + firstIndex);
if (role == Qt::DisplayRole) {
switch (index.column()) {
case 0 : return QVariant(get_short_dive_date_string(d->when));
case 1 : return QVariant(get_dive_duration_string(d->duration.seconds, tr("h:"), tr("min")));
case 2 : return QVariant(get_depth_string(d->maxdepth.mm, true, false));
case 0:
return QVariant(get_short_dive_date_string(d->when));
case 1:
return QVariant(get_dive_duration_string(d->duration.seconds, tr("h:"), tr("min")));
case 2:
return QVariant(get_depth_string(d->maxdepth.mm, true, false));
}
}
if (role == Qt::CheckStateRole) {
@ -561,7 +564,8 @@ bool DiveImportedModel::setData(const QModelIndex &index, const QVariant &value,
return true;
}
Qt::ItemFlags DiveImportedModel::flags(const QModelIndex &index) const {
Qt::ItemFlags DiveImportedModel::flags(const QModelIndex &index) const
{
if (index.column() != 0)
return QAbstractTableModel::flags(index);
return QAbstractTableModel::flags(index) | Qt::ItemIsUserCheckable;
@ -580,7 +584,8 @@ void DiveImportedModel::setImportedDivesIndexes(int first, int last)
endInsertRows();
}
void DiveImportedModel::removeUnused() {
void DiveImportedModel::removeUnused()
{
beginRemoveRows(QModelIndex(), 0, rowCount() - 1);
endRemoveRows();