summaryrefslogtreecommitdiffstats
path: root/src/declarative/qml/qdeclarativedirparser.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'src/declarative/qml/qdeclarativedirparser.cpp')
-rw-r--r--src/declarative/qml/qdeclarativedirparser.cpp9
1 files changed, 4 insertions, 5 deletions
diff --git a/src/declarative/qml/qdeclarativedirparser.cpp b/src/declarative/qml/qdeclarativedirparser.cpp
index 1e3b37b..3e05853 100644
--- a/src/declarative/qml/qdeclarativedirparser.cpp
+++ b/src/declarative/qml/qdeclarativedirparser.cpp
@@ -170,10 +170,9 @@ bool QDeclarativeDirParser::parse()
const int dotIndex = version.indexOf(QLatin1Char('.'));
if (dotIndex == -1) {
- qWarning() << "expected '.'"; // ### use reportError
+ reportError(lineNumber, -1, QLatin1String("expected '.'"));
} else if (version.indexOf(QLatin1Char('.'), dotIndex + 1) != -1) {
- qWarning() << "unexpected '.'"; // ### use reportError
-
+ reportError(lineNumber, -1, QLatin1String("unexpected '.'"));
} else {
bool validVersionNumber = false;
const int majorVersion = version.left(dotIndex).toInt(&validVersionNumber);
@@ -189,8 +188,8 @@ bool QDeclarativeDirParser::parse()
}
}
} else {
- // ### use reportError
- qWarning() << "a component declaration requires 3 arguments, but" << (sectionCount + 1) << "were provided";
+ reportError(lineNumber, -1,
+ QString::fromUtf8("a component declaration requires 3 arguments, but %1 were provided").arg(sectionCount + 1));
}
}