aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorGravatar Berthold Stoeger <bstoeger@mail.tuwien.ac.at>2017-12-09 22:59:21 +0100
committerGravatar Robert C. Helling <helling@atdotde.de>2017-12-10 15:00:53 +0100
commita07d3b7bfe30f92df8d7e12d364db5aec0a18e46 (patch)
tree3416d350883b6fc104b5edc00e73326a6d4ab9bc
parent2e340d3a61243c0bd42a6ba1639b66bbb340cee6 (diff)
downloadsubsurface-a07d3b7bfe30f92df8d7e12d364db5aec0a18e46.tar.gz
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>
-rw-r--r--qt-models/divepicturemodel.cpp9
-rw-r--r--qt-models/divepicturemodel.h2
2 files changed, 4 insertions, 7 deletions
diff --git a/qt-models/divepicturemodel.cpp b/qt-models/divepicturemodel.cpp
index 9286dc54c..e5b40b748 100644
--- a/qt-models/divepicturemodel.cpp
+++ b/qt-models/divepicturemodel.cpp
@@ -7,8 +7,7 @@
#include <QtConcurrent>
-extern QHash <QString, QImage > thumbnailCache;
-
+extern QHash <QString, QImage> thumbnailCache;
SPixmap scaleImages(picturepointer picture)
{
@@ -28,7 +27,6 @@ SPixmap scaleImages(picturepointer picture)
return ret;
}
-
DivePictureModel *DivePictureModel::instance()
{
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) {
f.waitForFinished();
@@ -108,7 +105,7 @@ QVariant DivePictureModel::data(const QModelIndex &index, int role) const
switch (role) {
case Qt::UserRole:
ret = QVariant::fromValue((int)stringPixmapCache[key].offsetSeconds);
- break;
+ break;
case Qt::DisplayRole:
ret = key;
}
diff --git a/qt-models/divepicturemodel.h b/qt-models/divepicturemodel.h
index b00444548..b0494d355 100644
--- a/qt-models/divepicturemodel.h
+++ b/qt-models/divepicturemodel.h
@@ -26,7 +26,7 @@ public:
virtual QVariant data(const QModelIndex &index, int role = Qt::DisplayRole) const;
virtual int rowCount(const QModelIndex &parent = QModelIndex()) const;
virtual void updateDivePictures();
- void updateDivePicturesWhenDone(QList<QFuture<void> >);
+ void updateDivePicturesWhenDone(QList<QFuture<void>>);
void removePicture(const QString& fileUrl, bool last);
protected: