summaryrefslogtreecommitdiffstats
path: root/src
diff options
context:
space:
mode:
authorMartin Jones <martin.jones@nokia.com>2010-03-22 04:11:01 (GMT)
committerMartin Jones <martin.jones@nokia.com>2010-03-22 04:11:01 (GMT)
commit563cd3b737d8ccfa02db536debd077b8b92e9aa4 (patch)
treee8e7edfd7034ae822c51670350e47090a9b3c19b /src
parentc1958338bb94f045c846147bdb7224377a2122a6 (diff)
parente338b7efadc24619129e421aea31e06b948b0f12 (diff)
downloadQt-563cd3b737d8ccfa02db536debd077b8b92e9aa4.zip
Qt-563cd3b737d8ccfa02db536debd077b8b92e9aa4.tar.gz
Qt-563cd3b737d8ccfa02db536debd077b8b92e9aa4.tar.bz2
Merge branch '4.7' of scm.dev.nokia.troll.no:qt/qt-qml into 4.7
Diffstat (limited to 'src')
-rw-r--r--src/declarative/graphicsitems/qdeclarativeitem.cpp5
-rw-r--r--src/declarative/graphicsitems/qdeclarativepath.cpp5
-rw-r--r--src/declarative/graphicsitems/qdeclarativepositioners.cpp4
-rw-r--r--src/declarative/graphicsitems/qdeclarativetext.cpp8
-rw-r--r--src/declarative/graphicsitems/qdeclarativetextedit.cpp2
-rw-r--r--src/declarative/qml/qdeclarativebinding.cpp5
-rw-r--r--src/declarative/qml/qdeclarativecompiler.cpp6
-rw-r--r--src/declarative/qml/qdeclarativecomponent.cpp2
-rw-r--r--src/declarative/qml/qdeclarativeengine.cpp2
-rw-r--r--src/declarative/qml/qdeclarativeexpression.cpp8
-rw-r--r--src/declarative/qml/qdeclarativeparser.cpp2
-rw-r--r--src/declarative/qml/qdeclarativescriptparser.cpp5
-rw-r--r--src/declarative/qml/qdeclarativevme.cpp3
-rw-r--r--src/declarative/util/qdeclarativeanimation_p.h2
-rw-r--r--src/declarative/util/qdeclarativepixmapcache.cpp2
-rw-r--r--src/declarative/util/qdeclarativestateoperations.cpp5
-rw-r--r--src/declarative/util/qdeclarativeutilmodule.cpp2
-rw-r--r--src/declarative/util/qdeclarativeview.cpp12
-rw-r--r--src/declarative/util/qfxperf.cpp67
-rw-r--r--src/declarative/util/qfxperf_p_p.h90
-rw-r--r--src/declarative/util/qperformancelog.cpp181
-rw-r--r--src/declarative/util/qperformancelog_p_p.h141
-rw-r--r--src/declarative/util/util.pri4
-rw-r--r--src/imports/particles/qdeclarativeparticles.cpp4
24 files changed, 5 insertions, 562 deletions
diff --git a/src/declarative/graphicsitems/qdeclarativeitem.cpp b/src/declarative/graphicsitems/qdeclarativeitem.cpp
index 4ba80ad..9b1bdba 100644
--- a/src/declarative/graphicsitems/qdeclarativeitem.cpp
+++ b/src/declarative/graphicsitems/qdeclarativeitem.cpp
@@ -45,7 +45,6 @@
#include "qdeclarativeevents_p_p.h"
#include <private/qdeclarativeengine_p.h>
-#include <qfxperf_p_p.h>
#include <qdeclarativeengine.h>
#include <qdeclarativeopenmetaobject_p.h>
#include <qdeclarativestate_p.h>
@@ -2491,10 +2490,6 @@ void QDeclarativeItem::classBegin()
*/
void QDeclarativeItem::componentComplete()
{
-#ifdef Q_ENABLE_PERFORMANCE_LOG
- QDeclarativePerfTimer<QDeclarativePerf::ItemComponentComplete> cc;
-#endif
-
Q_D(QDeclarativeItem);
d->_componentComplete = true;
if (d->_stateGroup)
diff --git a/src/declarative/graphicsitems/qdeclarativepath.cpp b/src/declarative/graphicsitems/qdeclarativepath.cpp
index 80586b8..20fa983 100644
--- a/src/declarative/graphicsitems/qdeclarativepath.cpp
+++ b/src/declarative/graphicsitems/qdeclarativepath.cpp
@@ -42,8 +42,6 @@
#include "qdeclarativepath_p.h"
#include "qdeclarativepath_p_p.h"
-#include <qfxperf_p_p.h>
-
#include <QSet>
#include <private/qbezier_p.h>
@@ -356,9 +354,6 @@ static inline QBezier nextBezier(const QPainterPath &path, int *from, qreal *bez
void QDeclarativePath::createPointCache() const
{
Q_D(const QDeclarativePath);
-#ifdef Q_ENABLE_PERFORMANCE_LOG
- QDeclarativePerfTimer<QDeclarativePerf::QDeclarativePathViewPathCache> pc;
-#endif
qreal pathLength = d->_path.length();
const int points = int(pathLength*2);
const int lastElement = d->_path.elementCount() - 1;
diff --git a/src/declarative/graphicsitems/qdeclarativepositioners.cpp b/src/declarative/graphicsitems/qdeclarativepositioners.cpp
index 3391ac9..ded58f5 100644
--- a/src/declarative/graphicsitems/qdeclarativepositioners.cpp
+++ b/src/declarative/graphicsitems/qdeclarativepositioners.cpp
@@ -46,7 +46,6 @@
#include <qdeclarativestate_p.h>
#include <qdeclarativestategroup_p.h>
#include <qdeclarativestateoperations_p.h>
-#include <qfxperf_p_p.h>
#include <QtCore/qmath.h>
#include <QDebug>
@@ -164,9 +163,6 @@ void QDeclarativeBasePositioner::componentComplete()
{
Q_D(QDeclarativeBasePositioner);
QDeclarativeItem::componentComplete();
-#ifdef Q_ENABLE_PERFORMANCE_LOG
- QDeclarativePerfTimer<QDeclarativePerf::BasepositionerComponentComplete> cc;
-#endif
positionedItems.reserve(d->QGraphicsItemPrivate::children.count());
prePositioning();
}
diff --git a/src/declarative/graphicsitems/qdeclarativetext.cpp b/src/declarative/graphicsitems/qdeclarativetext.cpp
index 05139f6..b0b5f6d 100644
--- a/src/declarative/graphicsitems/qdeclarativetext.cpp
+++ b/src/declarative/graphicsitems/qdeclarativetext.cpp
@@ -43,8 +43,6 @@
#include "qdeclarativetext_p_p.h"
#include <qdeclarativestyledtext_p.h>
-#include <qfxperf_p_p.h>
-
#include <QTextLayout>
#include <QTextLine>
#include <QTextDocument>
@@ -152,9 +150,6 @@ void QDeclarativeText::setFont(const QFont &font)
void QDeclarativeText::setText(const QString &n)
{
-#ifdef Q_ENABLE_PERFORMANCE_LOG
- QDeclarativePerfTimer<QDeclarativePerf::QDeclarativeText_setText> st;
-#endif
Q_D(QDeclarativeText);
if (d->text == n)
return;
@@ -876,9 +871,6 @@ void QDeclarativeText::paint(QPainter *p, const QStyleOptionGraphicsItem *, QWid
void QDeclarativeText::componentComplete()
{
Q_D(QDeclarativeText);
-#ifdef Q_ENABLE_PERFORMANCE_LOG
- QDeclarativePerfTimer<QDeclarativePerf::TextComponentComplete> cc;
-#endif
QDeclarativeItem::componentComplete();
if (d->dirty) {
d->updateLayout();
diff --git a/src/declarative/graphicsitems/qdeclarativetextedit.cpp b/src/declarative/graphicsitems/qdeclarativetextedit.cpp
index dbae47d..7dacfbb 100644
--- a/src/declarative/graphicsitems/qdeclarativetextedit.cpp
+++ b/src/declarative/graphicsitems/qdeclarativetextedit.cpp
@@ -44,8 +44,6 @@
#include "qdeclarativeevents_p_p.h"
-#include <qfxperf_p_p.h>
-
#include <QTextLayout>
#include <QTextLine>
#include <QTextDocument>
diff --git a/src/declarative/qml/qdeclarativebinding.cpp b/src/declarative/qml/qdeclarativebinding.cpp
index 090bd5b..a7047ab 100644
--- a/src/declarative/qml/qdeclarativebinding.cpp
+++ b/src/declarative/qml/qdeclarativebinding.cpp
@@ -49,8 +49,6 @@
#include "qdeclarativedeclarativedata_p.h"
#include "qdeclarativestringconverters_p.h"
-#include <qfxperf_p_p.h>
-
#include <QVariant>
#include <QtCore/qdebug.h>
@@ -126,9 +124,6 @@ void QDeclarativeBinding::update(QDeclarativePropertyPrivate::WriteFlags flags)
{
Q_D(QDeclarativeBinding);
-#ifdef Q_ENABLE_PERFORMANCE_LOG
- QDeclarativePerfTimer<QDeclarativePerf::BindableValueUpdate> bu;
-#endif
QDeclarativeBindingData *data = d->bindingData();
if (!data->enabled)
diff --git a/src/declarative/qml/qdeclarativecompiler.cpp b/src/declarative/qml/qdeclarativecompiler.cpp
index 42d2950..103e918 100644
--- a/src/declarative/qml/qdeclarativecompiler.cpp
+++ b/src/declarative/qml/qdeclarativecompiler.cpp
@@ -67,8 +67,6 @@
#include "qdeclarativecompiledbindings_p.h"
#include "qdeclarativeglobalscriptclass_p.h"
-#include <qfxperf_p_p.h>
-
#include <QCoreApplication>
#include <QColor>
#include <QDebug>
@@ -77,6 +75,7 @@
#include <QRectF>
#include <QAtomicInt>
#include <QtCore/qdebug.h>
+#include <QtCore/qdatetime.h>
QT_BEGIN_NAMESPACE
@@ -546,9 +545,6 @@ bool QDeclarativeCompiler::compile(QDeclarativeEngine *engine,
QDeclarativeCompositeTypeData *unit,
QDeclarativeCompiledData *out)
{
-#ifdef Q_ENABLE_PERFORMANCE_LOG
- QDeclarativePerfTimer<QDeclarativePerf::Compilation> pc;
-#endif
exceptions.clear();
Q_ASSERT(out);
diff --git a/src/declarative/qml/qdeclarativecomponent.cpp b/src/declarative/qml/qdeclarativecomponent.cpp
index 8922751..ec595e3 100644
--- a/src/declarative/qml/qdeclarativecomponent.cpp
+++ b/src/declarative/qml/qdeclarativecomponent.cpp
@@ -54,8 +54,6 @@
#include "qdeclarativeglobal_p.h"
#include "qdeclarativescriptparser_p.h"
-#include <qfxperf_p_p.h>
-
#include <QStack>
#include <QStringList>
#include <QFileInfo>
diff --git a/src/declarative/qml/qdeclarativeengine.cpp b/src/declarative/qml/qdeclarativeengine.cpp
index f49b17d..5820961 100644
--- a/src/declarative/qml/qdeclarativeengine.cpp
+++ b/src/declarative/qml/qdeclarativeengine.cpp
@@ -69,8 +69,6 @@
#include "qdeclarativelist_p.h"
#include "qdeclarativetypenamecache_p.h"
-#include <qfxperf_p_p.h>
-
#include <QtCore/qmetaobject.h>
#include <QScriptClass>
#include <QNetworkReply>
diff --git a/src/declarative/qml/qdeclarativeexpression.cpp b/src/declarative/qml/qdeclarativeexpression.cpp
index 9eed345..b7ee3a4 100644
--- a/src/declarative/qml/qdeclarativeexpression.cpp
+++ b/src/declarative/qml/qdeclarativeexpression.cpp
@@ -353,10 +353,6 @@ void QDeclarativeExpressionPrivate::exceptionToError(QScriptEngine *scriptEngine
QVariant QDeclarativeExpressionPrivate::evalQtScript(QObject *secondaryScope, bool *isUndefined)
{
-#ifdef Q_ENABLE_PERFORMANCE_LOG
- QDeclarativePerfTimer<QDeclarativePerf::BindValueQt> perfqt;
-#endif
-
QDeclarativeExpressionData *data = this->data;
QDeclarativeEngine *engine = data->context()->engine;
QDeclarativeEnginePrivate *ep = QDeclarativeEnginePrivate::get(engine);
@@ -466,10 +462,6 @@ QVariant QDeclarativeExpressionPrivate::value(QObject *secondaryScope, bool *isU
if (data->expression.isEmpty())
return rv;
-#ifdef Q_ENABLE_PERFORMANCE_LOG
- QDeclarativePerfTimer<QDeclarativePerf::BindValue> perf;
-#endif
-
QDeclarativeEnginePrivate *ep = QDeclarativeEnginePrivate::get(q->engine());
QDeclarativeExpression *lastCurrentExpression = ep->currentExpression;
diff --git a/src/declarative/qml/qdeclarativeparser.cpp b/src/declarative/qml/qdeclarativeparser.cpp
index 51f1660..6e6080e 100644
--- a/src/declarative/qml/qdeclarativeparser.cpp
+++ b/src/declarative/qml/qdeclarativeparser.cpp
@@ -52,8 +52,6 @@
#include "parser/qdeclarativejsast_p.h"
#include "parser/qdeclarativejsengine_p.h"
-#include <qfxperf_p_p.h>
-
#include <QStack>
#include <QColor>
#include <QPointF>
diff --git a/src/declarative/qml/qdeclarativescriptparser.cpp b/src/declarative/qml/qdeclarativescriptparser.cpp
index fe516c5..2578ff4 100644
--- a/src/declarative/qml/qdeclarativescriptparser.cpp
+++ b/src/declarative/qml/qdeclarativescriptparser.cpp
@@ -50,8 +50,6 @@
#include "parser/qdeclarativejsast_p.h"
#include "qdeclarativerewrite_p.h"
-#include <qfxperf_p_p.h>
-
#include <QStack>
#include <QCoreApplication>
#include <QtDebug>
@@ -866,9 +864,6 @@ public:
bool QDeclarativeScriptParser::parse(const QByteArray &qmldata, const QUrl &url)
{
-#ifdef Q_ENABLE_PERFORMANCE_LOG
- QDeclarativePerfTimer<QDeclarativePerf::QDeclarativeParsing> pt;
-#endif
clear();
const QString fileName = url.toString();
diff --git a/src/declarative/qml/qdeclarativevme.cpp b/src/declarative/qml/qdeclarativevme.cpp
index 4457404..b3144a8 100644
--- a/src/declarative/qml/qdeclarativevme.cpp
+++ b/src/declarative/qml/qdeclarativevme.cpp
@@ -61,8 +61,6 @@
#include "qdeclarativeglobal_p.h"
#include "qdeclarativescriptstring.h"
-#include <qfxperf_p_p.h>
-
#include <QStack>
#include <QWidget>
#include <QColor>
@@ -72,6 +70,7 @@
#include <QtCore/qdebug.h>
#include <QtCore/qvarlengtharray.h>
#include <QtCore/qcoreapplication.h>
+#include <QtCore/qdatetime.h>
QT_BEGIN_NAMESPACE
diff --git a/src/declarative/util/qdeclarativeanimation_p.h b/src/declarative/util/qdeclarativeanimation_p.h
index eb339f6..925eb36 100644
--- a/src/declarative/util/qdeclarativeanimation_p.h
+++ b/src/declarative/util/qdeclarativeanimation_p.h
@@ -72,7 +72,7 @@ class Q_AUTOTEST_EXPORT QDeclarativeAbstractAnimation : public QObject, public Q
Q_INTERFACES(QDeclarativePropertyValueSource)
Q_PROPERTY(bool running READ isRunning WRITE setRunning NOTIFY runningChanged)
Q_PROPERTY(bool paused READ isPaused WRITE setPaused NOTIFY pausedChanged)
- Q_PROPERTY(bool alwaysRunToEnd READ alwaysRunToEnd WRITE setAlwaysRunToEnd NOTIFY alwaysRunToEndChanged())
+ Q_PROPERTY(bool alwaysRunToEnd READ alwaysRunToEnd WRITE setAlwaysRunToEnd NOTIFY alwaysRunToEndChanged)
Q_PROPERTY(bool repeat READ repeat WRITE setRepeat NOTIFY repeatChanged)
Q_CLASSINFO("DefaultMethod", "start()")
diff --git a/src/declarative/util/qdeclarativepixmapcache.cpp b/src/declarative/util/qdeclarativepixmapcache.cpp
index 942d5f6..e78fdf1 100644
--- a/src/declarative/util/qdeclarativepixmapcache.cpp
+++ b/src/declarative/util/qdeclarativepixmapcache.cpp
@@ -43,8 +43,6 @@
#include "qdeclarativenetworkaccessmanagerfactory.h"
#include "qdeclarativeimageprovider.h"
-#include "qfxperf_p_p.h"
-
#include <qdeclarativeengine.h>
#include <private/qdeclarativeglobal_p.h>
#include <private/qdeclarativeengine_p.h>
diff --git a/src/declarative/util/qdeclarativestateoperations.cpp b/src/declarative/util/qdeclarativestateoperations.cpp
index 0946e88..96c75a9 100644
--- a/src/declarative/util/qdeclarativestateoperations.cpp
+++ b/src/declarative/util/qdeclarativestateoperations.cpp
@@ -456,11 +456,10 @@ void QDeclarativeParentChange::saveCurrentValues()
}
d->rewindParent = d->target->parentItem();
+ d->rewindStackBefore = 0;
- if (!d->rewindParent) {
- d->rewindStackBefore = 0;
+ if (!d->rewindParent)
return;
- }
//try to determine the item's original stack position so we can restore it
int siblingIndex = ((AccessibleFxItem*)d->target)->siblingIndex() + 1;
diff --git a/src/declarative/util/qdeclarativeutilmodule.cpp b/src/declarative/util/qdeclarativeutilmodule.cpp
index 4d4678a..cb35734 100644
--- a/src/declarative/util/qdeclarativeutilmodule.cpp
+++ b/src/declarative/util/qdeclarativeutilmodule.cpp
@@ -40,7 +40,6 @@
****************************************************************************/
#include "qdeclarativeutilmodule_p.h"
-#include "qfxperf_p_p.h"
#include "qdeclarativeanimation_p.h"
#include "qdeclarativeanimation_p_p.h"
#include "qdeclarativebehavior_p.h"
@@ -71,7 +70,6 @@
#ifndef QT_NO_XMLPATTERNS
#include "qdeclarativexmllistmodel_p.h"
#endif
-#include "qperformancelog_p_p.h"
void QDeclarativeUtilModule::defineModule()
{
diff --git a/src/declarative/util/qdeclarativeview.cpp b/src/declarative/util/qdeclarativeview.cpp
index 59a062a..c2dbf92 100644
--- a/src/declarative/util/qdeclarativeview.cpp
+++ b/src/declarative/util/qdeclarativeview.cpp
@@ -41,9 +41,6 @@
#include "qdeclarativeview.h"
-#include "qperformancelog_p_p.h"
-#include "qfxperf_p_p.h"
-
#include <qdeclarative.h>
#include <qdeclarativeitem.h>
#include <qdeclarativeengine.h>
@@ -251,13 +248,6 @@ QDeclarativeView::QDeclarativeView(const QUrl &source, QWidget *parent)
void QDeclarativeViewPrivate::init()
{
-#ifdef Q_ENABLE_PERFORMANCE_LOG
- {
- QDeclarativePerfTimer<QDeclarativePerf::FontDatabase> perf;
- QFontDatabase database;
- }
-#endif
-
q->setScene(&scene);
q->setOptimizationFlags(QGraphicsView::DontSavePainterState);
@@ -455,8 +445,6 @@ void QDeclarativeView::setRootObject(QObject *obj)
if (QDeclarativeItem *item = qobject_cast<QDeclarativeItem *>(obj)) {
d->scene.addItem(item);
- QPerformanceLog::displayData();
- QPerformanceLog::clear();
d->root = item;
d->qmlRoot = item;
connect(item, SIGNAL(widthChanged(qreal)), this, SLOT(sizeChanged()));
diff --git a/src/declarative/util/qfxperf.cpp b/src/declarative/util/qfxperf.cpp
deleted file mode 100644
index 5611c49..0000000
--- a/src/declarative/util/qfxperf.cpp
+++ /dev/null
@@ -1,67 +0,0 @@
-/****************************************************************************
-**
-** Copyright (C) 2010 Nokia Corporation and/or its subsidiary(-ies).
-** All rights reserved.
-** Contact: Nokia Corporation (qt-info@nokia.com)
-**
-** This file is part of the QtDeclarative module of the Qt Toolkit.
-**
-** $QT_BEGIN_LICENSE:LGPL$
-** No Commercial Usage
-** This file contains pre-release code and may not be distributed.
-** You may use this file in accordance with the terms and conditions
-** contained in the Technology Preview License Agreement accompanying
-** this package.
-**
-** GNU Lesser General Public License Usage
-** Alternatively, this file may be used under the terms of the GNU Lesser
-** General Public License version 2.1 as published by the Free Software
-** Foundation and appearing in the file LICENSE.LGPL included in the
-** packaging of this file. Please review the following information to
-** ensure the GNU Lesser General Public License version 2.1 requirements
-** will be met: http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html.
-**
-** In addition, as a special exception, Nokia gives you certain additional
-** rights. These rights are described in the Nokia Qt LGPL Exception
-** version 1.1, included in the file LGPL_EXCEPTION.txt in this package.
-**
-** If you have questions regarding the use of this file, please contact
-** Nokia at qt-info@nokia.com.
-**
-**
-**
-**
-**
-**
-**
-**
-** $QT_END_LICENSE$
-**
-****************************************************************************/
-
-#include "qfxperf_p_p.h"
-
-QT_BEGIN_NAMESPACE
-
-Q_DEFINE_PERFORMANCE_LOG(QDeclarativePerf, "QDeclarativeGraphics") {
- Q_DEFINE_PERFORMANCE_METRIC(QDeclarativeParsing, "Compilation: QML Parsing")
- Q_DEFINE_PERFORMANCE_METRIC(Compilation, " QML Compilation")
- Q_DEFINE_PERFORMANCE_METRIC(VMEExecution, "Execution: QML VME Execution")
- Q_DEFINE_PERFORMANCE_METRIC(BindInit, "BindValue Initialization")
- Q_DEFINE_PERFORMANCE_METRIC(BindValue, "BindValue execution")
- Q_DEFINE_PERFORMANCE_METRIC(BindValueSSE, "BindValue execution SSE")
- Q_DEFINE_PERFORMANCE_METRIC(BindValueQt, "BindValue execution QtScript")
- Q_DEFINE_PERFORMANCE_METRIC(BindableValueUpdate, "QDeclarativeBinding::update")
- Q_DEFINE_PERFORMANCE_METRIC(PixmapLoad, "Pixmap loading")
- Q_DEFINE_PERFORMANCE_METRIC(FontDatabase, "Font database creation")
- Q_DEFINE_PERFORMANCE_METRIC(QDeclarativePathViewPathCache, "FX Items: QDeclarativePathView: Path cache")
- Q_DEFINE_PERFORMANCE_METRIC(CreateParticle, " QDeclarativeParticles: Particle creation")
- Q_DEFINE_PERFORMANCE_METRIC(ItemComponentComplete, " QDeclarativeItem::componentComplete")
- Q_DEFINE_PERFORMANCE_METRIC(ImageComponentComplete, " QDeclarativeImage::componentComplete")
- Q_DEFINE_PERFORMANCE_METRIC(BaseLayoutComponentComplete, " QDeclarativeBasePositioner::componentComplete")
- Q_DEFINE_PERFORMANCE_METRIC(TextComponentComplete, " QDeclarativeText::componentComplete")
- Q_DEFINE_PERFORMANCE_METRIC(QDeclarativeText_setText, " QDeclarativeText::setText")
- Q_DEFINE_PERFORMANCE_METRIC(AddScript, "QDeclarativeScript::addScriptToEngine")
-}
-
-QT_END_NAMESPACE
diff --git a/src/declarative/util/qfxperf_p_p.h b/src/declarative/util/qfxperf_p_p.h
deleted file mode 100644
index 8b65821..0000000
--- a/src/declarative/util/qfxperf_p_p.h
+++ /dev/null
@@ -1,90 +0,0 @@
-/****************************************************************************
-**
-** Copyright (C) 2010 Nokia Corporation and/or its subsidiary(-ies).
-** All rights reserved.
-** Contact: Nokia Corporation (qt-info@nokia.com)
-**
-** This file is part of the QtDeclarative module of the Qt Toolkit.
-**
-** $QT_BEGIN_LICENSE:LGPL$
-** No Commercial Usage
-** This file contains pre-release code and may not be distributed.
-** You may use this file in accordance with the terms and conditions
-** contained in the Technology Preview License Agreement accompanying
-** this package.
-**
-** GNU Lesser General Public License Usage
-** Alternatively, this file may be used under the terms of the GNU Lesser
-** General Public License version 2.1 as published by the Free Software
-** Foundation and appearing in the file LICENSE.LGPL included in the
-** packaging of this file. Please review the following information to
-** ensure the GNU Lesser General Public License version 2.1 requirements
-** will be met: http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html.
-**
-** In addition, as a special exception, Nokia gives you certain additional
-** rights. These rights are described in the Nokia Qt LGPL Exception
-** version 1.1, included in the file LGPL_EXCEPTION.txt in this package.
-**
-** If you have questions regarding the use of this file, please contact
-** Nokia at qt-info@nokia.com.
-**
-**
-**
-**
-**
-**
-**
-**
-** $QT_END_LICENSE$
-**
-****************************************************************************/
-#ifndef QFXPERF_H
-#define QFXPERF_H
-
-//
-// W A R N I N G
-// -------------
-//
-// This file is not part of the Qt API. It exists purely as an
-// implementation detail. This header file may change from version to
-// version without notice, or even be removed.
-//
-// We mean it.
-//
-
-#include "qperformancelog_p_p.h"
-
-QT_BEGIN_HEADER
-
-QT_BEGIN_NAMESPACE
-
-QT_MODULE(Declarative)
-
-Q_DECLARE_PERFORMANCE_LOG(QDeclarativePerf) {
- Q_DECLARE_PERFORMANCE_METRIC(QDeclarativeParsing)
-
- Q_DECLARE_PERFORMANCE_METRIC(Compilation)
- Q_DECLARE_PERFORMANCE_METRIC(VMEExecution)
-
- Q_DECLARE_PERFORMANCE_METRIC(BindInit)
- Q_DECLARE_PERFORMANCE_METRIC(BindValue)
- Q_DECLARE_PERFORMANCE_METRIC(BindValueSSE)
- Q_DECLARE_PERFORMANCE_METRIC(BindValueQt)
- Q_DECLARE_PERFORMANCE_METRIC(BindableValueUpdate)
- Q_DECLARE_PERFORMANCE_METRIC(PixmapLoad)
- Q_DECLARE_PERFORMANCE_METRIC(FontDatabase)
- Q_DECLARE_PERFORMANCE_METRIC(QDeclarativePathViewPathCache)
- Q_DECLARE_PERFORMANCE_METRIC(CreateParticle)
- Q_DECLARE_PERFORMANCE_METRIC(ItemComponentComplete)
- Q_DECLARE_PERFORMANCE_METRIC(ImageComponentComplete)
- Q_DECLARE_PERFORMANCE_METRIC(BaseLayoutComponentComplete)
- Q_DECLARE_PERFORMANCE_METRIC(TextComponentComplete)
- Q_DECLARE_PERFORMANCE_METRIC(QDeclarativeText_setText)
- Q_DECLARE_PERFORMANCE_METRIC(AddScript)
-}
-
-QT_END_NAMESPACE
-
-QT_END_HEADER
-
-#endif // QFXPERF_H
diff --git a/src/declarative/util/qperformancelog.cpp b/src/declarative/util/qperformancelog.cpp
deleted file mode 100644
index 83cc919..0000000
--- a/src/declarative/util/qperformancelog.cpp
+++ /dev/null
@@ -1,181 +0,0 @@
-/****************************************************************************
-**
-** Copyright (C) 2010 Nokia Corporation and/or its subsidiary(-ies).
-** All rights reserved.
-** Contact: Nokia Corporation (qt-info@nokia.com)
-**
-** This file is part of the QtDeclarative module of the Qt Toolkit.
-**
-** $QT_BEGIN_LICENSE:LGPL$
-** No Commercial Usage
-** This file contains pre-release code and may not be distributed.
-** You may use this file in accordance with the terms and conditions
-** contained in the Technology Preview License Agreement accompanying
-** this package.
-**
-** GNU Lesser General Public License Usage
-** Alternatively, this file may be used under the terms of the GNU Lesser
-** General Public License version 2.1 as published by the Free Software
-** Foundation and appearing in the file LICENSE.LGPL included in the
-** packaging of this file. Please review the following information to
-** ensure the GNU Lesser General Public License version 2.1 requirements
-** will be met: http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html.
-**
-** In addition, as a special exception, Nokia gives you certain additional
-** rights. These rights are described in the Nokia Qt LGPL Exception
-** version 1.1, included in the file LGPL_EXCEPTION.txt in this package.
-**
-** If you have questions regarding the use of this file, please contact
-** Nokia at qt-info@nokia.com.
-**
-**
-**
-**
-**
-**
-**
-**
-** $QT_END_LICENSE$
-**
-****************************************************************************/
-
-#include "qperformancelog_p_p.h"
-
-#include <QHash>
-#include <QDebug>
-
-QT_BEGIN_NAMESPACE
-
-#ifdef Q_ENABLE_PERFORMANCE_LOG
-
-struct QPerformanceLogData
-{
- struct Log
- {
- Log()
- : logDescription(0), maxId(-1) {}
-
- QHash<int, const char *> descriptions;
- const char *logDescription;
- int maxId;
- };
-
- typedef QHash<QPerformanceLog::LogData *, Log> Logs;
- Logs logs;
-};
-Q_GLOBAL_STATIC(QPerformanceLogData, performanceLogData);
-
-QPerformanceLog::LogData::LogData(const char *desc)
-: sumTime(0), data(0)
-{
- QPerformanceLogData *logData = performanceLogData();
-
- QPerformanceLogData::Log log;
- log.logDescription = desc;
- logData->logs.insert(this, log);
-
- timer.start();
-}
-
-QPerformanceLog::LogMetric::LogMetric(LogData *l, int id, const char *desc)
-{
- if (id < 0)
- qFatal("QPerformanceLog: Invalid log id %d ('%s')", id, desc);
-
- QPerformanceLogData *logData = performanceLogData();
-
- QPerformanceLogData::Logs::Iterator logIter = logData->logs.find(l);
- if (logIter == logData->logs.end())
- qFatal("QPerformanceLog: Unable to locate log for metric '%s'", desc);
- QPerformanceLogData::Log &log = *logIter;
- if (log.descriptions.contains(id))
- qFatal("QPerformanceLog: Duplicate log metric %d ('%s')", id, desc);
- log.descriptions.insert(id, desc);
-
- if (log.maxId < id) {
- log.maxId = id;
- if (l->data) delete [] l->data;
- l->data = new unsigned int[2 * (log.maxId + 1)];
- ::memset(l->data, 0, 2 * (log.maxId + 1) * sizeof(unsigned int));
- }
-}
-
-static void QPerformanceLog_clear(QPerformanceLog::LogData *l, const QPerformanceLogData::Log *pl)
-{
- ::memset(l->data, 0, 2 * (pl->maxId + 1) * sizeof(unsigned int));
-}
-
-static void QPerformanceLog_displayData(const QPerformanceLog::LogData *l, const QPerformanceLogData::Log *pl)
-{
- qWarning() << pl->logDescription << "performance data";
- unsigned int total = 0;
- for (QHash<int, const char *>::ConstIterator iter = pl->descriptions.begin();
- iter != pl->descriptions.end();
- ++iter) {
-
- int id = iter.key();
- unsigned int ms = l->data[id * 2];
- total += ms;
- unsigned int inst = l->data[id * 2 + 1];
- float pi = float(ms) / float(inst);
- qWarning().nospace() << " " << *iter << ": " << ms << " ms over "
- << inst << " instances (" << pi << " ms/instance)";
- }
- qWarning().nospace() << " TOTAL: " << total;
-}
-
-void QPerformanceLog::displayData()
-{
- QPerformanceLogData *logData = performanceLogData();
-
- for (QPerformanceLogData::Logs::ConstIterator iter = logData->logs.begin();
- iter != logData->logs.end();
- ++iter) {
- QPerformanceLog_displayData(iter.key(), &(*iter));
- }
-}
-
-void QPerformanceLog::clear()
-{
- QPerformanceLogData *logData = performanceLogData();
-
- for (QPerformanceLogData::Logs::ConstIterator iter = logData->logs.begin();
- iter != logData->logs.end();
- ++iter) {
- QPerformanceLog_clear(iter.key(), &(*iter));
- }
-}
-
-void QPerformanceLog::displayData(LogData *l)
-{
- QPerformanceLogData *logData = performanceLogData();
- QPerformanceLogData::Logs::ConstIterator iter = logData->logs.find(l);
- if (iter == logData->logs.end())
- qFatal("QPerformanceLog: Internal corruption - unable to locate log");
-
- QPerformanceLog_displayData(iter.key(), &(*iter));
-}
-
-void QPerformanceLog::clear(LogData *l)
-{
- QPerformanceLogData *logData = performanceLogData();
- QPerformanceLogData::Logs::ConstIterator iter = logData->logs.find(l);
- if (iter == logData->logs.end())
- qFatal("QPerformanceLog: Internal corruption - unable to locate log");
-
- QPerformanceLog_clear(iter.key(), &(*iter));
-}
-
-#else // Q_ENABLE_PERFORMANCE_LOG
-
-void QPerformanceLog::displayData()
-{
-}
-
-void QPerformanceLog::clear()
-{
-}
-
-#endif // Q_ENABLE_PERFORMANCE_LOG
-
-QT_END_NAMESPACE
diff --git a/src/declarative/util/qperformancelog_p_p.h b/src/declarative/util/qperformancelog_p_p.h
deleted file mode 100644
index a212f28..0000000
--- a/src/declarative/util/qperformancelog_p_p.h
+++ /dev/null
@@ -1,141 +0,0 @@
-/****************************************************************************
-**
-** Copyright (C) 2010 Nokia Corporation and/or its subsidiary(-ies).
-** All rights reserved.
-** Contact: Nokia Corporation (qt-info@nokia.com)
-**
-** This file is part of the QtDeclarative module of the Qt Toolkit.
-**
-** $QT_BEGIN_LICENSE:LGPL$
-** No Commercial Usage
-** This file contains pre-release code and may not be distributed.
-** You may use this file in accordance with the terms and conditions
-** contained in the Technology Preview License Agreement accompanying
-** this package.
-**
-** GNU Lesser General Public License Usage
-** Alternatively, this file may be used under the terms of the GNU Lesser
-** General Public License version 2.1 as published by the Free Software
-** Foundation and appearing in the file LICENSE.LGPL included in the
-** packaging of this file. Please review the following information to
-** ensure the GNU Lesser General Public License version 2.1 requirements
-** will be met: http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html.
-**
-** In addition, as a special exception, Nokia gives you certain additional
-** rights. These rights are described in the Nokia Qt LGPL Exception
-** version 1.1, included in the file LGPL_EXCEPTION.txt in this package.
-**
-** If you have questions regarding the use of this file, please contact
-** Nokia at qt-info@nokia.com.
-**
-**
-**
-**
-**
-**
-**
-**
-** $QT_END_LICENSE$
-**
-****************************************************************************/
-
-#ifndef QPERFORMANCELOG_H
-#define QPERFORMANCELOG_H
-
-#include <QtCore/qdatetime.h>
-
-QT_BEGIN_NAMESPACE
-
-namespace QPerformanceLog
-{
- Q_DECLARATIVE_EXPORT void displayData();
- Q_DECLARATIVE_EXPORT void clear();
-
-#ifdef Q_ENABLE_PERFORMANCE_LOG
- struct LogData {
- LogData(const char *);
- QTime timer;
- int sumTime;
- unsigned int *data;
- };
-
- struct LogMetric {
- LogMetric(LogData *, int, const char *);
- };
-
- // Internal
- void displayData(LogData *);
- void clear(LogData *);
-#endif
-}
-
-#ifdef Q_ENABLE_PERFORMANCE_LOG
-
-#define Q_DECLARE_PERFORMANCE_METRIC(name) \
- enum { name = ValueChoice<0, ValueTracker<0, __LINE__>::value, __LINE__>::value }; \
- template<int L> \
- struct ValueTracker<name, L> \
- { \
- enum { value = name }; \
- }; \
- extern QPerformanceLog::LogMetric metric ## name;
-
-#define Q_DECLARE_PERFORMANCE_LOG(name) \
- namespace name { \
- extern QPerformanceLog::LogData log; \
- inline void displayData() { QPerformanceLog::displayData(&log); } \
- inline void clear() { QPerformanceLog::clear(&log); } \
- } \
- template<int N> \
- class name ## Timer { \
- public: \
- name ## Timer() { \
- lastSum = name::log.sumTime + name::log.timer.restart(); \
- name::log.sumTime = 0; \
- } \
- ~ name ## Timer() { \
- name::log.data[2 * N] += name::log.sumTime + name::log.timer.restart(); \
- ++name::log.data[2 * N + 1]; \
- name::log.sumTime = lastSum; \
- } \
- private: \
- int lastSum; \
- }; \
- namespace name { \
- template<int N, int L> \
- struct ValueTracker \
- { \
- enum { value = -1 }; \
- }; \
- template<int DefNextValue, int NextValue, int L> \
- struct ValueChoice \
- { \
- enum { value = ValueChoice<DefNextValue + 1, ValueTracker<DefNextValue + 1, L>::value, L>::value }; \
- }; \
- template<int DefNextValue, int L> \
- struct ValueChoice<DefNextValue, -1, L> \
- { \
- enum { value = DefNextValue }; \
- }; \
- } \
- namespace name
-
-#define Q_DEFINE_PERFORMANCE_LOG(name, desc) \
- QPerformanceLog::LogData name::log(desc); \
- namespace name
-
-#define Q_DEFINE_PERFORMANCE_METRIC(name, desc) \
- QPerformanceLog::LogMetric metrix ## name(&log, name, desc);
-
-#else // Q_ENABLE_PERFORMANCE_LOG
-
-#define Q_DECLARE_PERFORMANCE_METRIC(name)
-#define Q_DECLARE_PERFORMANCE_LOG(name) namespace name
-#define Q_DEFINE_PERFORMANCE_LOG(name, desc) namespace name
-#define Q_DEFINE_PERFORMANCE_METRIC(name, desc)
-
-#endif // Q_ENABLE_PERFORMANCE_LOG
-
-QT_END_NAMESPACE
-
-#endif // QPERFORMANCELOG_H
diff --git a/src/declarative/util/util.pri b/src/declarative/util/util.pri
index ddf00ea..61b4f6f 100644
--- a/src/declarative/util/util.pri
+++ b/src/declarative/util/util.pri
@@ -3,8 +3,6 @@ INCLUDEPATH += $$PWD
SOURCES += \
$$PWD/qdeclarativeutilmodule.cpp\
$$PWD/qdeclarativeview.cpp \
- $$PWD/qfxperf.cpp \
- $$PWD/qperformancelog.cpp \
$$PWD/qdeclarativeconnections.cpp \
$$PWD/qdeclarativepackage.cpp \
$$PWD/qdeclarativeanimation.cpp \
@@ -33,8 +31,6 @@ SOURCES += \
HEADERS += \
$$PWD/qdeclarativeutilmodule_p.h\
$$PWD/qdeclarativeview.h \
- $$PWD/qfxperf_p_p.h \
- $$PWD/qperformancelog_p_p.h \
$$PWD/qdeclarativeconnections_p.h \
$$PWD/qdeclarativepackage_p.h \
$$PWD/qdeclarativeanimation_p.h \
diff --git a/src/imports/particles/qdeclarativeparticles.cpp b/src/imports/particles/qdeclarativeparticles.cpp
index bb6669a..83be59b 100644
--- a/src/imports/particles/qdeclarativeparticles.cpp
+++ b/src/imports/particles/qdeclarativeparticles.cpp
@@ -44,7 +44,6 @@
#include <private/qdeclarativeitem_p.h>
#include <private/qdeclarativepixmapcache_p.h>
-#include <private/qfxperf_p_p.h>
#include <QtCore/QAbstractAnimation>
#include <QPainter>
@@ -567,9 +566,6 @@ void QDeclarativeParticlesPrivate::tick(int time)
void QDeclarativeParticlesPrivate::createParticle(int time)
{
-#ifdef Q_ENABLE_PERFORMANCE_LOG
- QDeclarativePerfTimer<QDeclarativePerf::CreateParticle> x;
-#endif
Q_Q(QDeclarativeParticles);
QDeclarativeParticle p(time);
p.x = q->x() + q->width() * qreal(qrand()) / RAND_MAX - image.width()/2.0;