diff options
author | Michael Brasser <michael.brasser@nokia.com> | 2009-12-07 00:48:13 (GMT) |
---|---|---|
committer | Michael Brasser <michael.brasser@nokia.com> | 2009-12-07 00:48:13 (GMT) |
commit | 03e8cf43e26db84d00dfc0d01d2d4c3ba67b2d32 (patch) | |
tree | 13907b009b789711f167c125c7dc97d509a10b29 /src/declarative/util | |
parent | a30e67378bf56bac642d5480f8b9f3e5749dc2f6 (diff) | |
parent | 1f002c8af75f0c66ab2c8581421c29320241a7aa (diff) | |
download | Qt-03e8cf43e26db84d00dfc0d01d2d4c3ba67b2d32.zip Qt-03e8cf43e26db84d00dfc0d01d2d4c3ba67b2d32.tar.gz Qt-03e8cf43e26db84d00dfc0d01d2d4c3ba67b2d32.tar.bz2 |
Merge branch 'kinetic-declarativeui' of git@scm.dev.nokia.troll.no:qt/kinetic into kinetic-declarativeui
Diffstat (limited to 'src/declarative/util')
-rw-r--r-- | src/declarative/util/qmlanimation.cpp | 6 | ||||
-rw-r--r-- | src/declarative/util/qmlanimation_p_p.h | 2 | ||||
-rw-r--r-- | src/declarative/util/qmllistaccessor.cpp | 4 | ||||
-rw-r--r-- | src/declarative/util/qmllistmodel.cpp | 3 | ||||
-rw-r--r-- | src/declarative/util/qmlpropertychanges.cpp | 4 | ||||
-rw-r--r-- | src/declarative/util/qmlspringfollow.cpp | 4 | ||||
-rw-r--r-- | src/declarative/util/qmlsystempalette.cpp | 4 | ||||
-rw-r--r-- | src/declarative/util/qmlxmllistmodel.cpp | 4 |
8 files changed, 16 insertions, 15 deletions
diff --git a/src/declarative/util/qmlanimation.cpp b/src/declarative/util/qmlanimation.cpp index 0f5a0f0..00e3056 100644 --- a/src/declarative/util/qmlanimation.cpp +++ b/src/declarative/util/qmlanimation.cpp @@ -1341,7 +1341,7 @@ QmlNumberAnimation::~QmlNumberAnimation() qreal QmlNumberAnimation::from() const { Q_D(const QmlPropertyAnimation); - return d->from.toDouble(); + return d->from.toReal(); } void QmlNumberAnimation::setFrom(qreal f) @@ -1357,7 +1357,7 @@ void QmlNumberAnimation::setFrom(qreal f) qreal QmlNumberAnimation::to() const { Q_D(const QmlPropertyAnimation); - return d->to.toDouble(); + return d->to.toReal(); } void QmlNumberAnimation::setTo(qreal t) @@ -1532,7 +1532,7 @@ QML_DEFINE_TYPE(Qt,4,6,ParallelAnimation,QmlParallelAnimation) //convert a variant from string type to another animatable type void QmlPropertyAnimationPrivate::convertVariant(QVariant &variant, int type) { - if (variant.type() != QVariant::String) { + if (variant.userType() != QVariant::String) { variant.convert((QVariant::Type)type); return; } diff --git a/src/declarative/util/qmlanimation_p_p.h b/src/declarative/util/qmlanimation_p_p.h index 0b65c27..71b6caa 100644 --- a/src/declarative/util/qmlanimation_p_p.h +++ b/src/declarative/util/qmlanimation_p_p.h @@ -160,7 +160,7 @@ protected: virtual void updateCurrentValue(const QVariant &value) { if (animValue) - animValue->setValue(value.toDouble()); + animValue->setValue(value.toReal()); } virtual void updateState(State newState, State oldState) { diff --git a/src/declarative/util/qmllistaccessor.cpp b/src/declarative/util/qmllistaccessor.cpp index 1e051b7..00b8220 100644 --- a/src/declarative/util/qmllistaccessor.cpp +++ b/src/declarative/util/qmllistaccessor.cpp @@ -73,9 +73,9 @@ void QmlListAccessor::setList(const QVariant &v, QmlEngine *engine) if (!d.isValid()) { m_type = Invalid; - } else if (d.type() == QVariant::StringList) { + } else if (d.userType() == QVariant::StringList) { m_type = StringList; - } else if (d.type() == (QVariant::Type)QMetaType::QVariantList) { + } else if (d.userType() == QMetaType::QVariantList) { m_type = VariantList; } else if (d.canConvert(QVariant::Int)) { m_type = Integer; diff --git a/src/declarative/util/qmllistmodel.cpp b/src/declarative/util/qmllistmodel.cpp index 2678de7..995a7a4 100644 --- a/src/declarative/util/qmllistmodel.cpp +++ b/src/declarative/util/qmllistmodel.cpp @@ -445,6 +445,7 @@ void QmlListModel::clear() _root = 0; roleStrings.clear(); emit itemsRemoved(0,cleared); + emit countChanged(0); } /*! @@ -901,7 +902,7 @@ static void dump(ModelNode *node, int ind) } for (QHash<QString, ModelNode *>::ConstIterator iter = node->properties.begin(); iter != node->properties.end(); ++iter) { - qWarning().nospace() << indent << "Property " << iter.key() << ":"; + qWarning().nospace() << indent << "Property " << iter.key() << ':'; dump(iter.value(), ind + 1); } } diff --git a/src/declarative/util/qmlpropertychanges.cpp b/src/declarative/util/qmlpropertychanges.cpp index b9ec67a..48e026e 100644 --- a/src/declarative/util/qmlpropertychanges.cpp +++ b/src/declarative/util/qmlpropertychanges.cpp @@ -209,7 +209,7 @@ QmlPropertyChangesParser::compileList(QList<QPair<QByteArray, QVariant> > &list, QmlCustomParserProperty prop = qvariant_cast<QmlCustomParserProperty>(value); - QByteArray pre = propName + "."; + QByteArray pre = propName + '.'; compileList(list, pre, prop); } else { @@ -384,7 +384,7 @@ QmlPropertyChanges::ActionList QmlPropertyChanges::actions() a.restore = restoreEntryValues(); if (a.property.propertyType() == QVariant::Url && - (a.toValue.type() == QVariant::String || a.toValue.type() == QVariant::ByteArray) && !a.toValue.isNull()) + (a.toValue.userType() == QVariant::String || a.toValue.userType() == QVariant::ByteArray) && !a.toValue.isNull()) a.toValue.setValue(qmlContext(this)->resolvedUrl(QUrl(a.toValue.toString()))); list << a; diff --git a/src/declarative/util/qmlspringfollow.cpp b/src/declarative/util/qmlspringfollow.cpp index 29dcf91..764d7f9 100644 --- a/src/declarative/util/qmlspringfollow.cpp +++ b/src/declarative/util/qmlspringfollow.cpp @@ -200,7 +200,7 @@ void QmlSpringFollowPrivate::start() property.write(currentValue); } else if (sourceValue != currentValue && clock.state() != QAbstractAnimation::Running) { lastTime = 0; - currentValue = property.read().toDouble(); + currentValue = property.read().toReal(); clock.start(); // infinity?? emit q->syncChanged(); } @@ -258,7 +258,7 @@ void QmlSpringFollow::setTarget(const QmlMetaProperty &property) { Q_D(QmlSpringFollow); d->property = property; - d->currentValue = property.read().toDouble(); + d->currentValue = property.read().toReal(); } qreal QmlSpringFollow::sourceValue() const diff --git a/src/declarative/util/qmlsystempalette.cpp b/src/declarative/util/qmlsystempalette.cpp index d43a971..39d8f3e 100644 --- a/src/declarative/util/qmlsystempalette.cpp +++ b/src/declarative/util/qmlsystempalette.cpp @@ -80,7 +80,7 @@ QmlSystemPalette::QmlSystemPalette(QObject *parent) : QObject(*(new QmlSystemPalettePrivate), parent) { Q_D(QmlSystemPalette); - d->palette = qApp->palette(); + d->palette = QApplication::palette(); d->group = QPalette::Active; qApp->installEventFilter(this); } @@ -293,7 +293,7 @@ bool QmlSystemPalette::event(QEvent *event) { Q_D(QmlSystemPalette); if (event->type() == QEvent::ApplicationPaletteChange) { - d->palette = qApp->palette(); + d->palette = QApplication::palette(); emit paletteChanged(); return true; } diff --git a/src/declarative/util/qmlxmllistmodel.cpp b/src/declarative/util/qmlxmllistmodel.cpp index 6f8da9c..46ef739 100644 --- a/src/declarative/util/qmlxmllistmodel.cpp +++ b/src/declarative/util/qmlxmllistmodel.cpp @@ -259,7 +259,7 @@ void QmlXmlQuery::doQueryJob() QXmlResultItems result; QXmlQuery countquery; countquery.bindVariable(QLatin1String("inputDocument"), &b); - countquery.setQuery(namespaces + QLatin1String("count(") + prefix + QLatin1String(")")); + countquery.setQuery(namespaces + QLatin1String("count(") + prefix + QLatin1Char(')')); countquery.evaluateTo(&result); QXmlItem item(result.next()); if (item.isAtomicValue()) @@ -267,7 +267,7 @@ void QmlXmlQuery::doQueryJob() } //qDebug() << count; - m_prefix = namespaces + prefix + QLatin1String("/"); + m_prefix = namespaces + prefix + QLatin1Char('/'); m_data = xml; if (count > 0) m_size = count; |