mirror of
https://github.com/subsurface/subsurface.git
synced 2025-02-19 22:16:15 +00:00
Fixing annoying compiler warning
Adding { } to if clause to avoid dangling warning /Users/guidolerch/src/subsurface/qt-models/cylindermodel.cpp:117: warning: add explicit braces to avoid dangling else [-Wdangling-else] [Dirk Hohndel: combined two of Guido's patches to one that is simpler] Signed-off-by: Guido Lerch <guido.lerch@gmail.com> Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
This commit is contained in:
parent
ac8e05c4ec
commit
f1c682b55a
1 changed files with 4 additions and 2 deletions
|
@ -111,18 +111,20 @@ QVariant CylindersModel::data(const QModelIndex &index, int role) const
|
|||
}
|
||||
break;
|
||||
case Qt::DecorationRole:
|
||||
if (index.column() == REMOVE)
|
||||
if (index.column() == REMOVE) {
|
||||
if (rowCount() > 1)
|
||||
ret = trashIcon();
|
||||
else
|
||||
ret = trashForbiddenIcon();
|
||||
}
|
||||
break;
|
||||
case Qt::SizeHintRole:
|
||||
if (index.column() == REMOVE)
|
||||
if (index.column() == REMOVE) {
|
||||
if (rowCount() > 1)
|
||||
ret = trashIcon();
|
||||
else
|
||||
ret = trashForbiddenIcon();
|
||||
}
|
||||
break;
|
||||
|
||||
case Qt::ToolTipRole:
|
||||
|
|
Loading…
Add table
Reference in a new issue