summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorMichael Brasser <michael.brasser@nokia.com>2009-09-25 02:44:25 (GMT)
committerMichael Brasser <michael.brasser@nokia.com>2009-09-25 02:44:25 (GMT)
commit96ceb52e030105a4361bce95ce0b2c130e4d1900 (patch)
tree1e5e905889fc1d74451540bdd83004037e7080ed
parent7e6055d5d14ab0cf68df2d54d80ba22fc74fc51a (diff)
parent7b94225ae26abcca8f2e8706cee8ed4843f5a53b (diff)
downloadQt-96ceb52e030105a4361bce95ce0b2c130e4d1900.zip
Qt-96ceb52e030105a4361bce95ce0b2c130e4d1900.tar.gz
Qt-96ceb52e030105a4361bce95ce0b2c130e4d1900.tar.bz2
Merge branch 'kinetic-declarativeui' of git@scm.dev.nokia.troll.no:qt/kinetic into kinetic-declarativeui
-rw-r--r--src/declarative/qml/qmlscriptparser.cpp7
1 files changed, 7 insertions, 0 deletions
diff --git a/src/declarative/qml/qmlscriptparser.cpp b/src/declarative/qml/qmlscriptparser.cpp
index 09efc90..c126830 100644
--- a/src/declarative/qml/qmlscriptparser.cpp
+++ b/src/declarative/qml/qmlscriptparser.cpp
@@ -769,6 +769,13 @@ bool ProcessAST::visit(AST::UiSourceElement *node)
} else if (AST::VariableStatement *varStmt = AST::cast<AST::VariableStatement *>(node->sourceElement)) {
// ignore variable declarations
line = varStmt->declarationKindToken.startLine;
+
+ QmlError error;
+ error.setDescription(QCoreApplication::translate("QmlParser", "Variable declarations not allow in inline Script blocks"));
+ error.setLine(node->firstSourceLocation().startLine);
+ error.setColumn(node->firstSourceLocation().startColumn);
+ _parser->_errors << error;
+ return false;
}
Value *value = new Value;