mirror of
https://github.com/subsurface/subsurface.git
synced 2025-02-19 22:16:15 +00:00
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>
This commit is contained in:
parent
400b218f76
commit
9ae7040a91
15 changed files with 118 additions and 89 deletions
|
@ -8,13 +8,30 @@
|
|||
|
||||
|
||||
/*** Global and constructors ***/
|
||||
QMLPrefs *QMLPrefs::m_instance = NULL;
|
||||
|
||||
QMLPrefs::QMLPrefs() :
|
||||
m_credentialStatus(qPrefCloudStorage::CS_UNKNOWN),
|
||||
m_oldStatus(qPrefCloudStorage::CS_UNKNOWN),
|
||||
m_showPin(false)
|
||||
{
|
||||
// This strange construct is needed because QMLEngine calls new and that
|
||||
// cannot be overwritten
|
||||
if (!m_instance)
|
||||
m_instance = this;
|
||||
}
|
||||
|
||||
QMLPrefs::~QMLPrefs()
|
||||
{
|
||||
m_instance = NULL;
|
||||
}
|
||||
|
||||
QMLPrefs *QMLPrefs::instance()
|
||||
{
|
||||
return m_instance;
|
||||
}
|
||||
|
||||
|
||||
/*** public functions ***/
|
||||
const QString QMLPrefs::cloudPassword() const
|
||||
{
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue