Whitespace fixes in qt-models/divepicturemodel.cpp

Note that constructs like QList<QFuture<void>> is incompatible with
pre-C++11 compilers. But the code base is so full of C++11isms that
we may just as well remove asymmetric eye-sores of the kind
"QList<QFuture<void> >".

Signed-off-by: Berthold Stoeger <bstoeger@mail.tuwien.ac.at>
This commit is contained in:
Berthold Stoeger 2017-12-09 22:59:21 +01:00 committed by Robert C. Helling
parent 2e340d3a61
commit a07d3b7bfe
2 changed files with 4 additions and 7 deletions

View file

@ -7,8 +7,7 @@
#include <QtConcurrent> #include <QtConcurrent>
extern QHash <QString, QImage > thumbnailCache; extern QHash <QString, QImage> thumbnailCache;
SPixmap scaleImages(picturepointer picture) SPixmap scaleImages(picturepointer picture)
{ {
@ -28,7 +27,6 @@ SPixmap scaleImages(picturepointer picture)
return ret; return ret;
} }
DivePictureModel *DivePictureModel::instance() DivePictureModel *DivePictureModel::instance()
{ {
static DivePictureModel *self = new DivePictureModel(); static DivePictureModel *self = new DivePictureModel();
@ -39,8 +37,7 @@ DivePictureModel::DivePictureModel() : numberOfPictures(0)
{ {
} }
void DivePictureModel::updateDivePicturesWhenDone(QList<QFuture<void>> futures)
void DivePictureModel::updateDivePicturesWhenDone(QList<QFuture<void> > futures)
{ {
Q_FOREACH (QFuture<void> f, futures) { Q_FOREACH (QFuture<void> f, futures) {
f.waitForFinished(); f.waitForFinished();
@ -108,7 +105,7 @@ QVariant DivePictureModel::data(const QModelIndex &index, int role) const
switch (role) { switch (role) {
case Qt::UserRole: case Qt::UserRole:
ret = QVariant::fromValue((int)stringPixmapCache[key].offsetSeconds); ret = QVariant::fromValue((int)stringPixmapCache[key].offsetSeconds);
break; break;
case Qt::DisplayRole: case Qt::DisplayRole:
ret = key; ret = key;
} }

View file

@ -26,7 +26,7 @@ public:
virtual QVariant data(const QModelIndex &index, int role = Qt::DisplayRole) const; virtual QVariant data(const QModelIndex &index, int role = Qt::DisplayRole) const;
virtual int rowCount(const QModelIndex &parent = QModelIndex()) const; virtual int rowCount(const QModelIndex &parent = QModelIndex()) const;
virtual void updateDivePictures(); virtual void updateDivePictures();
void updateDivePicturesWhenDone(QList<QFuture<void> >); void updateDivePicturesWhenDone(QList<QFuture<void>>);
void removePicture(const QString& fileUrl, bool last); void removePicture(const QString& fileUrl, bool last);
protected: protected: