diff options
author | Dirk Hohndel <dirk@hohndel.org> | 2014-01-17 06:30:47 +0700 |
---|---|---|
committer | Dirk Hohndel <dirk@hohndel.org> | 2014-01-17 06:39:24 +0700 |
commit | 09d08ddc1c13850557af28e8349bddd13ef5deec (patch) | |
tree | 3db5560d2f2efb36d1b291ad0a92f9018ea5aac1 /qt-ui/profile/diveeventitem.cpp | |
parent | 2e4dcba009337dfafe6afbf97a11c6470834dabd (diff) | |
download | subsurface-09d08ddc1c13850557af28e8349bddd13ef5deec.tar.gz |
Fix compile time warnings
Plus some small whitespace fixes.
Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
Diffstat (limited to 'qt-ui/profile/diveeventitem.cpp')
-rw-r--r-- | qt-ui/profile/diveeventitem.cpp | 12 |
1 files changed, 6 insertions, 6 deletions
diff --git a/qt-ui/profile/diveeventitem.cpp b/qt-ui/profile/diveeventitem.cpp index 8709a1484..7b748fedd 100644 --- a/qt-ui/profile/diveeventitem.cpp +++ b/qt-ui/profile/diveeventitem.cpp @@ -5,7 +5,7 @@ #include <QDebug> DiveEventItem::DiveEventItem(QObject* parent): DivePixmapItem(parent), - vAxis(NULL), hAxis(NULL), internalEvent(NULL), dataModel(NULL) + vAxis(NULL), hAxis(NULL), dataModel(NULL), internalEvent(NULL) { setFlag(ItemIgnoresTransformations); } @@ -40,11 +40,11 @@ void DiveEventItem::setEvent(struct event* ev) void DiveEventItem::setupPixmap() { #define EVENT_PIXMAP( PIX ) QPixmap(QString(PIX)).scaled(20, 20, Qt::KeepAspectRatio, Qt::SmoothTransformation) - if(!internalEvent->name){ + if (!internalEvent->name) { setPixmap(EVENT_PIXMAP(":warning")); } else if ((strcmp(internalEvent->name, "bookmark") == 0)) { setPixmap(EVENT_PIXMAP(":flag")); - } else if(strcmp(internalEvent->name, "heading") == 0){ + } else if(strcmp(internalEvent->name, "heading") == 0) { setPixmap(EVENT_PIXMAP(":flag")); } else { setPixmap(EVENT_PIXMAP(":warning")); @@ -104,15 +104,15 @@ void DiveEventItem::eventVisibilityChanged(const QString& eventName, bool visibl void DiveEventItem::recalculatePos() { - if (!vAxis || !hAxis || !internalEvent || !dataModel){ + if (!vAxis || !hAxis || !internalEvent || !dataModel) { return; } QModelIndexList result = dataModel->match(dataModel->index(0,DivePlotDataModel::TIME), Qt::DisplayRole, internalEvent->time.seconds ); - if(result.isEmpty()){ + if (result.isEmpty()) { hide(); return; } - if(!isVisible()){ + if (!isVisible()) { show(); } int depth = dataModel->data(dataModel->index(result.first().row(), DivePlotDataModel::DEPTH)).toInt(); |