status-desktop/src-cpp/app/global/singleton.cpp

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