mirror of
https://github.com/subsurface/subsurface.git
synced 2024-11-30 22:20:21 +00:00
Random whitespace cleanup
Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
This commit is contained in:
parent
17b9597f3e
commit
1ce2d42e8d
1 changed files with 21 additions and 16 deletions
|
@ -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();
|
||||
|
||||
|
|
Loading…
Reference in a new issue