mirror of
https://github.com/status-im/status-app.git
synced 2026-09-01 17:41:22 +00:00
24 lines
380 B
C++
24 lines
380 B
C++
#include "singleton.h"
|
|||
|
|
#include <QQmlApplicationEngine>
|
||
|
|
|
||
|
|
namespace Global
|
||
|
|
{
|
||
|
|
Singleton* Singleton::theInstance;
|
||
|
|
|
||
|
|
Singleton* Singleton::instance()
|
||
|
|
{
|
||
|
|
if(theInstance == 0) theInstance = new Singleton();
|
||
|
|
return theInstance;
|
||
|
|
}
|
||
|
|
|
||
|
|
Singleton::Singleton()
|
||
|
|
{
|
||
|
|
m_engine = new QQmlApplicationEngine();
|
||
|
|
}
|
||
|
|
|
||
|
|
QQmlApplicationEngine* Singleton::engine()
|
||
|
|
{
|
||
|
|
return m_engine;
|
||
|
|
}
|
||
|
|
} // namespace Global
|