summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorAlan Alpert <aalpert@rim.com>2012-12-08 11:03:03 -0800
committerThe Qt Project <gerrit-noreply@qt-project.org>2012-12-19 00:50:18 +0100
commit70628a44fa1c9a67d2de75a470eaccd8521747fc (patch)
tree63186367d3127d943ed37fca20d4ac1dac40ef3a
parent163b008b7531c3d5ed2b4f0403603ab4949eeb99 (diff)
Specify better increment for captured properties
There aren't that many captured properties, decreasing the increment will give better performance. Change-Id: Iddb17c695eda5513f2d038123f4c886e559d8f6a Reviewed-by: Christopher Adams <chris.adams@jollamobile.com>
-rw-r--r--src/declarative/qml/qdeclarativeengine_p.h2
-rw-r--r--src/declarative/qml/qdeclarativeexpression.cpp4
-rw-r--r--src/declarative/qml/qdeclarativeexpression_p.h2
3 files changed, 4 insertions, 4 deletions
diff --git a/src/declarative/qml/qdeclarativeengine_p.h b/src/declarative/qml/qdeclarativeengine_p.h
index cc1d5520..4f22b94d 100644
--- a/src/declarative/qml/qdeclarativeengine_p.h
+++ b/src/declarative/qml/qdeclarativeengine_p.h
@@ -157,7 +157,7 @@ public:
int notifyIndex;
};
bool captureProperties;
- QPODVector<CapturedProperty> capturedProperties;
+ QPODVector<CapturedProperty, 16> capturedProperties;
QDeclarativeContext *rootContext;
bool isDebugging;
diff --git a/src/declarative/qml/qdeclarativeexpression.cpp b/src/declarative/qml/qdeclarativeexpression.cpp
index b52a0748..58897c9e 100644
--- a/src/declarative/qml/qdeclarativeexpression.cpp
+++ b/src/declarative/qml/qdeclarativeexpression.cpp
@@ -460,7 +460,7 @@ QScriptValue QDeclarativeQtScriptExpression::scriptValue(QObject *secondaryScope
QDeclarativeEnginePrivate *ep = QDeclarativeEnginePrivate::get(context()->engine);
bool lastCaptureProperties = ep->captureProperties;
- QPODVector<QDeclarativeEnginePrivate::CapturedProperty> lastCapturedProperties;
+ QPODVector<QDeclarativeEnginePrivate::CapturedProperty, 16> lastCapturedProperties;
ep->captureProperties = trackChange;
ep->capturedProperties.copyAndClear(lastCapturedProperties);
@@ -539,7 +539,7 @@ QScriptValue QDeclarativeQtScriptExpression::eval(QObject *secondaryScope, bool
}
}
-void QDeclarativeQtScriptExpression::updateGuards(const QPODVector<QDeclarativeEnginePrivate::CapturedProperty> &properties)
+void QDeclarativeQtScriptExpression::updateGuards(const QPODVector<QDeclarativeEnginePrivate::CapturedProperty, 16> &properties)
{
Q_ASSERT(guardObject);
Q_ASSERT(guardObjectNotifyIndex != -1);
diff --git a/src/declarative/qml/qdeclarativeexpression_p.h b/src/declarative/qml/qdeclarativeexpression_p.h
index 6e8df8ae..402ae846 100644
--- a/src/declarative/qml/qdeclarativeexpression_p.h
+++ b/src/declarative/qml/qdeclarativeexpression_p.h
@@ -153,7 +153,7 @@ public:
private:
void clearGuards();
QScriptValue eval(QObject *secondaryScope, bool *isUndefined);
- void updateGuards(const QPODVector<QDeclarativeEnginePrivate::CapturedProperty> &properties);
+ void updateGuards(const QPODVector<QDeclarativeEnginePrivate::CapturedProperty, 16> &properties);
bool trackChange;