summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--.qmake.conf2
-rw-r--r--src/imports/scxmlstatemachine/statemachineloader.cpp2
-rw-r--r--src/scxml/qscxmltabledata.cpp48
-rw-r--r--tools/qscxmlc/qscxmlc.cpp12
-rw-r--r--tools/qscxmlc/scxmlcppdumper.cpp46
5 files changed, 55 insertions, 55 deletions
diff --git a/.qmake.conf b/.qmake.conf
index 360e9de..183ef32 100644
--- a/.qmake.conf
+++ b/.qmake.conf
@@ -2,4 +2,4 @@ load(qt_build_config)
CONFIG += qt_example_installs
CONFIG += warning_clean
-MODULE_VERSION = 5.14.0
+MODULE_VERSION = 6.0.0
diff --git a/src/imports/scxmlstatemachine/statemachineloader.cpp b/src/imports/scxmlstatemachine/statemachineloader.cpp
index d691479..1d312a5 100644
--- a/src/imports/scxmlstatemachine/statemachineloader.cpp
+++ b/src/imports/scxmlstatemachine/statemachineloader.cpp
@@ -191,7 +191,7 @@ bool QScxmlStateMachineLoader::parse(const QUrl &source)
} else {
qmlWarning(this) << QStringLiteral("Something went wrong while parsing '%1':")
.arg(source.url())
- << endl;
+ << Qt::endl;
const auto errors = m_stateMachine->parseErrors();
for (const QScxmlError &error : errors) {
qmlWarning(this) << error.toString();
diff --git a/src/scxml/qscxmltabledata.cpp b/src/scxml/qscxmltabledata.cpp
index aa9a35e..ab63696 100644
--- a/src/scxml/qscxmltabledata.cpp
+++ b/src/scxml/qscxmltabledata.cpp
@@ -991,23 +991,23 @@ QString GeneratedTableData::toString(const int *stateMachineTable)
const StateTable *st = reinterpret_cast<const StateTable *>(stateMachineTable);
- out << "{" << endl
- << "\t0x" << hex << st->version << dec << ", // version" << endl
- << "\t" << st->name << ", // name" << endl
- << "\t" << st->dataModel << ", // data-model" << endl
- << "\t" << st->childStates << ", // child states array offset" << endl
- << "\t" << st->initialTransition << ", // transition to initial states" << endl
- << "\t" << st->initialSetup << ", // initial setup" << endl
- << "\t" << st->binding << ", // binding" << endl
- << "\t" << st->maxServiceId << ", // maxServiceId" << endl
+ out << "{" << Qt::endl
+ << "\t0x" << Qt::hex << st->version << Qt::dec << ", // version" << Qt::endl
+ << "\t" << st->name << ", // name" << Qt::endl
+ << "\t" << st->dataModel << ", // data-model" << Qt::endl
+ << "\t" << st->childStates << ", // child states array offset" << Qt::endl
+ << "\t" << st->initialTransition << ", // transition to initial states" << Qt::endl
+ << "\t" << st->initialSetup << ", // initial setup" << Qt::endl
+ << "\t" << st->binding << ", // binding" << Qt::endl
+ << "\t" << st->maxServiceId << ", // maxServiceId" << Qt::endl
<< "\t" << st->stateOffset << ", " << st->stateCount
- << ", // state offset and count" << endl
+ << ", // state offset and count" << Qt::endl
<< "\t" << st->transitionOffset << ", " << st->transitionCount
- << ", // transition offset and count" << endl
- << "\t" << st->arrayOffset << ", " << st->arraySize << ", // array offset and size" << endl
- << endl;
+ << ", // transition offset and count" << Qt::endl
+ << "\t" << st->arrayOffset << ", " << st->arraySize << ", // array offset and size" << Qt::endl
+ << Qt::endl;
- out << "\t// States:" << endl;
+ out << "\t// States:" << Qt::endl;
for (int i = 0; i < st->stateCount; ++i) {
const StateTable::State &s = st->state(i);
out << "\t"
@@ -1022,11 +1022,11 @@ QString GeneratedTableData::toString(const int *stateMachineTable)
<< s.childStates << ", "
<< s.transitions << ", "
<< s.serviceFactoryIds << ","
- << endl;
+ << Qt::endl;
}
- out << endl
- << "\t// Transitions:" << endl;
+ out << Qt::endl
+ << "\t// Transitions:" << Qt::endl;
for (int i = 0; i < st->transitionCount; ++i) {
auto t = st->transition(i);
out << "\t"
@@ -1036,11 +1036,11 @@ QString GeneratedTableData::toString(const int *stateMachineTable)
<< t.source << ", "
<< t.targets << ", "
<< t.transitionInstructions << ", "
- << endl ;
+ << Qt::endl ;
}
- out << endl
- << "\t// Arrays:" << endl;
+ out << Qt::endl
+ << "\t// Arrays:" << Qt::endl;
int nextStart = 0;
while (nextStart < st->arraySize) {
const StateTable::Array a = st->array(nextStart);
@@ -1048,13 +1048,13 @@ QString GeneratedTableData::toString(const int *stateMachineTable)
for (int j = 0; j < a.size(); ++j) {
out << a[j] << ", ";
}
- out << endl;
+ out << Qt::endl;
nextStart += a.size() + 1;
}
- out << hex;
- out << endl
- << "\t0x" << StateTable::terminator << " // terminator" << endl
+ out << Qt::hex;
+ out << Qt::endl
+ << "\t0x" << StateTable::terminator << " // terminator" << Qt::endl
<< "}";
return result;
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 89a403b..6f81bd9 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;
}
}