diff options
Diffstat (limited to 'qt-ui/divepicturewidget.cpp')
-rw-r--r-- | qt-ui/divepicturewidget.cpp | 9 |
1 files changed, 4 insertions, 5 deletions
diff --git a/qt-ui/divepicturewidget.cpp b/qt-ui/divepicturewidget.cpp index 01e52d6e8..916345346 100644 --- a/qt-ui/divepicturewidget.cpp +++ b/qt-ui/divepicturewidget.cpp @@ -9,7 +9,6 @@ void DivePictureDelegate::paint(QPainter *painter, const QStyleOptionViewItem &o DivePictureModel::DivePictureModel(QObject *parent): QAbstractTableModel(parent) { - } typedef QPair<QString, QPixmap> SPixmap; @@ -53,7 +52,7 @@ void DivePictureModel::updateDivePictures(int divenr) int DivePictureModel::columnCount(const QModelIndex &parent) const { - + return 1; } QVariant DivePictureModel::data(const QModelIndex &index, int role) const @@ -64,9 +63,10 @@ QVariant DivePictureModel::data(const QModelIndex &index, int role) const QString key = stringPixmapCache.keys().at(index.row()); switch(role){ - case Qt::DisplayRole : return key; - case Qt::DecorationRole : return stringPixmapCache[key]; + case Qt::DisplayRole : ret = key; break; + case Qt::DecorationRole : ret = stringPixmapCache[key]; break; } + return ret; } int DivePictureModel::rowCount(const QModelIndex &parent) const @@ -76,5 +76,4 @@ int DivePictureModel::rowCount(const QModelIndex &parent) const DivePictureWidget::DivePictureWidget(QWidget *parent): QListView(parent) { - } |