diff options
author | Dirk Hohndel <dirk@hohndel.org> | 2015-07-31 11:01:16 -0700 |
---|---|---|
committer | Dirk Hohndel <dirk@hohndel.org> | 2015-07-31 11:01:57 -0700 |
commit | 3efafd1fde504a1e3ccd104fe53941a511ae3e09 (patch) | |
tree | 105992f812a81fd0a23fa46bcfb336279fec4ee2 /qt-ui | |
parent | 21d8d26da160e7480d663d518e1b9d6b1fee2394 (diff) | |
download | subsurface-3efafd1fde504a1e3ccd104fe53941a511ae3e09.tar.gz |
Enable building with NO_MARBLE again
This was broken in commit 7efa92406794 ("Transform GlobeGPS in a static
instance() class").
Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
Diffstat (limited to 'qt-ui')
-rw-r--r-- | qt-ui/globe.cpp | 6 | ||||
-rw-r--r-- | qt-ui/globe.h | 3 |
2 files changed, 8 insertions, 1 deletions
diff --git a/qt-ui/globe.cpp b/qt-ui/globe.cpp index 4f40e22ec..aceeed9ab 100644 --- a/qt-ui/globe.cpp +++ b/qt-ui/globe.cpp @@ -390,6 +390,12 @@ void GlobeGPS::centerOnIndex(const QModelIndex& idx) } #else +GlobeGPS *GlobeGPS::instance() +{ + static GlobeGPS *self = new GlobeGPS(); + return self; +} + GlobeGPS::GlobeGPS(QWidget *parent) { setText("MARBLE DISABLED AT BUILD TIME"); diff --git a/qt-ui/globe.h b/qt-ui/globe.h index a8cb89440..8cc1265e4 100644 --- a/qt-ui/globe.h +++ b/qt-ui/globe.h @@ -63,7 +63,8 @@ slots: class GlobeGPS : public QLabel { Q_OBJECT public: - GlobeGPS(QWidget *parent); + GlobeGPS(QWidget *parent = 0); + static GlobeGPS *instance(); void reload(); void repopulateLabels(); void centerOnDiveSite(uint32_t uuid); |