Q_GLOBAL_STATIC is unnecessary on basic data types.
This commit is contained in:
parent
d71d3090d2
commit
1a2b227dff
1 changed files with 5 additions and 5 deletions
|
@ -34,7 +34,7 @@
|
|||
#include "backends/devicelink.h"
|
||||
#include "backends/linkprovider.h"
|
||||
|
||||
Q_GLOBAL_STATIC(Daemon*, s_instance)
|
||||
static Daemon* s_instance = nullptr;
|
||||
|
||||
struct DaemonPrivate
|
||||
{
|
||||
|
@ -49,16 +49,16 @@ struct DaemonPrivate
|
|||
|
||||
Daemon* Daemon::instance()
|
||||
{
|
||||
Q_ASSERT(s_instance.exists());
|
||||
return *s_instance;
|
||||
Q_ASSERT(s_instance != nullptr);
|
||||
return s_instance;
|
||||
}
|
||||
|
||||
Daemon::Daemon(QObject *parent, bool testMode)
|
||||
: QObject(parent)
|
||||
, d(new DaemonPrivate)
|
||||
{
|
||||
Q_ASSERT(!s_instance.exists());
|
||||
*s_instance = this;
|
||||
Q_ASSERT(!s_instance);
|
||||
s_instance = this;
|
||||
qCDebug(KDECONNECT_CORE) << "KdeConnect daemon starting";
|
||||
|
||||
//Load backends
|
||||
|
|
Loading…
Reference in a new issue