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 | |
parent | cdd12bf1d4475ad23b49b5e27328bf6c738a0ab3 (diff) | |
download | Qt-5a506eefe1ca8f654dcfc354f8ac39547510becf.zip Qt-5a506eefe1ca8f654dcfc354f8ac39547510becf.tar.gz Qt-5a506eefe1ca8f654dcfc354f8ac39547510becf.tar.bz2 |
fix warnings
Diffstat (limited to 'src/declarative/qml')
-rw-r--r-- | src/declarative/qml/qmlcompositetypemanager.cpp | 4 | ||||
-rw-r--r-- | src/declarative/qml/qmlcontext.cpp | 2 | ||||
-rw-r--r-- | src/declarative/qml/qmlcustomparser.cpp | 1 | ||||
-rw-r--r-- | src/declarative/qml/qmlscriptparser.cpp | 13 |
4 files changed, 10 insertions, 10 deletions
diff --git a/src/declarative/qml/qmlcompositetypemanager.cpp b/src/declarative/qml/qmlcompositetypemanager.cpp index e1124a6..0da1a92 100644 --- a/src/declarative/qml/qmlcompositetypemanager.cpp +++ b/src/declarative/qml/qmlcompositetypemanager.cpp @@ -315,7 +315,7 @@ void QmlCompositeTypeManager::compile(QmlCompositeTypeData *unit) continue; } - QUrl url = engine->componentUrl(QUrl(type + ".qml"), QUrl(unit->url)); + QUrl url = engine->componentUrl(QUrl(QLatin1String(type + ".qml")), QUrl(unit->url)); QmlCompositeTypeData *urlUnit = components.value(url.toString()); if (!urlUnit) { @@ -335,7 +335,7 @@ void QmlCompositeTypeManager::compile(QmlCompositeTypeData *unit) { QmlError error; error.setUrl(unit->url); - error.setDescription("Type " + type + " unavailable"); + error.setDescription(tr("Type %1 unavailable").arg(QLatin1String(type))); unit->errors << error; } if (urlUnit->errorType != QmlCompositeTypeData::AccessError) diff --git a/src/declarative/qml/qmlcontext.cpp b/src/declarative/qml/qmlcontext.cpp index ea72ebf..e5016f2 100644 --- a/src/declarative/qml/qmlcontext.cpp +++ b/src/declarative/qml/qmlcontext.cpp @@ -73,8 +73,6 @@ void QmlContextPrivate::dump(int depth) void QmlContextPrivate::destroyed(QObject *obj) { - Q_Q(QmlContext); - defaultObjects.removeAll(obj); QVariant variantObject = QVariant::fromValue(obj); diff --git a/src/declarative/qml/qmlcustomparser.cpp b/src/declarative/qml/qmlcustomparser.cpp index a60f783..2e8c8f6 100644 --- a/src/declarative/qml/qmlcustomparser.cpp +++ b/src/declarative/qml/qmlcustomparser.cpp @@ -224,6 +224,7 @@ QList<QVariant> QmlCustomParserProperty::assignedValues() const QByteArray QmlCustomParser::compile(const QList<QmlCustomParserProperty> &, bool *ok) { + Q_UNUSED(ok); return QByteArray(); } 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; |