summaryrefslogtreecommitdiffstats
path: root/qt-ui/divepicturewidget.h
diff options
context:
space:
mode:
authorGravatar Dirk Hohndel <dirk@hohndel.org>2014-08-05 12:37:14 -0700
committerGravatar Dirk Hohndel <dirk@hohndel.org>2014-08-05 12:37:14 -0700
commit4583cd8e09944e61aa59baa58e74abee0af0d268 (patch)
tree0714993c8cf822c85b662f020ddd65ca4fc2d665 /qt-ui/divepicturewidget.h
parent3adbff2320b90bbf27b1bedb540ec3d74fb30f9b (diff)
downloadsubsurface-4583cd8e09944e61aa59baa58e74abee0af0d268.tar.gz
Picture handling: cleaning up the mess
We had pointers to data structures on the stack which we frequently reallocated. These data structure contain basically a filename and an offset. We then create a hash of the pointers to those datastructures with the filename being the key. And then we passed those pointers around through a Qt model(!!!) only in order to then later look up by filename what the offset might be. I am at a loss for words for the lunacy behind this design. How about we just remember the offsets and pass the integers around? Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
Diffstat (limited to 'qt-ui/divepicturewidget.h')
-rw-r--r--qt-ui/divepicturewidget.h3
1 files changed, 1 insertions, 2 deletions
diff --git a/qt-ui/divepicturewidget.h b/qt-ui/divepicturewidget.h
index 6f53bee09..aa524e1a6 100644
--- a/qt-ui/divepicturewidget.h
+++ b/qt-ui/divepicturewidget.h
@@ -5,10 +5,9 @@
#include <QListView>
#include <QThread>
-struct picture;
struct PhotoHelper {
QImage image;
- struct picture *picture;
+ int offsetSeconds;
};
class DivePictureModel : public QAbstractTableModel {