summaryrefslogtreecommitdiffstats
path: root/core/subsurface-qt/DiveObjectHelper.h
diff options
context:
space:
mode:
Diffstat (limited to 'core/subsurface-qt/DiveObjectHelper.h')
-rw-r--r--core/subsurface-qt/DiveObjectHelper.h7
1 files changed, 4 insertions, 3 deletions
diff --git a/core/subsurface-qt/DiveObjectHelper.h b/core/subsurface-qt/DiveObjectHelper.h
index 397bc4d36..7071c1580 100644
--- a/core/subsurface-qt/DiveObjectHelper.h
+++ b/core/subsurface-qt/DiveObjectHelper.h
@@ -9,8 +9,8 @@
#include <QVector>
#include <QVariant>
-class DiveObjectHelper : public QObject {
- Q_OBJECT
+class DiveObjectHelper {
+ Q_GADGET
Q_PROPERTY(int number READ number CONSTANT)
Q_PROPERTY(int id READ id CONSTANT)
Q_PROPERTY(int rating READ rating CONSTANT)
@@ -48,6 +48,7 @@ class DiveObjectHelper : public QObject {
Q_PROPERTY(QStringList endPressure READ endPressure CONSTANT)
Q_PROPERTY(QStringList firstGas READ firstGas CONSTANT)
public:
+ DiveObjectHelper(); // This is only to be used by Qt's metatype system!
DiveObjectHelper(struct dive *dive);
int number() const;
int id() const;
@@ -92,6 +93,6 @@ public:
private:
struct dive *m_dive;
};
- Q_DECLARE_METATYPE(DiveObjectHelper *)
+ Q_DECLARE_METATYPE(DiveObjectHelper)
#endif