diff options
author | Simon Hausmann <simon.hausmann@qt.io> | 2019-10-04 09:35:32 +0200 |
---|---|---|
committer | Simon Hausmann <simon.hausmann@qt.io> | 2019-10-04 09:35:45 +0200 |
commit | 554a0d642056f06ad1b5da8d56460e2a70811763 (patch) | |
tree | 760d76663093f9f1eceb4f7a76b04cfd4e308095 /tools | |
parent | d6ac9211695791d3b104ceb71a550bb229fe5f9d (diff) | |
parent | b5daa31da99fbe872b4df047f37da17ae2c119c9 (diff) |
Merge remote-tracking branch 'origin/wip/qt6' into dev
Conflicts:
.qmake.conf
Change-Id: I1a52012a6e2c438a795222d687c33df6189962d2
Diffstat (limited to 'tools')
-rw-r--r-- | tools/qscxmlc/qscxmlc.cpp | 12 | ||||
-rw-r--r-- | tools/qscxmlc/scxmlcppdumper.cpp | 46 |
2 files changed, 29 insertions, 29 deletions
diff --git a/tools/qscxmlc/qscxmlc.cpp b/tools/qscxmlc/qscxmlc.cpp index ce45ed0..d83e786 100644 --- a/tools/qscxmlc/qscxmlc.cpp +++ b/tools/qscxmlc/qscxmlc.cpp @@ -57,13 +57,13 @@ int write(TranslationUnit *tu) QFile outH(tu->outHFileName); if (!outH.open(QFile::WriteOnly)) { - errs << QStringLiteral("Error: cannot open '%1': %2").arg(outH.fileName(), outH.errorString()) << endl; + errs << QStringLiteral("Error: cannot open '%1': %2").arg(outH.fileName(), outH.errorString()) << Qt::endl; return CannotOpenOutputHeaderFileError; } QFile outCpp(tu->outCppFileName); if (!outCpp.open(QFile::WriteOnly)) { - errs << QStringLiteral("Error: cannot open '%1': %2").arg(outCpp.fileName(), outCpp.errorString()) << endl; + errs << QStringLiteral("Error: cannot open '%1': %2").arg(outCpp.fileName(), outCpp.errorString()) << Qt::endl; return CannotOpenOutputCppFileError; } @@ -139,13 +139,13 @@ int run(const QStringList &arguments) const QStringList inputFiles = cmdParser.positionalArguments(); if (inputFiles.count() < 1) { - errs << QCoreApplication::translate("main", "Error: no input file.") << endl; + errs << QCoreApplication::translate("main", "Error: no input file.") << Qt::endl; cmdParser.showHelp(NoInputFilesError); } if (inputFiles.count() > 1) { errs << QCoreApplication::translate("main", "Error: unexpected argument(s): %1") - .arg(inputFiles.mid(1).join(QLatin1Char(' '))) << endl; + .arg(inputFiles.mid(1).join(QLatin1Char(' '))) << Qt::endl; cmdParser.showHelp(NoInputFilesError); } @@ -180,7 +180,7 @@ int run(const QStringList &arguments) if (!compiler.errors().isEmpty()) { const auto errors = compiler.errors(); for (const QScxmlError &error : errors) { - errs << error.toString() << endl; + errs << error.toString() << Qt::endl; } return ParseError; } @@ -190,7 +190,7 @@ int run(const QStringList &arguments) Q_ASSERT(!compiler.errors().isEmpty()); const auto errors = compiler.errors(); for (const QScxmlError &error : errors) { - errs << error.toString() << endl; + errs << error.toString() << Qt::endl; } return ScxmlVerificationError; } diff --git a/tools/qscxmlc/scxmlcppdumper.cpp b/tools/qscxmlc/scxmlcppdumper.cpp index 4f62039..1aca09e 100644 --- a/tools/qscxmlc/scxmlcppdumper.cpp +++ b/tools/qscxmlc/scxmlcppdumper.cpp @@ -482,19 +482,19 @@ void CppDumper::writeHeaderStart(const QString &headerGuard, const QStringList & h << doNotEditComment.arg(m_translationUnit->scxmlFileName, QString::number(Q_QSCXMLC_OUTPUT_REVISION), QString::fromLatin1(QT_VERSION_STR)) - << endl; + << Qt::endl; - h << QStringLiteral("#ifndef ") << headerGuard << endl - << QStringLiteral("#define ") << headerGuard << endl - << endl; + h << QStringLiteral("#ifndef ") << headerGuard << Qt::endl + << QStringLiteral("#define ") << headerGuard << Qt::endl + << Qt::endl; h << l(headerStart); if (!m_translationUnit->namespaceName.isEmpty()) - h << l("namespace ") << m_translationUnit->namespaceName << l(" {") << endl << endl; + h << l("namespace ") << m_translationUnit->namespaceName << l(" {") << Qt::endl << Qt::endl; if (!forwardDecls.isEmpty()) { for (const QString &forwardDecl : forwardDecls) - h << QStringLiteral("class %1;").arg(forwardDecl) << endl; - h << endl; + h << QStringLiteral("class %1;").arg(forwardDecl) << Qt::endl; + h << Qt::endl; } } @@ -517,17 +517,17 @@ void CppDumper::writeHeaderEnd(const QString &headerGuard, const QStringList &me { QString ns; if (!m_translationUnit->namespaceName.isEmpty()) { - h << QStringLiteral("} // %1 namespace ").arg(m_translationUnit->namespaceName) << endl - << endl; + h << QStringLiteral("} // %1 namespace ").arg(m_translationUnit->namespaceName) << Qt::endl + << Qt::endl; ns = QStringLiteral("::%1").arg(m_translationUnit->namespaceName); } for (const QString &name : metatypeDecls) { - h << QStringLiteral("Q_DECLARE_METATYPE(%1::%2*)").arg(ns, name) << endl; + h << QStringLiteral("Q_DECLARE_METATYPE(%1::%2*)").arg(ns, name) << Qt::endl; } - h << endl; + h << Qt::endl; - h << QStringLiteral("#endif // ") << headerGuard << endl; + h << QStringLiteral("#endif // ") << headerGuard << Qt::endl; } void CppDumper::writeImplStart() @@ -535,7 +535,7 @@ void CppDumper::writeImplStart() cpp << doNotEditComment.arg(m_translationUnit->scxmlFileName, QString::number(Q_QSCXMLC_OUTPUT_REVISION), l(QT_VERSION_STR)) - << endl; + << Qt::endl; QStringList includes; for (DocumentModel::ScxmlDocument *doc : qAsConst(m_translationUnit->allDocuments)) { @@ -556,20 +556,20 @@ void CppDumper::writeImplStart() includes.removeDuplicates(); QString headerName = QFileInfo(m_translationUnit->outHFileName).fileName(); - cpp << l("#include \"") << headerName << l("\"") << endl; - cpp << endl - << QStringLiteral("#include <qscxmlinvokableservice.h>") << endl - << QStringLiteral("#include <qscxmltabledata.h>") << endl; + cpp << l("#include \"") << headerName << l("\"") << Qt::endl; + cpp << Qt::endl + << QStringLiteral("#include <qscxmlinvokableservice.h>") << Qt::endl + << QStringLiteral("#include <qscxmltabledata.h>") << Qt::endl; for (const QString &inc : qAsConst(includes)) { - cpp << l("#include <") << inc << l(">") << endl; + cpp << l("#include <") << inc << l(">") << Qt::endl; } - cpp << endl + cpp << Qt::endl << revisionCheck.arg(m_translationUnit->scxmlFileName, QString::number(Q_QSCXMLC_OUTPUT_REVISION), QString::fromLatin1(QT_VERSION_STR)) - << endl; + << Qt::endl; if (!m_translationUnit->namespaceName.isEmpty()) - cpp << l("namespace ") << m_translationUnit->namespaceName << l(" {") << endl << endl; + cpp << l("namespace ") << m_translationUnit->namespaceName << l(" {") << Qt::endl << Qt::endl; } void CppDumper::writeImplBody(const GeneratedTableData &table, @@ -629,8 +629,8 @@ void CppDumper::writeImplBody(const GeneratedTableData &table, void CppDumper::writeImplEnd() { if (!m_translationUnit->namespaceName.isEmpty()) { - cpp << endl - << QStringLiteral("} // %1 namespace").arg(m_translationUnit->namespaceName) << endl; + cpp << Qt::endl + << QStringLiteral("} // %1 namespace").arg(m_translationUnit->namespaceName) << Qt::endl; } } |