summaryrefslogtreecommitdiffstats
path: root/core/btdiscovery.h
diff options
context:
space:
mode:
authorGravatar Dirk Hohndel <dirk@hohndel.org>2019-09-27 16:26:54 -0700
committerGravatar Dirk Hohndel <dirk@hohndel.org>2019-09-27 16:26:58 -0700
commit9ae7040a91c3e3e0606d7abe085ef6da47efd6d2 (patch)
treede120b115df95fb96d945581aca41cd8c760263c /core/btdiscovery.h
parent400b218f769320221567b7b66f39c33126a7d2e1 (diff)
downloadsubsurface-9ae7040a91c3e3e0606d7abe085ef6da47efd6d2.tar.gz
Revert the singleton PR
It turns out that this isn't working the way it was intended to. Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
Diffstat (limited to 'core/btdiscovery.h')
-rw-r--r--core/btdiscovery.h5
1 files changed, 3 insertions, 2 deletions
diff --git a/core/btdiscovery.h b/core/btdiscovery.h
index a7d68decd..d6c25d8b0 100644
--- a/core/btdiscovery.h
+++ b/core/btdiscovery.h
@@ -10,7 +10,6 @@
#include <QBluetoothDeviceDiscoveryAgent>
#include <QBluetoothUuid>
#include "core/libdivecomputer.h"
-#include "core/singleton.h"
#if defined(Q_OS_ANDROID)
#include <QAndroidJniObject>
@@ -24,12 +23,13 @@ QString extractBluetoothAddress(const QString &address);
QString extractBluetoothNameAddress(const QString &address, QString &name);
QBluetoothDeviceInfo getBtDeviceInfo(const QString &devaddr);
-class BTDiscovery : public QObject, public SillySingleton<BTDiscovery> {
+class BTDiscovery : public QObject {
Q_OBJECT
public:
BTDiscovery(QObject *parent = NULL);
~BTDiscovery();
+ static BTDiscovery *instance();
struct btPairedDevice {
QString address;
@@ -57,6 +57,7 @@ public:
void discoverAddress(QString address);
private:
+ static BTDiscovery *m_instance;
bool m_btValid;
bool m_showNonDiveComputers;