summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorGravatar Stefan Fuchs <sfuchs@gmx.de>2017-12-03 09:14:43 +0100
committerGravatar Dirk Hohndel <dirk@hohndel.org>2017-12-13 05:48:20 -0800
commita11622623a43369368206e1e3b6a6b3173ad43fb (patch)
tree9dcbd5f28180167d8407e96e245294b241093c8a
parent3479c9e19778a39f02a55a8681933227d9c6a37d (diff)
downloadsubsurface-a11622623a43369368206e1e3b6a6b3173ad43fb.tar.gz
Remove unused divesitepicturemodel from qt-models
Signed-off-by: Stefan Fuchs <sfuchs@gmx.de>
-rw-r--r--packaging/ios/Subsurface-mobile/Subsurface-mobile.pro2
-rw-r--r--qt-models/CMakeLists.txt1
-rw-r--r--qt-models/divesitepicturesmodel.cpp36
-rw-r--r--qt-models/divesitepicturesmodel.h16
4 files changed, 0 insertions, 55 deletions
diff --git a/packaging/ios/Subsurface-mobile/Subsurface-mobile.pro b/packaging/ios/Subsurface-mobile/Subsurface-mobile.pro
index 90f4c936d..9f1cac9dc 100644
--- a/packaging/ios/Subsurface-mobile/Subsurface-mobile.pro
+++ b/packaging/ios/Subsurface-mobile/Subsurface-mobile.pro
@@ -91,7 +91,6 @@ SOURCES += ../../../subsurface-mobile-main.cpp \
../../../qt-models/divecomputermodel.cpp \
../../../qt-models/divelocationmodel.cpp \
../../../qt-models/divepicturemodel.cpp \
- ../../../qt-models/divesitepicturesmodel.cpp \
../../../qt-models/divetripmodel.cpp \
../../../qt-models/diveimportedmodel.cpp \
../../../qt-models/filtermodels.cpp \
@@ -210,7 +209,6 @@ HEADERS += \
../../../qt-models/cleanertablemodel.h \
../../../qt-models/divepicturemodel.h \
../../../qt-models/ssrfsortfilterproxymodel.h \
- ../../../qt-models/divesitepicturesmodel.h \
../../../qt-models/completionmodels.h \
../../../qt-models/weigthsysteminfomodel.h \
../../../qt-models/divecomputerextradatamodel.h \
diff --git a/qt-models/CMakeLists.txt b/qt-models/CMakeLists.txt
index 14d23156c..4e2491a23 100644
--- a/qt-models/CMakeLists.txt
+++ b/qt-models/CMakeLists.txt
@@ -18,7 +18,6 @@ set(SUBSURFACE_MODELS_LIB_SRCS
divepicturemodel.cpp
diveplotdatamodel.cpp
divelocationmodel.cpp
- divesitepicturesmodel.cpp
ssrfsortfilterproxymodel.cpp
divelistmodel.cpp
gpslistmodel.cpp
diff --git a/qt-models/divesitepicturesmodel.cpp b/qt-models/divesitepicturesmodel.cpp
deleted file mode 100644
index b83d616c0..000000000
--- a/qt-models/divesitepicturesmodel.cpp
+++ /dev/null
@@ -1,36 +0,0 @@
-// SPDX-License-Identifier: GPL-2.0
-#include "qt-models/divesitepicturesmodel.h"
-#include "core/dive.h"
-#include <stdint.h>
-
-#include <QtConcurrent>
-#include <QPixmap>
-
-DiveSitePicturesModel* DiveSitePicturesModel::instance() {
- static DiveSitePicturesModel *self = new DiveSitePicturesModel();
- return self;
-}
-
-DiveSitePicturesModel::DiveSitePicturesModel() {
-
-}
-
-void DiveSitePicturesModel::updateDivePictures() {
- beginResetModel();
- pictures.clear();
- endResetModel();
-
- const uint32_t ds_uuid = displayed_dive_site.uuid;
- struct dive *d;
- int i;
-
- for_each_dive (i, d)
- if (d->dive_site_uuid == ds_uuid && dive_get_picture_count(d))
- FOR_EACH_PICTURE(d)
- pictures.push_back({picture, picture->filename, QImage(), picture->offset.seconds});
-
- QtConcurrent::blockingMap(pictures, scaleImages);
-
- beginInsertRows(QModelIndex(), 0, pictures.count() - 1);
- endInsertRows();
-}
diff --git a/qt-models/divesitepicturesmodel.h b/qt-models/divesitepicturesmodel.h
deleted file mode 100644
index c27db7726..000000000
--- a/qt-models/divesitepicturesmodel.h
+++ /dev/null
@@ -1,16 +0,0 @@
-// SPDX-License-Identifier: GPL-2.0
-#ifndef DIVESITEPICTURESMODEL_H
-#define DIVESITEPICTURESMODEL_H
-
-#include "divepicturemodel.h"
-
-class DiveSitePicturesModel : public DivePictureModel {
- Q_OBJECT
-public:
- static DiveSitePicturesModel *instance();
- void updateDivePictures();
-private:
- DiveSitePicturesModel();
-};
-
-#endif