summaryrefslogtreecommitdiffstats
path: root/qt-models/cylindermodel.cpp
diff options
context:
space:
mode:
authorGravatar Guido Lerch <guido.lerch@gmail.com>2015-10-22 00:17:05 +0200
committerGravatar Dirk Hohndel <dirk@hohndel.org>2015-10-22 19:37:50 +0900
commitf1c682b55a52c11d7cb57da0fc66d6edb118ba77 (patch)
tree822f9855af691a0a34ff0175f259b803288c1aa5 /qt-models/cylindermodel.cpp
parentac8e05c4ec65b00045c058d4103d8889936e44af (diff)
downloadsubsurface-f1c682b55a52c11d7cb57da0fc66d6edb118ba77.tar.gz
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>
Diffstat (limited to 'qt-models/cylindermodel.cpp')
-rw-r--r--qt-models/cylindermodel.cpp6
1 files changed, 4 insertions, 2 deletions
diff --git a/qt-models/cylindermodel.cpp b/qt-models/cylindermodel.cpp
index 8c9bee8b1..8341d3608 100644
--- a/qt-models/cylindermodel.cpp
+++ b/qt-models/cylindermodel.cpp
@@ -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: