Clean debug output

Removes endl in the end of qDebug.
Removes the \n in the end of opengl output.

REVIEW: 124320
remotes/origin/Plasma/5.4
Aleix Pol 11 years ago
parent e56520dc81
commit 6f345f4915
  1. 4
      activation.cpp
  2. 2
      clients/aurorae/src/aurorae.cpp
  3. 6
      effects/cube/cube.cpp
  4. 2
      effects/invert/invert.cpp
  5. 4
      effects/lookingglass/lookingglass.cpp
  6. 2
      glxbackend.cpp
  7. 2
      group.cpp
  8. 14
      libkwineffects/kwinglutils.cpp
  9. 2
      scene_opengl.cpp
  10. 4
      tabbox/tabbox.cpp
  11. 2
      xcbutils.cpp

@ -603,7 +603,7 @@ bool Workspace::allowClientActivation(const KWin::AbstractClient *c, xcb_timesta
// level == 2 // normal
Time user_time = ac->userTime();
qCDebug(KWIN_CORE) << "Activation, compared:" << c << ":" << time << ":" << user_time
<< ":" << (NET::timestampCompare(time, user_time) >= 0) << endl;
<< ":" << (NET::timestampCompare(time, user_time) >= 0);
return NET::timestampCompare(time, user_time) >= 0; // time >= user_time
}
@ -635,7 +635,7 @@ bool Workspace::allowFullClientRaising(const KWin::AbstractClient *c, xcb_timest
return false;
xcb_timestamp_t user_time = ac->userTime();
qCDebug(KWIN_CORE) << "Raising, compared:" << time << ":" << user_time
<< ":" << (NET::timestampCompare(time, user_time) >= 0) << endl;
<< ":" << (NET::timestampCompare(time, user_time) >= 0);
return NET::timestampCompare(time, user_time) >= 0; // time >= user_time
}

@ -172,7 +172,7 @@ QQmlComponent *Helper::loadComponent(const QString &themeName)
}
);
if (offers.isEmpty()) {
qCCritical(AURORAE) << "Couldn't find QML Decoration " << themeName << endl;
qCCritical(AURORAE) << "Couldn't find QML Decoration " << themeName;
// TODO: what to do in error case?
return nullptr;
}

@ -311,13 +311,13 @@ bool CubeEffect::loadShader()
QString cylinderVertexshader = QStandardPaths::locate(QStandardPaths::GenericDataLocation, m_shadersDir + QStringLiteral("cylinder.vert"));
QString sphereVertexshader = QStandardPaths::locate(QStandardPaths::GenericDataLocation, m_shadersDir + QStringLiteral("sphere.vert"));
if (cylinderVertexshader.isEmpty() || sphereVertexshader.isEmpty()) {
qCritical() << "Couldn't locate shader files" << endl;
qCritical() << "Couldn't locate shader files";
return false;
}
cylinderShader = ShaderManager::instance()->loadVertexShader(ShaderManager::GenericShader, cylinderVertexshader);
if (!cylinderShader->isValid()) {
qCritical() << "The cylinder shader failed to load!" << endl;
qCritical() << "The cylinder shader failed to load!";
return false;
} else {
ShaderBinder binder(cylinderShader);
@ -347,7 +347,7 @@ bool CubeEffect::loadShader()
}
sphereShader = ShaderManager::instance()->loadVertexShader(ShaderManager::GenericShader, sphereVertexshader);
if (!sphereShader->isValid()) {
qCritical() << "The sphere shader failed to load!" << endl;
qCritical() << "The sphere shader failed to load!";
return false;
} else {
ShaderBinder binder(sphereShader);

@ -85,7 +85,7 @@ bool InvertEffect::loadData()
m_shader = ShaderManager::instance()->loadFragmentShader(ShaderManager::GenericShader, fragmentshader);
if (!m_shader->isValid()) {
qCritical() << "The shader failed to load!" << endl;
qCritical() << "The shader failed to load!";
return false;
}

@ -90,7 +90,7 @@ void LookingGlassEffect::reconfigure(ReconfigureFlags)
LookingGlassConfig::self()->read();
initialradius = LookingGlassConfig::radius();
radius = initialradius;
qCDebug(KWINEFFECTS) << QStringLiteral("Radius from config: %1").arg(radius) << endl;
qCDebug(KWINEFFECTS) << "Radius from config:" << radius;
m_valid = loadData();
}
@ -125,7 +125,7 @@ bool LookingGlassEffect::loadData()
ShaderBinder binder(m_shader);
m_shader->setUniform("u_textureSize", QVector2D(screenSize.width(), screenSize.height()));
} else {
qCritical() << "The shader failed to load!" << endl;
qCritical() << "The shader failed to load!";
return false;
}

@ -242,7 +242,7 @@ void GlxBackend::init()
setIsDirectRendering(bool(glXIsDirect(display(), ctx)));
qDebug() << "Direct rendering:" << isDirectRendering() << endl;
qDebug() << "Direct rendering:" << isDirectRendering();
}
bool GlxBackend::initRenderingContext()

@ -765,7 +765,7 @@ xcb_window_t Client::verifyTransientFor(xcb_window_t new_transient_for, bool set
if (Client* new_transient_for_client = workspace()->findClient(Predicate::WindowMatch, new_transient_for)) {
if (new_transient_for != before_search) {
qCDebug(KWIN_CORE) << "Client " << this << " has WM_TRANSIENT_FOR poiting to non-toplevel window "
<< before_search << ", child of " << new_transient_for_client << ", adjusting." << endl;
<< before_search << ", child of " << new_transient_for_client << ", adjusting.";
new_property_value = new_transient_for; // also fix the property
}
} else

@ -249,14 +249,14 @@ bool GLShader::loadFromFiles(const QString &vertexFile, const QString &fragmentF
{
QFile vf(vertexFile);
if (!vf.open(QIODevice::ReadOnly)) {
qCritical() << "Couldn't open" << vertexFile << "for reading!" << endl;
qCritical() << "Couldn't open" << vertexFile << "for reading!";
return false;
}
const QByteArray vertexSource = vf.readAll();
QFile ff(fragmentFile);
if (!ff.open(QIODevice::ReadOnly)) {
qCritical() << "Couldn't open" << fragmentFile << "for reading!" << endl;
qCritical() << "Couldn't open" << fragmentFile << "for reading!";
return false;
}
const QByteArray fragmentSource = ff.readAll();
@ -283,7 +283,7 @@ bool GLShader::link()
glGetProgramiv(mProgram, GL_LINK_STATUS, &status);
if (status == 0) {
qCritical() << "Failed to link shader:" << endl << log << endl;
qCritical() << "Failed to link shader:" << endl << log;
mValid = false;
} else if (length > 0) {
qDebug() << "Shader link log:" << log;
@ -342,7 +342,7 @@ bool GLShader::compile(GLuint program, GLenum shaderType, const QByteArray &sour
if (status == 0) {
const char *typeName = (shaderType == GL_VERTEX_SHADER ? "vertex" : "fragment");
qCritical() << "Failed to compile" << typeName << "shader:" << endl << log << endl;
qCritical() << "Failed to compile" << typeName << "shader:" << endl << log;
} else if (length > 0)
qDebug() << "Shader compile log:" << log;
@ -1356,7 +1356,7 @@ GLRenderTarget::GLRenderTarget(const GLTexture& color)
if (sSupported && !mTexture.isNull()) {
initFBO();
} else
qCritical() << "Render targets aren't supported!" << endl;
qCritical() << "Render targets aren't supported!";
}
GLRenderTarget::~GLRenderTarget()
@ -1369,7 +1369,7 @@ GLRenderTarget::~GLRenderTarget()
bool GLRenderTarget::enable()
{
if (!valid()) {
qCritical() << "Can't enable invalid render target!" << endl;
qCritical() << "Can't enable invalid render target!";
return false;
}
@ -1383,7 +1383,7 @@ bool GLRenderTarget::enable()
bool GLRenderTarget::disable()
{
if (!valid()) {
qCritical() << "Can't disable invalid render target!" << endl;
qCritical() << "Can't disable invalid render target!";
return false;
}

@ -484,6 +484,8 @@ void SceneOpenGL::initDebugOutput()
Q_UNUSED(source)
Q_UNUSED(severity)
Q_UNUSED(userParam)
while (message[length] == '\n' || message[length] == '\r')
--length;
switch (type) {
case GL_DEBUG_TYPE_ERROR:

@ -960,7 +960,7 @@ static bool areKeySymXsDepressed(bool bAll, const uint keySyms[], int nKeySyms)
qDebug() << iKeySym << ": keySymX=0x" << QString::number(keySymX, 16)
<< " i=" << i << " mask=0x" << QString::number(mask, 16)
<< " keymap[i]=0x" << QString::number(keymap[i], 16) << endl;
<< " keymap[i]=0x" << QString::number(keymap[i], 16);
// If ALL keys passed need to be depressed,
if (bAll) {
@ -1374,7 +1374,7 @@ void TabBox::keyPress(int keyQt)
}
if (forward || backward) {
qDebug() << "== " << forwardShortcut.toString()
<< " or " << backwardShortcut.toString() << endl;
<< " or " << backwardShortcut.toString();
KDEWalkThroughWindows(forward);
}
} else if (m_desktopGrab) {

@ -474,7 +474,7 @@ void Extensions::init()
<< " fixes: 0x" << QString::number(m_fixes.version, 16)
<< " randr: 0x" << QString::number(m_randr.version, 16)
<< " sync: 0x" << QString::number(m_sync.version, 16)
<< " damage: 0x " << QString::number(m_damage.version, 16) << endl;
<< " damage: 0x " << QString::number(m_damage.version, 16);
}
void Extensions::extensionQueryReply(const xcb_query_extension_reply_t *extension, ExtensionData *dataToFill)

Loading…
Cancel
Save