diff options
author | Robin Burchell <robin.burchell@crimson.no> | 2017-01-05 20:50:00 +0100 |
---|---|---|
committer | Robin Burchell <robin.burchell@crimson.no> | 2017-01-13 22:40:38 +0000 |
commit | 4b4e81398bdfcda23a9e3c86a297e12b2ff1e9d9 (patch) | |
tree | c0412d6ae730977b33e802c3824aef467c3319bd | |
parent | c99c561ee94076c84ddfdf1643a4e50f0a8ce173 (diff) |
statemachineloader: Use the newly-introduced qmlWarning instead of qmlInfo
qmlInfo will shortly be returning info-level messages (as the name
hints), rather than warning level messages.
While I'm here, tiny drive-by to remove the unnecessary "ERROR" prefixes on
some of the warnings.
Change-Id: Ia615e378f295893066ca437fa6cf5afb7213668e
Reviewed-by: Simon Hausmann <simon.hausmann@qt.io>
-rw-r--r-- | src/imports/scxmlstatemachine/statemachineloader.cpp | 10 |
1 files changed, 5 insertions, 5 deletions
diff --git a/src/imports/scxmlstatemachine/statemachineloader.cpp b/src/imports/scxmlstatemachine/statemachineloader.cpp index cc908c6..42048bf 100644 --- a/src/imports/scxmlstatemachine/statemachineloader.cpp +++ b/src/imports/scxmlstatemachine/statemachineloader.cpp @@ -156,21 +156,21 @@ void QScxmlStateMachineLoader::setDataModel(QScxmlDataModel *dataModel) bool QScxmlStateMachineLoader::parse(const QUrl &source) { if (!QQmlFile::isSynchronous(source)) { - qmlInfo(this) << QStringLiteral("ERROR: cannot open '%1' for reading: only synchronous access is supported.") + qmlWarning(this) << QStringLiteral("Cannot open '%1' for reading: only synchronous access is supported.") .arg(source.url()); return false; } QQmlFile scxmlFile(QQmlEngine::contextForObject(this)->engine(), source); if (scxmlFile.isError()) { // the synchronous case can only fail when the file is not found (or not readable). - qmlInfo(this) << QStringLiteral("ERROR: cannot open '%1' for reading.").arg(source.url()); + qmlWarning(this) << QStringLiteral("Cannot open '%1' for reading.").arg(source.url()); return false; } QByteArray data(scxmlFile.dataByteArray()); QBuffer buf(&data); if (!buf.open(QIODevice::ReadOnly)) { - qmlInfo(this) << QStringLiteral("ERROR: cannot open input buffer for reading"); + qmlWarning(this) << QStringLiteral("Cannot open input buffer for reading"); return false; } @@ -189,12 +189,12 @@ bool QScxmlStateMachineLoader::parse(const QUrl &source) QMetaObject::invokeMethod(m_stateMachine, "start", Qt::QueuedConnection); return true; } else { - qmlInfo(this) << QStringLiteral("Something went wrong while parsing '%1':") + qmlWarning(this) << QStringLiteral("Something went wrong while parsing '%1':") .arg(source.url()) << endl; const auto errors = m_stateMachine->parseErrors(); for (const QScxmlError &error : errors) { - qmlInfo(this) << error.toString(); + qmlWarning(this) << error.toString(); } emit stateMachineChanged(); |