summaryrefslogtreecommitdiffstats
path: root/src/declarative/qml/qdeclarativecomponent.cpp
diff options
context:
space:
mode:
authorAaron Kennedy <aaron.kennedy@nokia.com>2010-05-27 05:21:28 (GMT)
committerAaron Kennedy <aaron.kennedy@nokia.com>2010-05-27 05:21:28 (GMT)
commitf1603f8a4bd3027be201920fa99c9370264bee03 (patch)
tree802dc659bf52592e6da581d02b11c45896bfa986 /src/declarative/qml/qdeclarativecomponent.cpp
parent5a6a5b1b83e2196b4cad11fbb0f175682b6f7e8e (diff)
downloadQt-f1603f8a4bd3027be201920fa99c9370264bee03.zip
Qt-f1603f8a4bd3027be201920fa99c9370264bee03.tar.gz
Qt-f1603f8a4bd3027be201920fa99c9370264bee03.tar.bz2
Improve QML framerate debugging
Diffstat (limited to 'src/declarative/qml/qdeclarativecomponent.cpp')
-rw-r--r--src/declarative/qml/qdeclarativecomponent.cpp8
1 files changed, 8 insertions, 0 deletions
diff --git a/src/declarative/qml/qdeclarativecomponent.cpp b/src/declarative/qml/qdeclarativecomponent.cpp
index 7aa17e8..2dc2d2d 100644
--- a/src/declarative/qml/qdeclarativecomponent.cpp
+++ b/src/declarative/qml/qdeclarativecomponent.cpp
@@ -53,6 +53,7 @@
#include "private/qdeclarativebinding_p_p.h"
#include "private/qdeclarativeglobal_p.h"
#include "private/qdeclarativescriptparser_p.h"
+#include "private/qdeclarativedebugtiming_p.h"
#include <QStack>
#include <QStringList>
@@ -693,6 +694,10 @@ QDeclarativeComponentPrivate::beginCreate(QDeclarativeContextData *context, cons
QDeclarativeEnginePrivate *ep = QDeclarativeEnginePrivate::get(engine);
+ bool isRoot = !ep->inBeginCreate;
+ if (isRoot)
+ QDeclarativeDebugTiming::startRange(QDeclarativeDebugTiming::Creating);
+
QDeclarativeContextData *ctxt = new QDeclarativeContextData;
ctxt->isInternal = true;
ctxt->url = cc->url;
@@ -839,6 +844,7 @@ void QDeclarativeComponentPrivate::complete(QDeclarativeEnginePrivate *enginePri
enginePriv->erroredBindings->removeError();
}
}
+
}
}
@@ -860,6 +866,8 @@ void QDeclarativeComponentPrivate::completeCreate()
if (state.completePending) {
QDeclarativeEnginePrivate *ep = QDeclarativeEnginePrivate::get(engine);
complete(ep, &state);
+
+ QDeclarativeDebugTiming::endRange(QDeclarativeDebugTiming::Creating);
}
}