diff --git a/activation.cpp b/activation.cpp index 96abd51ced..34bfa4a8ee 100644 --- a/activation.cpp +++ b/activation.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 } diff --git a/clients/aurorae/src/aurorae.cpp b/clients/aurorae/src/aurorae.cpp index 0f3ace6a2a..781c960529 100644 --- a/clients/aurorae/src/aurorae.cpp +++ b/clients/aurorae/src/aurorae.cpp @@ -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; } diff --git a/effects/cube/cube.cpp b/effects/cube/cube.cpp index e86341415c..6f6b3eb285 100644 --- a/effects/cube/cube.cpp +++ b/effects/cube/cube.cpp @@ -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); diff --git a/effects/invert/invert.cpp b/effects/invert/invert.cpp index 81279a0c45..db074d9294 100644 --- a/effects/invert/invert.cpp +++ b/effects/invert/invert.cpp @@ -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; } diff --git a/effects/lookingglass/lookingglass.cpp b/effects/lookingglass/lookingglass.cpp index 48f8d6d4f7..0804404b98 100644 --- a/effects/lookingglass/lookingglass.cpp +++ b/effects/lookingglass/lookingglass.cpp @@ -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; } diff --git a/glxbackend.cpp b/glxbackend.cpp index b611efe4fb..bf6cb4d6b8 100644 --- a/glxbackend.cpp +++ b/glxbackend.cpp @@ -242,7 +242,7 @@ void GlxBackend::init() setIsDirectRendering(bool(glXIsDirect(display(), ctx))); - qDebug() << "Direct rendering:" << isDirectRendering() << endl; + qDebug() << "Direct rendering:" << isDirectRendering(); } bool GlxBackend::initRenderingContext() diff --git a/group.cpp b/group.cpp index f0c9e1533e..b878f3dc5f 100644 --- a/group.cpp +++ b/group.cpp @@ -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 diff --git a/libkwineffects/kwinglutils.cpp b/libkwineffects/kwinglutils.cpp index 23bf1f94f1..0ad4739bf3 100644 --- a/libkwineffects/kwinglutils.cpp +++ b/libkwineffects/kwinglutils.cpp @@ -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; } diff --git a/scene_opengl.cpp b/scene_opengl.cpp index a35dc593b6..f1d13ad996 100644 --- a/scene_opengl.cpp +++ b/scene_opengl.cpp @@ -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: diff --git a/tabbox/tabbox.cpp b/tabbox/tabbox.cpp index 311f54dcfb..d9edb8ba75 100644 --- a/tabbox/tabbox.cpp +++ b/tabbox/tabbox.cpp @@ -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) { diff --git a/xcbutils.cpp b/xcbutils.cpp index 504543fbbd..1d8b034792 100644 --- a/xcbutils.cpp +++ b/xcbutils.cpp @@ -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)