From 2f42e11ac6bcb2846626b04b440dfaf00028d9ab Mon Sep 17 00:00:00 2001 From: Christian Stenger Date: Tue, 12 Nov 2019 13:28:42 +0100 Subject: [PATCH] Fix compile before current Qt dev Amends 0120e462b268957171d8542b72b0ffb4a8777f7b. Change-Id: If9f443c03009bf8728497f10c8fb81f37fa1a63d Reviewed-by: hjk --- src/libs/glsl/glslastdump.cpp | 3 ++- src/libs/utils/persistentsettings.cpp | 4 +++- src/plugins/coreplugin/find/findplugin.cpp | 6 ++++-- src/plugins/git/gerrit/authenticationdialog.cpp | 6 ++++-- src/tools/buildoutputparser/outputprocessor.cpp | 4 +++- src/tools/valgrindfake/outputgenerator.cpp | 3 ++- 6 files changed, 18 insertions(+), 8 deletions(-) diff --git a/src/libs/glsl/glslastdump.cpp b/src/libs/glsl/glslastdump.cpp index 3cf913c5623..521249227d0 100644 --- a/src/libs/glsl/glslastdump.cpp +++ b/src/libs/glsl/glslastdump.cpp @@ -33,6 +33,7 @@ #endif using namespace GLSL; +using namespace Qt; ASTDump::ASTDump(QTextStream &out) : out(out), _depth(0) @@ -52,7 +53,7 @@ bool ASTDump::preVisit(AST *ast) char *cppId = abi::__cxa_demangle(id, nullptr, nullptr, nullptr); id = cppId; #endif - out << QByteArray(_depth, ' ') << id << Qt::endl; + out << QByteArray(_depth, ' ') << id << endl; #ifdef Q_CC_GNU free(cppId); #endif diff --git a/src/libs/utils/persistentsettings.cpp b/src/libs/utils/persistentsettings.cpp index 8fdca331c67..75235c8c275 100644 --- a/src/libs/utils/persistentsettings.cpp +++ b/src/libs/utils/persistentsettings.cpp @@ -42,11 +42,13 @@ #include +using namespace Qt; + // Read and write rectangle in X11 resource syntax "12x12+4+3" static QString rectangleToString(const QRect &r) { QString result; - QTextStream(&result) << r.width() << 'x' << r.height() << Qt::forcesign << r.x() << r.y(); + QTextStream(&result) << r.width() << 'x' << r.height() << forcesign << r.x() << r.y(); return result; } diff --git a/src/plugins/coreplugin/find/findplugin.cpp b/src/plugins/coreplugin/find/findplugin.cpp index d8f0edef86c..47dca138088 100644 --- a/src/plugins/coreplugin/find/findplugin.cpp +++ b/src/plugins/coreplugin/find/findplugin.cpp @@ -65,6 +65,8 @@ Q_DECLARE_METATYPE(Core::IFindFilter*) +using namespace Qt; + namespace { const int MAX_COMPLETIONS = 50; } @@ -82,8 +84,8 @@ QDebug operator<<(QDebug d, const CompletionEntry &e) QDebugStateSaver saver(d); d.noquote(); d.nospace(); - d << "CompletionEntry(\"" << e.text << "\", flags=" << Qt::hex - << Qt::showbase << int(e.findFlags) << Qt::dec << Qt::noshowbase << ')'; + d << "CompletionEntry(\"" << e.text << "\", flags=" << hex + << showbase << int(e.findFlags) << dec << noshowbase << ')'; return d; } diff --git a/src/plugins/git/gerrit/authenticationdialog.cpp b/src/plugins/git/gerrit/authenticationdialog.cpp index 3104676daf8..bb9d267ca7d 100644 --- a/src/plugins/git/gerrit/authenticationdialog.cpp +++ b/src/plugins/git/gerrit/authenticationdialog.cpp @@ -39,6 +39,8 @@ #include #include +using namespace Qt; + namespace Gerrit { namespace Internal { @@ -150,10 +152,10 @@ bool AuthenticationDialog::setupCredentials() replaceEntry(line, "login", user); replaceEntry(line, "password", password); } - out << line << Qt::endl; + out << line << endl; } if (!found) - out << "machine " << m_server->host << " login " << user << " password " << password << Qt::endl; + out << "machine " << m_server->host << " login " << user << " password " << password << endl; Utils::FileSaver saver(m_netrcFileName, QFile::WriteOnly | QFile::Truncate | QFile::Text); saver.write(netrcContents.toUtf8()); return saver.finalize(); diff --git a/src/tools/buildoutputparser/outputprocessor.cpp b/src/tools/buildoutputparser/outputprocessor.cpp index 0f5b54a13de..e5abaa0baf0 100644 --- a/src/tools/buildoutputparser/outputprocessor.cpp +++ b/src/tools/buildoutputparser/outputprocessor.cpp @@ -40,6 +40,8 @@ #include +using namespace Qt; + CompilerOutputProcessor::CompilerOutputProcessor(CompilerType compilerType, QIODevice &source) : m_compilerType(compilerType) , m_source(source) @@ -86,5 +88,5 @@ void CompilerOutputProcessor::handleTask(const ProjectExplorer::Task &task) *m_ostream << ':' << task.line; *m_ostream << ": "; } - *m_ostream << task.description << Qt::endl; + *m_ostream << task.description << endl; } diff --git a/src/tools/valgrindfake/outputgenerator.cpp b/src/tools/valgrindfake/outputgenerator.cpp index bec3570c95d..d8e544da4ca 100644 --- a/src/tools/valgrindfake/outputgenerator.cpp +++ b/src/tools/valgrindfake/outputgenerator.cpp @@ -49,6 +49,7 @@ void doSleep(int msec) } #endif +using namespace Qt; using namespace Valgrind::Fake; OutputGenerator::OutputGenerator(QAbstractSocket *output, QIODevice *input) : @@ -115,7 +116,7 @@ void OutputGenerator::produceRuntimeError() blockingWrite(m_output, "<flush(); } else if (m_wait) { - qDebug() << "waiting in fake valgrind for " << m_wait << " seconds..." << Qt::endl; + qDebug() << "waiting in fake valgrind for " << m_wait << " seconds..." << endl; doSleep(1000 * m_wait); } }