diff options
author | Warwick Allison <warwick.allison@nokia.com> | 2009-05-21 23:26:40 (GMT) |
---|---|---|
committer | Warwick Allison <warwick.allison@nokia.com> | 2009-05-21 23:26:40 (GMT) |
commit | 5a506eefe1ca8f654dcfc354f8ac39547510becf (patch) | |
tree | 20d3eedfd42b89c6f2b7ae0ce4f9ecf71dbabcf3 /src/declarative/qml/qmlscriptparser.cpp | |
parent | cdd12bf1d4475ad23b49b5e27328bf6c738a0ab3 (diff) | |
download | Qt-5a506eefe1ca8f654dcfc354f8ac39547510becf.zip Qt-5a506eefe1ca8f654dcfc354f8ac39547510becf.tar.gz Qt-5a506eefe1ca8f654dcfc354f8ac39547510becf.tar.bz2 |
fix warnings
Diffstat (limited to 'src/declarative/qml/qmlscriptparser.cpp')
-rw-r--r-- | src/declarative/qml/qmlscriptparser.cpp | 13 |
1 files changed, 7 insertions, 6 deletions
diff --git a/src/declarative/qml/qmlscriptparser.cpp b/src/declarative/qml/qmlscriptparser.cpp index 01600b9..5b3564f 100644 --- a/src/declarative/qml/qmlscriptparser.cpp +++ b/src/declarative/qml/qmlscriptparser.cpp @@ -10,6 +10,7 @@ #include "parser/javascriptast_p.h" #include <QStack> +#include <QCoreApplication> #include <QtDebug> #include <qfxperf.h> @@ -207,8 +208,8 @@ ProcessAST::defineObjectBinding_helper(AST::UiQualifiedId *propertyName, { int lastTypeDot = objectType.lastIndexOf(QLatin1Char('.')); bool isType = !objectType.isEmpty() && - (objectType.at(0).isUpper() | - lastTypeDot >= 0 && objectType.at(lastTypeDot+1).isUpper()); + (objectType.at(0).isUpper() || + (lastTypeDot >= 0 && objectType.at(lastTypeDot+1).isUpper())); int propertyCount = 0; for (; propertyName; propertyName = propertyName->next){ @@ -221,7 +222,7 @@ ProcessAST::defineObjectBinding_helper(AST::UiQualifiedId *propertyName, if(propertyCount || !currentObject()) { QmlError error; - error.setDescription("Expected type name"); + error.setDescription(QCoreApplication::translate("QmlParser","Expected type name")); error.setLine(typeLocation.startLine); error.setColumn(typeLocation.startColumn); _parser->_errors << error; @@ -427,7 +428,7 @@ bool ProcessAST::visit(AST::UiPublicMember *node) if(!typeFound) { QmlError error; - error.setDescription("Expected property type"); + error.setDescription(QCoreApplication::translate("QmlParser","Expected property type")); error.setLine(node->typeToken.startLine); error.setColumn(node->typeToken.startColumn); _parser->_errors << error; @@ -573,7 +574,7 @@ bool ProcessAST::visit(AST::UiSourceElement *node) if(funDecl->formals) { QmlError error; - error.setDescription("Slot declarations must be parameterless"); + error.setDescription(QCoreApplication::translate("QmlParser","Slot declarations must be parameterless")); error.setLine(funDecl->lparenToken.startLine); error.setColumn(funDecl->lparenToken.startColumn); _parser->_errors << error; @@ -587,7 +588,7 @@ bool ProcessAST::visit(AST::UiSourceElement *node) obj->dynamicSlots << slot; } else { QmlError error; - error.setDescription("JavaScript declaration outside Script element"); + error.setDescription(QCoreApplication::translate("QmlParser","JavaScript declaration outside Script element")); error.setLine(node->firstSourceLocation().startLine); error.setColumn(node->firstSourceLocation().startColumn); _parser->_errors << error; |