summaryrefslogtreecommitdiffstats
path: root/src/declarative/qml/qmlcomponent.cpp
diff options
context:
space:
mode:
authorAaron Kennedy <aaron.kennedy@nokia.com>2009-05-11 01:36:57 (GMT)
committerAaron Kennedy <aaron.kennedy@nokia.com>2009-05-11 01:36:57 (GMT)
commit738fe5730a55279bf3c033bad7317768d81f40af (patch)
tree1b1c8df3ed26aa338008df672529d0aa228c93a0 /src/declarative/qml/qmlcomponent.cpp
parentac19c9a30a47bfe8b374d390525b06ebdb26b4ca (diff)
downloadQt-738fe5730a55279bf3c033bad7317768d81f40af.zip
Qt-738fe5730a55279bf3c033bad7317768d81f40af.tar.gz
Qt-738fe5730a55279bf3c033bad7317768d81f40af.tar.bz2
Handle QmlParserStatus's and QmlBindableValeus being deleted during component creation
Diffstat (limited to 'src/declarative/qml/qmlcomponent.cpp')
-rw-r--r--src/declarative/qml/qmlcomponent.cpp40
1 files changed, 29 insertions, 11 deletions
diff --git a/src/declarative/qml/qmlcomponent.cpp b/src/declarative/qml/qmlcomponent.cpp
index 027c2a8..da8f26d 100644
--- a/src/declarative/qml/qmlcomponent.cpp
+++ b/src/declarative/qml/qmlcomponent.cpp
@@ -171,6 +171,11 @@ QmlComponent::~QmlComponent()
}
if (d->cc)
d->cc->release();
+
+ for(int ii = 0; ii < d->bindValues.count(); ++ii)
+ QmlEnginePrivate::clear(d->bindValues[ii]);
+ for(int ii = 0; ii < d->parserStatus.count(); ++ii)
+ QmlEnginePrivate::clear(d->parserStatus[ii]);
}
/*!
@@ -483,10 +488,10 @@ QObject *QmlComponent::beginCreate(QmlContext *context)
if (ep->rootComponent == this) {
ep->rootComponent = 0;
- d->bindValues = ep->currentBindValues;
- d->parserStatus = ep->currentParserStatus;
- ep->currentBindValues.clear();
- ep->currentParserStatus.clear();
+ d->bindValues = ep->bindValues;
+ d->parserStatus = ep->parserStatus;
+ ep->bindValues.clear();
+ ep->parserStatus.clear();
d->completePending = true;
}
} else {
@@ -511,16 +516,29 @@ void QmlComponent::completeCreate()
#ifdef Q_ENABLE_PERFORMANCE_LOG
QFxPerfTimer<QFxPerf::BindInit> bi;
#endif
- for (int ii = 0; ii < d->bindValues.count(); ++ii)
- d->bindValues.at(ii)->init();
+ for (int ii = 0; ii < d->bindValues.count(); ++ii) {
+ QmlEnginePrivate::SimpleList<QmlBindableValue> bv =
+ d->bindValues.at(ii);
+ for (int jj = 0; jj < bv.count; ++jj) {
+ if(bv.at(jj))
+ bv.at(jj)->init();
+ }
+ QmlEnginePrivate::clear(bv);
+ }
}
- QSet<QmlParserStatus *> done;
+
for (int ii = 0; ii < d->parserStatus.count(); ++ii) {
- QmlParserStatus *ps = d->parserStatus.at(ii);
- if (!done.contains(ps)) {
- done.insert(ps);
- ps->componentComplete();
+ QmlEnginePrivate::SimpleList<QmlParserStatus> ps =
+ d->parserStatus.at(ii);
+
+ for (int jj = 0; jj < ps.count; ++jj) {
+ QmlParserStatus *status = ps.at(jj);
+ if (status && status->d) {
+ status->d = 0;
+ status->componentComplete();
+ }
}
+ QmlEnginePrivate::clear(ps);
}
d->bindValues.clear();
ss='column6'>| | | | | | | | | | | | | | | | This makes the case where there is text under the icons in toolbuttons and the title and toolbar is not unified on Mac. This was a regression against Qt 4.5.x Reviewed-by: jbache | | * Doc: Removed promisse to fix a problemMorten Engvoldsen2010-02-041-2/+1 | | | | | | | | | | | | | | | | | | | | | The problem is out of scope and will not be fixed. Task-number:QTBUG-4377 Reviewed-by:Trust Me | | * Improve raster graphics system performance on Mac (second try).Morten Johan Sørvig2010-02-048-9/+66 | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | This fixes the qmlviewer "sluggish animations and lost mouse events" issue by making sure we don't block and wait for for the screen refresh when flushing the backing store to the screen. NB: This commit fixes build issues found in f5f62c0bed. Review: msorvig Details: - Don't force repaints, flush the backingstore in response to a Cocoa paint/display events only. - Flush once per window. - Get the CGContext from the window (don't create a new one) - Don't call CGContextiFlush on the context. | | * I10n: Use 'real' Linguist comments in Phonon::EnvironmentalReverbFriedemann Kleint2010-02-041-31/+22 | | | | | | | | | | | | Reviewed-by: Oswald Buddenhagen <oswald.buddenhagen@nokia.com> * | | Merge branch '4.6' of scm.dev.nokia.troll.no:qt/berlin-staging-1 into ↵Qt Continuous Integration System2010-02-041-2/+3 |\ \ \ | |/ / |/| | | | | | | | | | | | | | 4.6-integration * '4.6' of scm.dev.nokia.troll.no:qt/berlin-staging-1: uic: Fixed code generating setCentralWidget()-calls of QMainWindow. | * | Merge branch '4.6' of scm.dev.nokia.troll.no:qt/berlin-staging-1 into ↵Qt Continuous Integration System2010-02-041-2/+3 | |\ \ | | |/ | |/| | | | | | | | | | | | | 4.6-integration * '4.6' of scm.dev.nokia.troll.no:qt/berlin-staging-1: uic: Fixed code generating setCentralWidget()-calls of QMainWindow. | | * uic: Fixed code generating setCentralWidget()-calls of QMainWindow.Friedemann Kleint2010-02-041-2/+3 | | | | | | | | | | | | | | | | | | | | | | | | | | | Regression introduced by QTBUG-5824 change 6809bd020e3307324e136707f32f6f17f77b9591. Do not generate setCentralWidget() for Qt3Support toolbar/dock widget classes. Reviewed-by: ogoffart <olivier.goffart@nokia.com> Task-number: QTBUG-7612 * | | Flush the WSERV command buffer after deleting a surface.Jason Barron2010-02-042-0/+7 | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | For graphics systems that use EGL surfaces in the backing store destroying the surface does not guarantee that the memory is immediately freed because this command does not cause a flush. This implies that a manual flush is instead needed. We do this in 2 places; the first is when the surface is destroyed due to a visibility changed. The second case is just after the window has been destroyed. At this point the backing store has already been deleted so the deletion of both the surface and window can happen atomically in WSERV. Task-number: QT-2506 Reviewed-by: Iain * | | Fix crash when multiple screens are reported from HAL.Jason Barron2010-02-041-11/+7 | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | The support for multiple screens is not implemented yet in Qt on the Symbian platform, so there is really no need to query the HAL for the value since the additional screens can't be used yet anyway. The crash here occured when the HAL returned more than 1 screen, but the arrays were resized to contain one element. The loop in resizeEvent() was iterating past the end of the array because it thought there were more screens than the arrays did. Reviewed-by: axis * | | Initial support for S60 softkey icons.Janne Anttila2010-02-043-25/+180 | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | The logic for resolving the icon size in landscape mode for S60 5.0 (5800XM) is somewhat fragile, but better way is not yet know. Also the 50% transparent mask what CBA implementation tries to create for pressed down CB Abuttons fails for some reason. When button is pressed down there are drawing artifacts in softkey images. These issues will be tried to resolve with later commits Task-number: QTBUG-7314 Review-By: Sami Merila * | | Merge branch '4.6' of scm.dev.nokia.troll.no:qt/qt-s60-public into 4.6Janne Koskinen2010-02-0425-46/+90 |\ \ \ | |/ / | * | Merge branch '4.6' of scm.dev.nokia.troll.no:qt/qt-s60-public into ↵Qt Continuous Integration System2010-02-04