summaryrefslogtreecommitdiffstats
path: root/src/declarative/util
diff options
context:
space:
mode:
Diffstat (limited to 'src/declarative/util')
-rw-r--r--src/declarative/util/qmlanimation.cpp14
-rw-r--r--src/declarative/util/qmlbehavior.cpp2
-rw-r--r--src/declarative/util/qmlpropertychanges.cpp2
-rw-r--r--src/declarative/util/qmlstateoperations.cpp8
-rw-r--r--src/declarative/util/qmlxmllistmodel.cpp4
5 files changed, 15 insertions, 15 deletions
diff --git a/src/declarative/util/qmlanimation.cpp b/src/declarative/util/qmlanimation.cpp
index abffefe..6609c73 100644
--- a/src/declarative/util/qmlanimation.cpp
+++ b/src/declarative/util/qmlanimation.cpp
@@ -77,7 +77,7 @@ static QEasingCurve stringToCurve(const QString &curve, QObject *obj)
if (hasParams) {
QString easeName = curve.trimmed();
if (!easeName.endsWith(QLatin1Char(')'))) {
- qmlInfo(obj) << obj->tr("Unmatched parenthesis in easing function \"%1\"").arg(curve);
+ qmlInfo(obj) << QmlPropertyAnimation::tr("Unmatched parenthesis in easing function \"%1\"").arg(curve);
return easingCurve;
}
@@ -86,7 +86,7 @@ static QEasingCurve stringToCurve(const QString &curve, QObject *obj)
easeName.mid(idx + 1, easeName.length() - 1 - idx - 1);
normalizedCurve = easeName.left(idx);
if (!normalizedCurve.startsWith(QLatin1String("ease"))) {
- qmlInfo(obj) << obj->tr("Easing function \"%1\" must start with \"ease\"").arg(curve);
+ qmlInfo(obj) << QmlPropertyAnimation::tr("Easing function \"%1\" must start with \"ease\"").arg(curve);
return easingCurve;
}
@@ -101,7 +101,7 @@ static QEasingCurve stringToCurve(const QString &curve, QObject *obj)
int value = me.keyToValue(normalizedCurve.toUtf8().constData());
if (value < 0) {
- qmlInfo(obj) << obj->tr("Unknown easing curve \"%1\"").arg(curve);
+ qmlInfo(obj) << QmlPropertyAnimation::tr("Unknown easing curve \"%1\"").arg(curve);
return easingCurve;
}
easingCurve.setType((QEasingCurve::Type)value);
@@ -111,7 +111,7 @@ static QEasingCurve stringToCurve(const QString &curve, QObject *obj)
int sep = str.indexOf(QLatin1Char(':'));
if (sep == -1) {
- qmlInfo(obj) << obj->tr("Improperly specified parameter in easing function \"%1\"").arg(curve);
+ qmlInfo(obj) << QmlPropertyAnimation::tr("Improperly specified parameter in easing function \"%1\"").arg(curve);
continue;
}
@@ -120,7 +120,7 @@ static QEasingCurve stringToCurve(const QString &curve, QObject *obj)
qreal propValue = str.mid(sep + 1).trimmed().toDouble(&isOk);
if (propName.isEmpty() || !isOk) {
- qmlInfo(obj) << obj->tr("Improperly specified parameter in easing function \"%1\"").arg(curve);
+ qmlInfo(obj) << QmlPropertyAnimation::tr("Improperly specified parameter in easing function \"%1\"").arg(curve);
continue;
}
@@ -131,7 +131,7 @@ static QEasingCurve stringToCurve(const QString &curve, QObject *obj)
} else if (propName == QLatin1String("overshoot")) {
easingCurve.setOvershoot(propValue);
} else {
- qmlInfo(obj) << obj->tr("Unknown easing parameter \"%1\"").arg(propName);
+ qmlInfo(obj) << QmlPropertyAnimation::tr("Unknown easing parameter \"%1\"").arg(propName);
continue;
}
}
@@ -226,7 +226,7 @@ QmlMetaProperty QmlAbstractAnimationPrivate::createProperty(QObject *obj, const
{
QmlMetaProperty prop = QmlMetaProperty::createProperty(obj, str, qmlContext(infoObj));
if (!prop.isValid()) {
- qmlInfo(infoObj) << QmlAbstractAnimation::tr("Cannot animate non-existant property \"%1\"").arg(str);
+ qmlInfo(infoObj) << QmlAbstractAnimation::tr("Cannot animate non-existent property \"%1\"").arg(str);
return QmlMetaProperty();
} else if (!prop.isWritable()) {
qmlInfo(infoObj) << QmlAbstractAnimation::tr("Cannot animate read-only property \"%1\"").arg(str);
diff --git a/src/declarative/util/qmlbehavior.cpp b/src/declarative/util/qmlbehavior.cpp
index b9c77f5..e8feeaa 100644
--- a/src/declarative/util/qmlbehavior.cpp
+++ b/src/declarative/util/qmlbehavior.cpp
@@ -119,7 +119,7 @@ void QmlBehavior::setAnimation(QmlAbstractAnimation *animation)
{
Q_D(QmlBehavior);
if (d->animation) {
- qmlInfo(this) << tr("Can't change the animation assigned to a Behavior.");
+ qmlInfo(this) << tr("Cannot change the animation assigned to a Behavior.");
return;
}
diff --git a/src/declarative/util/qmlpropertychanges.cpp b/src/declarative/util/qmlpropertychanges.cpp
index 68fc5cc..f1f39da 100644
--- a/src/declarative/util/qmlpropertychanges.cpp
+++ b/src/declarative/util/qmlpropertychanges.cpp
@@ -357,7 +357,7 @@ QmlPropertyChangesPrivate::property(const QByteArray &property)
Q_Q(QmlPropertyChanges);
QmlMetaProperty prop = QmlMetaProperty::createProperty(object, QString::fromUtf8(property));
if (!prop.isValid()) {
- qmlInfo(q) << QmlPropertyChanges::tr("Cannot assign to non-existant property \"%1\"").arg(QString::fromUtf8(property));
+ qmlInfo(q) << QmlPropertyChanges::tr("Cannot assign to non-existent property \"%1\"").arg(QString::fromUtf8(property));
return QmlMetaProperty();
} else if (!(prop.type() & QmlMetaProperty::SignalProperty) && !prop.isWritable()) {
qmlInfo(q) << QmlPropertyChanges::tr("Cannot assign to read-only property \"%1\"").arg(QString::fromUtf8(property));
diff --git a/src/declarative/util/qmlstateoperations.cpp b/src/declarative/util/qmlstateoperations.cpp
index 35c8f7d..cefe2bc 100644
--- a/src/declarative/util/qmlstateoperations.cpp
+++ b/src/declarative/util/qmlstateoperations.cpp
@@ -82,7 +82,7 @@ void QmlParentChangePrivate::doChange(QmlGraphicsItem *targetParent, QmlGraphics
bool ok;
const QTransform &transform = target->itemTransform(targetParent, &ok);
if (transform.type() >= QTransform::TxShear || !ok) {
- qmlInfo(q) << QObject::tr("Unable to preserve appearance under complex transform");
+ qmlInfo(q) << QmlParentChange::tr("Unable to preserve appearance under complex transform");
ok = false;
}
@@ -92,21 +92,21 @@ void QmlParentChangePrivate::doChange(QmlGraphicsItem *targetParent, QmlGraphics
if (transform.m11() == transform.m22())
scale = transform.m11();
else {
- qmlInfo(q) << QObject::tr("Unable to preserve appearance under non-uniform scale");
+ qmlInfo(q) << QmlParentChange::tr("Unable to preserve appearance under non-uniform scale");
ok = false;
}
} else if (ok && transform.type() == QTransform::TxRotate) {
if (transform.m11() == transform.m22())
scale = qSqrt(transform.m11()*transform.m11() + transform.m12()*transform.m12());
else {
- qmlInfo(q) << QObject::tr("Unable to preserve appearance under non-uniform scale");
+ qmlInfo(q) << QmlParentChange::tr("Unable to preserve appearance under non-uniform scale");
ok = false;
}
if (scale != 0)
rotation = atan2(transform.m12()/scale, transform.m11()/scale) * 180/M_PI;
else {
- qmlInfo(q) << QObject::tr("Unable to preserve appearance under scale of 0");
+ qmlInfo(q) << QmlParentChange::tr("Unable to preserve appearance under scale of 0");
ok = false;
}
}
diff --git a/src/declarative/util/qmlxmllistmodel.cpp b/src/declarative/util/qmlxmllistmodel.cpp
index d31fadf..d586792 100644
--- a/src/declarative/util/qmlxmllistmodel.cpp
+++ b/src/declarative/util/qmlxmllistmodel.cpp
@@ -391,7 +391,7 @@ void QmlXmlRoleList::insert(int i, QmlXmlListModelRole *role)
{
QmlConcreteList<QmlXmlListModelRole *>::insert(i, role);
if (model->roleNames.contains(role->name())) {
- qmlInfo(role) << QObject::tr("\"%1\" duplicates a previous role name and will be disabled.").arg(role->name());
+ qmlInfo(role) << QCoreApplication::translate("QmlXmlRoleList", "\"%1\" duplicates a previous role name and will be disabled.").arg(role->name());
return;
}
model->roles.insert(i, model->highestRole);
@@ -551,7 +551,7 @@ void QmlXmlListModel::setQuery(const QString &query)
{
Q_D(QmlXmlListModel);
if (!query.startsWith(QLatin1Char('/'))) {
- qmlInfo(this) << tr("An XmlListModel query must start with '/' or \"//\"");
+ qmlInfo(this) << QCoreApplication::translate("QmlXmlRoleList", "An XmlListModel query must start with '/' or \"//\"");
return;
}