summaryrefslogtreecommitdiffstats
path: root/src/declarative/util
diff options
context:
space:
mode:
Diffstat (limited to 'src/declarative/util')
-rw-r--r--src/declarative/util/qmlanimation.cpp12
-rw-r--r--src/declarative/util/qmlconnection.cpp4
-rw-r--r--src/declarative/util/qmllistmodel.cpp8
3 files changed, 12 insertions, 12 deletions
diff --git a/src/declarative/util/qmlanimation.cpp b/src/declarative/util/qmlanimation.cpp
index 247e64c..ed5018d 100644
--- a/src/declarative/util/qmlanimation.cpp
+++ b/src/declarative/util/qmlanimation.cpp
@@ -73,7 +73,7 @@ QEasingCurve stringToCurve(const QString &curve)
QString easeName = curve.trimmed();
if (!easeName.endsWith(QLatin1Char(')'))) {
qWarning("QEasingCurve: Unmatched perenthesis in easing function '%s'",
- curve.toLatin1().constData());
+ qPrintable(curve));
return easingCurve;
}
@@ -83,7 +83,7 @@ QEasingCurve stringToCurve(const QString &curve)
normalizedCurve = easeName.left(idx);
if (!normalizedCurve.startsWith(QLatin1String("ease"))) {
qWarning("QEasingCurve: Easing function '%s' must start with 'ease'",
- curve.toLatin1().constData());
+ qPrintable(curve));
}
props = prop_str.split(QLatin1Char(','));
@@ -95,10 +95,10 @@ QEasingCurve stringToCurve(const QString &curve)
static int index = QEasingCurve::staticMetaObject.indexOfEnumerator("Type");
static QMetaEnum me = QEasingCurve::staticMetaObject.enumerator(index);
- int value = me.keyToValue(normalizedCurve.toLatin1().constData());
+ int value = me.keyToValue(normalizedCurve.toUtf8().constData());
if (value < 0) {
qWarning("QEasingCurve: Unknown easing curve '%s'",
- curve.toLatin1().constData());
+ qPrintable(curve));
value = 0;
}
easingCurve.setType((QEasingCurve::Type)value);
@@ -109,7 +109,7 @@ QEasingCurve stringToCurve(const QString &curve)
if (sep == -1) {
qWarning("QEasingCurve: Improperly specified property in easing function '%s'",
- curve.toLatin1().constData());
+ qPrintable(curve));
return easingCurve;
}
@@ -119,7 +119,7 @@ QEasingCurve stringToCurve(const QString &curve)
if (propName.isEmpty() || !isOk) {
qWarning("QEasingCurve: Improperly specified property in easing function '%s'",
- curve.toLatin1().constData());
+ qPrintable(curve));
return easingCurve;
}
diff --git a/src/declarative/util/qmlconnection.cpp b/src/declarative/util/qmlconnection.cpp
index c77d0f6..2a7cf6c 100644
--- a/src/declarative/util/qmlconnection.cpp
+++ b/src/declarative/util/qmlconnection.cpp
@@ -163,7 +163,7 @@ void QmlConnection::connectIfValid()
if (lparen >= 0 && d->signal.length() > lparen+2) {
QStringList l = d->signal.mid(lparen+1,d->signal.length()-lparen-2).split(QLatin1Char(','));
foreach (const QString &s, l) {
- sigparams.append(s.toLatin1());
+ sigparams.append(s.toUtf8());
}
}
QString signalname = d->signal.left(lparen);
@@ -172,7 +172,7 @@ void QmlConnection::connectIfValid()
int methods = mo->methodCount();
for (int ii = 0; ii < methods; ++ii) {
QMetaMethod method = mo->method(ii);
- QString methodName = QLatin1String(method.signature());
+ QString methodName = QString::fromUtf8(method.signature());
int idx = methodName.indexOf(QLatin1Char('('));
methodName = methodName.left(idx);
if (methodName == signalname && (lparen<0 || method.parameterNames() == sigparams)) {
diff --git a/src/declarative/util/qmllistmodel.cpp b/src/declarative/util/qmllistmodel.cpp
index 062ab48..4dc9bc5 100644
--- a/src/declarative/util/qmllistmodel.cpp
+++ b/src/declarative/util/qmllistmodel.cpp
@@ -233,7 +233,7 @@ struct ModelNode
QHash<QString, ModelNode *>::iterator it;
for (it = properties.begin(); it != properties.end(); ++it) {
if (!(*it)->values.isEmpty())
- objectCache->setValue(it.key().toLatin1(), (*it)->values.first());
+ objectCache->setValue(it.key().toUtf8(), (*it)->values.first());
}
}
return objectCache;
@@ -252,7 +252,7 @@ struct ModelNode
properties.insert(prop,n);
}
if (objectCache)
- objectCache->setValue(prop.toLatin1(), val);
+ objectCache->setValue(prop.toUtf8(), val);
}
QmlListModel *modelCache;
@@ -709,7 +709,7 @@ bool QmlListModelParser::compileProperty(const QmlCustomParserProperty &prop, QL
qvariant_cast<QmlParser::Variant>(value);
int ref = data.count();
- QByteArray d = variant.asScript().toLatin1();
+ QByteArray d = variant.asScript().toUtf8();
d.append('\0');
data.append(d);
@@ -799,7 +799,7 @@ void QmlListModelParser::setCustomData(QObject *obj, const QByteArray &d)
{
ModelNode *n = nodes.top();
ModelNode *n2 = new ModelNode;
- n->properties.insert(QLatin1String(data + instr.dataIdx), n2);
+ n->properties.insert(QString::fromUtf8(data + instr.dataIdx), n2);
nodes.push(n2);
}
break;