summaryrefslogtreecommitdiffstats
path: root/src/imports
diff options
context:
space:
mode:
authorRobin Burchell <robin.burchell@crimson.no>2017-01-05 20:50:00 +0100
committerRobin Burchell <robin.burchell@crimson.no>2017-01-13 22:40:38 +0000
commit4b4e81398bdfcda23a9e3c86a297e12b2ff1e9d9 (patch)
treec0412d6ae730977b33e802c3824aef467c3319bd /src/imports
parentc99c561ee94076c84ddfdf1643a4e50f0a8ce173 (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>
Diffstat (limited to 'src/imports')
-rw-r--r--src/imports/scxmlstatemachine/statemachineloader.cpp10
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();