TVScreen: correct debug messages

pull/154/head
f4exb 2018-03-16 10:11:32 +01:00
rodzic 55cd795eb4
commit 6e5e912c74
1 zmienionych plików z 7 dodań i 7 usunięć

Wyświetl plik

@ -112,19 +112,19 @@ void TVScreen::initializeGL()
{ {
if (QOpenGLContext::currentContext()->isValid()) if (QOpenGLContext::currentContext()->isValid())
{ {
qDebug() << "DATVScreen::initializeGL: context:" qDebug() << "TVScreen::initializeGL: context:"
<< " major: " << (QOpenGLContext::currentContext()->format()).majorVersion() << " major: " << (QOpenGLContext::currentContext()->format()).majorVersion()
<< " minor: " << (QOpenGLContext::currentContext()->format()).minorVersion() << " minor: " << (QOpenGLContext::currentContext()->format()).minorVersion()
<< " ES: " << (QOpenGLContext::currentContext()->isOpenGLES() ? "yes" : "no"); << " ES: " << (QOpenGLContext::currentContext()->isOpenGLES() ? "yes" : "no");
} }
else else
{ {
qDebug() << "DATVScreen::initializeGL: current context is invalid"; qDebug() << "TVScreen::initializeGL: current context is invalid";
} }
} }
else else
{ {
qCritical() << "DATVScreen::initializeGL: no current context"; qCritical() << "TVScreen::initializeGL: no current context";
return; return;
} }
@ -132,21 +132,21 @@ void TVScreen::initializeGL()
if (objSurface == NULL) if (objSurface == NULL)
{ {
qCritical() << "DATVScreen::initializeGL: no surface attached"; qCritical() << "TVScreen::initializeGL: no surface attached";
return; return;
} }
else else
{ {
if (objSurface->surfaceType() != QSurface::OpenGLSurface) if (objSurface->surfaceType() != QSurface::OpenGLSurface)
{ {
qCritical() << "DATVScreen::initializeGL: surface is not an OpenGLSurface: " qCritical() << "TVScreen::initializeGL: surface is not an OpenGLSurface: "
<< objSurface->surfaceType() << objSurface->surfaceType()
<< " cannot use an OpenGL context"; << " cannot use an OpenGL context";
return; return;
} }
else else
{ {
qDebug() << "DATVScreen::initializeGL: OpenGL surface:" qDebug() << "TVScreen::initializeGL: OpenGL surface:"
<< " class: " << (objSurface->surfaceClass() == QSurface::Window ? "Window" : "Offscreen"); << " class: " << (objSurface->surfaceClass() == QSurface::Window ? "Window" : "Offscreen");
} }
} }
@ -198,7 +198,7 @@ void TVScreen::tick()
void TVScreen::connectTimer(const QTimer& objTimer) void TVScreen::connectTimer(const QTimer& objTimer)
{ {
qDebug() << "DATVScreen::connectTimer"; qDebug() << "TVScreen::connectTimer";
disconnect(&m_objTimer, SIGNAL(timeout()), this, SLOT(tick())); disconnect(&m_objTimer, SIGNAL(timeout()), this, SLOT(tick()));
connect(&objTimer, SIGNAL(timeout()), this, SLOT(tick())); connect(&objTimer, SIGNAL(timeout()), this, SLOT(tick()));
m_objTimer.stop(); m_objTimer.stop();