mirror of
https://github.com/subsurface/subsurface.git
synced 2025-02-19 22:16:15 +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);
|
struct dive *d = get_dive(index.row() + firstIndex);
|
||||||
if (role == Qt::DisplayRole) {
|
if (role == Qt::DisplayRole) {
|
||||||
switch (index.column()) {
|
switch (index.column()) {
|
||||||
case 0 : return QVariant(get_short_dive_date_string(d->when));
|
case 0:
|
||||||
case 1 : return QVariant(get_dive_duration_string(d->duration.seconds, tr("h:"), tr("min")));
|
return QVariant(get_short_dive_date_string(d->when));
|
||||||
case 2 : return QVariant(get_depth_string(d->maxdepth.mm, true, false));
|
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) {
|
if (role == Qt::CheckStateRole) {
|
||||||
|
@ -561,7 +564,8 @@ bool DiveImportedModel::setData(const QModelIndex &index, const QVariant &value,
|
||||||
return true;
|
return true;
|
||||||
}
|
}
|
||||||
|
|
||||||
Qt::ItemFlags DiveImportedModel::flags(const QModelIndex &index) const {
|
Qt::ItemFlags DiveImportedModel::flags(const QModelIndex &index) const
|
||||||
|
{
|
||||||
if (index.column() != 0)
|
if (index.column() != 0)
|
||||||
return QAbstractTableModel::flags(index);
|
return QAbstractTableModel::flags(index);
|
||||||
return QAbstractTableModel::flags(index) | Qt::ItemIsUserCheckable;
|
return QAbstractTableModel::flags(index) | Qt::ItemIsUserCheckable;
|
||||||
|
@ -580,7 +584,8 @@ void DiveImportedModel::setImportedDivesIndexes(int first, int last)
|
||||||
endInsertRows();
|
endInsertRows();
|
||||||
}
|
}
|
||||||
|
|
||||||
void DiveImportedModel::removeUnused() {
|
void DiveImportedModel::removeUnused()
|
||||||
|
{
|
||||||
beginRemoveRows(QModelIndex(), 0, rowCount() - 1);
|
beginRemoveRows(QModelIndex(), 0, rowCount() - 1);
|
||||||
endRemoveRows();
|
endRemoveRows();
|
||||||
|
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue