summaryrefslogtreecommitdiffstats
path: root/src/declarative
diff options
context:
space:
mode:
Diffstat (limited to 'src/declarative')
-rw-r--r--src/declarative/graphicsitems/qdeclarativeflickable.cpp25
-rw-r--r--src/declarative/graphicsitems/qdeclarativeflickable_p.h1
-rw-r--r--src/declarative/graphicsitems/qdeclarativeflickable_p_p.h13
-rw-r--r--src/declarative/graphicsitems/qdeclarativetextlayout.cpp2
-rw-r--r--src/declarative/qml/qdeclarativepropertycache.cpp58
5 files changed, 56 insertions, 43 deletions
diff --git a/src/declarative/graphicsitems/qdeclarativeflickable.cpp b/src/declarative/graphicsitems/qdeclarativeflickable.cpp
index 001abca..2e5a43d 100644
--- a/src/declarative/graphicsitems/qdeclarativeflickable.cpp
+++ b/src/declarative/graphicsitems/qdeclarativeflickable.cpp
@@ -85,7 +85,11 @@ qreal QDeclarativeFlickableVisibleArea::yPosition() const
void QDeclarativeFlickableVisibleArea::updateVisible()
{
QDeclarativeFlickablePrivate *p = static_cast<QDeclarativeFlickablePrivate *>(QGraphicsItemPrivate::get(flickable));
- bool pageChange = false;
+
+ bool changeX = false;
+ bool changeY = false;
+ bool changeWidth = false;
+ bool changeHeight = false;
// Vertical
const qreal viewheight = flickable->height();
@@ -95,11 +99,11 @@ void QDeclarativeFlickableVisibleArea::updateVisible()
if (pageSize != m_heightRatio) {
m_heightRatio = pageSize;
- pageChange = true;
+ changeHeight = true;
}
if (pagePos != m_yPosition) {
m_yPosition = pagePos;
- pageChange = true;
+ changeY = true;
}
// Horizontal
@@ -110,14 +114,21 @@ void QDeclarativeFlickableVisibleArea::updateVisible()
if (pageSize != m_widthRatio) {
m_widthRatio = pageSize;
- pageChange = true;
+ changeWidth = true;
}
if (pagePos != m_xPosition) {
m_xPosition = pagePos;
- pageChange = true;
+ changeX = true;
}
- if (pageChange)
- emit pageChanged();
+
+ if (changeX)
+ emit xPositionChanged(m_xPosition);
+ if (changeY)
+ emit yPositionChanged(m_yPosition);
+ if (changeWidth)
+ emit widthRatioChanged(m_widthRatio);
+ if (changeHeight)
+ emit heightRatioChanged(m_heightRatio);
}
diff --git a/src/declarative/graphicsitems/qdeclarativeflickable_p.h b/src/declarative/graphicsitems/qdeclarativeflickable_p.h
index 44f2bcf..4fb9c25 100644
--- a/src/declarative/graphicsitems/qdeclarativeflickable_p.h
+++ b/src/declarative/graphicsitems/qdeclarativeflickable_p.h
@@ -163,7 +163,6 @@ Q_SIGNALS:
void horizontalVelocityChanged();
void verticalVelocityChanged();
void isAtBoundaryChanged();
- void pageChanged();
void flickableDirectionChanged();
void interactiveChanged();
void boundsBehaviorChanged();
diff --git a/src/declarative/graphicsitems/qdeclarativeflickable_p_p.h b/src/declarative/graphicsitems/qdeclarativeflickable_p_p.h
index beee741..afefde2 100644
--- a/src/declarative/graphicsitems/qdeclarativeflickable_p_p.h
+++ b/src/declarative/graphicsitems/qdeclarativeflickable_p_p.h
@@ -182,10 +182,10 @@ class QDeclarativeFlickableVisibleArea : public QObject
{
Q_OBJECT
- Q_PROPERTY(qreal xPosition READ xPosition NOTIFY pageChanged)
- Q_PROPERTY(qreal yPosition READ yPosition NOTIFY pageChanged)
- Q_PROPERTY(qreal widthRatio READ widthRatio NOTIFY pageChanged)
- Q_PROPERTY(qreal heightRatio READ heightRatio NOTIFY pageChanged)
+ Q_PROPERTY(qreal xPosition READ xPosition NOTIFY xPositionChanged)
+ Q_PROPERTY(qreal yPosition READ yPosition NOTIFY yPositionChanged)
+ Q_PROPERTY(qreal widthRatio READ widthRatio NOTIFY widthRatioChanged)
+ Q_PROPERTY(qreal heightRatio READ heightRatio NOTIFY heightRatioChanged)
public:
QDeclarativeFlickableVisibleArea(QDeclarativeFlickable *parent=0);
@@ -198,7 +198,10 @@ public:
void updateVisible();
signals:
- void pageChanged();
+ void xPositionChanged(qreal xPosition);
+ void yPositionChanged(qreal yPosition);
+ void widthRatioChanged(qreal widthRatio);
+ void heightRatioChanged(qreal heightRatio);
private:
QDeclarativeFlickable *flickable;
diff --git a/src/declarative/graphicsitems/qdeclarativetextlayout.cpp b/src/declarative/graphicsitems/qdeclarativetextlayout.cpp
index e8b5fb2..89a2158 100644
--- a/src/declarative/graphicsitems/qdeclarativetextlayout.cpp
+++ b/src/declarative/graphicsitems/qdeclarativetextlayout.cpp
@@ -321,7 +321,7 @@ void QDeclarativeTextLayout::draw(QPainter *painter, const QPointF &p)
priv->extended->type() == QPaintEngine::OpenVG ||
priv->extended->type() == QPaintEngine::OpenGL);
- if (!paintEngineSupportsTransformations) {
+ if (!paintEngineSupportsTransformations || !priv->state->matrix.isAffine()) {
QTextLayout::draw(painter, p);
return;
}
diff --git a/src/declarative/qml/qdeclarativepropertycache.cpp b/src/declarative/qml/qdeclarativepropertycache.cpp
index 91aaaa4..0adcdbd 100644
--- a/src/declarative/qml/qdeclarativepropertycache.cpp
+++ b/src/declarative/qml/qdeclarativepropertycache.cpp
@@ -236,35 +236,6 @@ void QDeclarativePropertyCache::append(QDeclarativeEngine *engine, const QMetaOb
{
QDeclarativeEnginePrivate *enginePriv = QDeclarativeEnginePrivate::get(engine);
- int propCount = metaObject->propertyCount();
- int propOffset = metaObject->propertyOffset();
-
- indexCache.resize(propCount);
- for (int ii = propOffset; ii < propCount; ++ii) {
- QMetaProperty p = metaObject->property(ii);
- if (!p.isScriptable())
- continue;
-
- QString propName = QString::fromUtf8(p.name());
-
- RData *data = new RData;
- data->identifier = enginePriv->objectClass->createPersistentIdentifier(propName);
- indexCache[ii] = data;
-
- data->load(p, engine);
- data->flags |= propertyFlags;
-
- if (stringCache.contains(propName)) {
- stringCache[propName]->release();
- identifierCache[data->identifier.identifier]->release();
- }
-
- stringCache.insert(propName, data);
- identifierCache.insert(data->identifier.identifier, data);
- data->addref();
- data->addref();
- }
-
int methodCount = metaObject->methodCount();
// 3 to block the destroyed signal and the deleteLater() slot
int methodOffset = qMax(3, metaObject->methodOffset());
@@ -304,6 +275,35 @@ void QDeclarativePropertyCache::append(QDeclarativeEngine *engine, const QMetaOb
data->addref();
data->addref();
}
+
+ int propCount = metaObject->propertyCount();
+ int propOffset = metaObject->propertyOffset();
+
+ indexCache.resize(propCount);
+ for (int ii = propOffset; ii < propCount; ++ii) {
+ QMetaProperty p = metaObject->property(ii);
+ if (!p.isScriptable())
+ continue;
+
+ QString propName = QString::fromUtf8(p.name());
+
+ RData *data = new RData;
+ data->identifier = enginePriv->objectClass->createPersistentIdentifier(propName);
+ indexCache[ii] = data;
+
+ data->load(p, engine);
+ data->flags |= propertyFlags;
+
+ if (stringCache.contains(propName)) {
+ stringCache[propName]->release();
+ identifierCache[data->identifier.identifier]->release();
+ }
+
+ stringCache.insert(propName, data);
+ identifierCache.insert(data->identifier.identifier, data);
+ data->addref();
+ data->addref();
+ }
}
void QDeclarativePropertyCache::updateRecur(QDeclarativeEngine *engine, const QMetaObject *metaObject)