Browse Source

fix(framework): qDebug can't be used in exceptionmanager that is instenciate by singleton.

master
Ulrich Van Den Hekke 5 years ago
parent
commit
a539ffce5a
  1. 8
      framework/core/xinxsingleton.h

8
framework/core/xinxsingleton.h

@ -44,15 +44,11 @@ public:
{
if (_self == NULL)
{
qDebug() << "Lock singleton of type " << typeid(T).name();
QMutexLocker locker(&_self_mutex);
if (_self == NULL)
{
qDebug() << "Pre-create singleton of type " << typeid(T).name();
_self = new T;
qDebug() << "Post-create singleton of type " << typeid(T).name();
_self->initialisation();
qDebug() << "Post-init singleton of type " << typeid(T).name();
}
}
@ -95,15 +91,11 @@ public:
{
if (_self == NULL)
{
qDebug() << "Lock singleton of type " << typeid(T).name();
QMutexLocker locker(&_self_mutex);
if (_self == NULL)
{
qDebug() << "Pre-create singleton of type " << typeid(T).name();
_self = new T;
qDebug() << "Post-create singleton of type " << typeid(T).name();
_self->initialisation();
qDebug() << "Post-init singleton of type " << typeid(T).name();
}
}

Loading…
Cancel
Save