diff --git a/src/plugins/qmlprofiler/canvas/canvas.pri b/src/plugins/qmlprofiler/canvas/canvas.pri index 2b37e8ee5d8df7cceca839f6ba354538d4a9673a..8b5621fb44297377c787115c266cf9c1fca4ee20 100644 --- a/src/plugins/qmlprofiler/canvas/canvas.pri +++ b/src/plugins/qmlprofiler/canvas/canvas.pri @@ -2,10 +2,10 @@ INCLUDEPATH += $$PWD HEADERS += $$PWD/qdeclarativecontext2d_p.h \ $$PWD/qdeclarativecanvas_p.h \ - $$PWD/qdeclarativetiledcanvas_p.h \ + $$PWD/qmlprofilercanvas.h \ $$PWD/qdeclarativecanvastimer_p.h SOURCES += $$PWD/qdeclarativecontext2d.cpp \ $$PWD/qdeclarativecanvas.cpp \ - $$PWD/qdeclarativetiledcanvas.cpp \ + $$PWD/qmlprofilercanvas.cpp \ $$PWD/qdeclarativecanvastimer.cpp diff --git a/src/plugins/qmlprofiler/canvas/qdeclarativetiledcanvas.cpp b/src/plugins/qmlprofiler/canvas/qdeclarativetiledcanvas.cpp deleted file mode 100644 index ce971a5404b189fc8282071bbf4f0ad525c18341..0000000000000000000000000000000000000000 --- a/src/plugins/qmlprofiler/canvas/qdeclarativetiledcanvas.cpp +++ /dev/null @@ -1,163 +0,0 @@ -/**************************************************************************** -** -** Copyright (C) 2010 Nokia Corporation and/or its subsidiary(-ies). -** All rights reserved. -** Contact: Nokia Corporation (info@qt.nokia.com) -** -** This file is part of the examples of the Qt Toolkit. -** -** You may use this file under the terms of the BSD license as follows: -** -** "Redistribution and use in source and binary forms, with or without -** modification, are permitted provided that the following conditions are -** met: -** * Redistributions of source code must retain the above copyright -** notice, this list of conditions and the following disclaimer. -** * Redistributions in binary form must reproduce the above copyright -** notice, this list of conditions and the following disclaimer in -** the documentation and/or other materials provided with the -** distribution. -** * Neither the name of Nokia Corporation and its Subsidiary(-ies) nor -** the names of its contributors may be used to endorse or promote -** products derived from this software without specific prior written -** permission. -** -** THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS -** "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT -** LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR -** A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT -** OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, -** SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT -** LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, -** DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY -** THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT -** (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE -** OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE." -** $QT_END_LICENSE$ -** -****************************************************************************/ - -#include "qdeclarativetiledcanvas_p.h" - -#include "qdeclarativecontext2d_p.h" - -#include <QtGui/qpixmap.h> -#include <QtGui/qpainter.h> - -TiledCanvas::TiledCanvas() -: m_context2d(new Context2D(this)), m_canvasSize(-1, -1), m_tileSize(100, 100) -{ - setFlag(QGraphicsItem::ItemHasNoContents, false); - setAcceptedMouseButtons(Qt::LeftButton); - setCacheMode(QGraphicsItem::DeviceCoordinateCache); -} - -QSizeF TiledCanvas::canvasSize() const -{ - return m_canvasSize; -} - -void TiledCanvas::setCanvasSize(const QSizeF &v) -{ - if (m_canvasSize != v) { - m_canvasSize = v; - emit canvasSizeChanged(); - update(); - } -} - -QSize TiledCanvas::tileSize() const -{ - return m_tileSize; -} - -void TiledCanvas::setTileSize(const QSize &v) -{ - if (v != m_tileSize) { - m_tileSize = v; - emit tileSizeChanged(); - update(); - } -} - -QRectF TiledCanvas::canvasWindow() const -{ - return m_canvasWindow; -} - -void TiledCanvas::setCanvasWindow(const QRectF &v) -{ - if (m_canvasWindow != v) { - m_canvasWindow = v; - emit canvasWindowChanged(); - update(); - } -} - -void TiledCanvas::requestPaint() -{ - update(); -} - -void TiledCanvas::paint(QPainter *p, const QStyleOptionGraphicsItem *, QWidget *) -{ - if (m_context2d->size() != m_tileSize) - m_context2d->setSize(m_tileSize); - - const int tw = m_tileSize.width(); - const int th = m_tileSize.height(); - - int h1 = m_canvasWindow.left() / tw; - int htiles = ((m_canvasWindow.right() - h1 * tw) + tw - 1) / tw; - - int v1 = m_canvasWindow.top() / th; - int vtiles = ((m_canvasWindow.bottom() - v1 * th) + th - 1) / th; - - for (int yy = 0; yy < vtiles; ++yy) { - for (int xx = 0; xx < htiles; ++xx) { - int ht = xx + h1; - int vt = yy + v1; - - m_context2d->reset(); - m_context2d->setPainterTranslate(QPoint(-ht * tw, -vt * th)); - - emit drawRegion(m_context2d, QRect(ht * tw, vt * th, tw, th)); - - p->drawPixmap(-m_canvasWindow.x() + ht * tw, -m_canvasWindow.y() + vt * th, m_context2d->pixmap()); - } - } -} - -void TiledCanvas::componentComplete() -{ - const QMetaObject *metaObject = this->metaObject(); - int propertyCount = metaObject->propertyCount(); - int requestPaintMethod = metaObject->indexOfMethod("requestPaint()"); - for (int ii = TiledCanvas::staticMetaObject.propertyCount(); ii < propertyCount; ++ii) { - QMetaProperty p = metaObject->property(ii); - if (p.hasNotifySignal()) - QMetaObject::connect(this, p.notifySignalIndex(), this, requestPaintMethod, 0, 0); - } - QDeclarativeItem::componentComplete(); -} - - -void TiledCanvas::mousePressEvent(QGraphicsSceneMouseEvent *event) -{ - Q_UNUSED(event); -} - -QPixmap TiledCanvas::getTile(int xx, int yy) -{ - QPixmap pix(m_tileSize); - - pix.fill(Qt::green); - - QString text = QString::number(xx) + QLatin1Char(' ') + QString::number(yy); - - QPainter p(&pix); - p.drawText(pix.rect(), Qt::AlignHCenter | Qt::AlignVCenter, text); - - return pix; -} - diff --git a/src/plugins/qmlprofiler/canvas/qdeclarativetiledcanvas_p.h b/src/plugins/qmlprofiler/canvas/qdeclarativetiledcanvas_p.h deleted file mode 100644 index 6a0a21ee19aaa438474241ce2bdfbc3bea1845af..0000000000000000000000000000000000000000 --- a/src/plugins/qmlprofiler/canvas/qdeclarativetiledcanvas_p.h +++ /dev/null @@ -1,123 +0,0 @@ -/************************************************************************** -** -** This file is part of Qt Creator -** -** Copyright (c) 2011 Nokia Corporation and/or its subsidiary(-ies). -** -** Contact: Nokia Corporation (info@qt.nokia.com) -** -** -** GNU Lesser General Public License Usage -** -** 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. -** -** Other Usage -** -** Alternatively, this file may be used in accordance with the terms and -** conditions contained in a signed written agreement between you and Nokia. -** -** If you have questions regarding the use of this file, please contact -** Nokia at info@qt.nokia.com. -** -**************************************************************************/ - -#ifndef QDECLARATIVETILEDCANVAS_P_H -#define QDECLARATIVETILEDCANVAS_P_H - -#include <QtDeclarative/qdeclarativeitem.h> - -QT_BEGIN_HEADER - -QT_BEGIN_NAMESPACE - -QT_MODULE(Declarative) -class Context2D; -class TiledCanvas : public QDeclarativeItem -{ - Q_OBJECT/************************************************************************** -** -** This file is part of Qt Creator -** -** Copyright (c) 2011 Nokia Corporation and/or its subsidiary(-ies). -** -** Contact: Nokia Corporation (info@qt.nokia.com) -** -** -** GNU Lesser General Public License Usage -** -** 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. -** -** Other Usage -** -** Alternatively, this file may be used in accordance with the terms and -** conditions contained in a signed written agreement between you and Nokia. -** -** If you have questions regarding the use of this file, please contact -** Nokia at info@qt.nokia.com. -** -**************************************************************************/ - - Q_PROPERTY(QSizeF canvasSize READ canvasSize WRITE setCanvasSize NOTIFY canvasSizeChanged) - Q_PROPERTY(QSize tileSize READ tileSize WRITE setTileSize NOTIFY tileSizeChanged) - Q_PROPERTY(QRectF canvasWindow READ canvasWindow WRITE setCanvasWindow NOTIFY canvasWindowChanged) - -public: - TiledCanvas(); - - QSizeF canvasSize() const; - void setCanvasSize(const QSizeF &); - - QSize tileSize() const; - void setTileSize(const QSize &); - - QRectF canvasWindow() const; - void setCanvasWindow(const QRectF &); - -Q_SIGNALS: - void canvasSizeChanged(); - void tileSizeChanged(); - void canvasWindowChanged(); - - void drawRegion(Context2D *ctxt, const QRect ®ion); - -public Q_SLOTS: - void requestPaint(); - -protected: - virtual void paint(QPainter *, const QStyleOptionGraphicsItem *, QWidget *); - virtual void componentComplete(); - virtual void mousePressEvent(QGraphicsSceneMouseEvent *event); - -private: - QPixmap getTile(int, int); - - Context2D *m_context2d; - - QSizeF m_canvasSize; - QSize m_tileSize; - QRectF m_canvasWindow; -}; - -QT_END_NAMESPACE - -QT_END_HEADER - -#endif // QDECLARATIVETILEDCANVAS_P_H diff --git a/src/plugins/qmlprofiler/canvas/qmlprofilercanvas.cpp b/src/plugins/qmlprofiler/canvas/qmlprofilercanvas.cpp new file mode 100644 index 0000000000000000000000000000000000000000..07b90c25a327d8609845a96aa7c792fb332f4cc7 --- /dev/null +++ b/src/plugins/qmlprofiler/canvas/qmlprofilercanvas.cpp @@ -0,0 +1,93 @@ +/************************************************************************** +** +** This file is part of Qt Creator +** +** Copyright (c) 2011 Nokia Corporation and/or its subsidiary(-ies). +** +** Contact: Nokia Corporation (info@qt.nokia.com) +** +** +** GNU Lesser General Public License Usage +** +** 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. +** +** Other Usage +** +** Alternatively, this file may be used in accordance with the terms and +** conditions contained in a signed written agreement between you and Nokia. +** +** If you have questions regarding the use of this file, please contact +** Nokia at info@qt.nokia.com. +** +**************************************************************************/ + +#include "qmlprofilercanvas.h" + +#include "qdeclarativecontext2d_p.h" + +#include <QtGui/qpixmap.h> +#include <QtGui/qpainter.h> + +namespace QmlProfiler { +namespace Internal { + +QmlProfilerCanvas::QmlProfilerCanvas() + : m_context2d(new Context2D(this)) +{ + setFlag(QGraphicsItem::ItemHasNoContents, false); + setAcceptedMouseButtons(Qt::LeftButton); + setCacheMode(QGraphicsItem::DeviceCoordinateCache); +} + +void QmlProfilerCanvas::requestPaint() +{ + update(); +} + +void QmlProfilerCanvas::requestRedraw() +{ + setDirty(true); + update(); +} + +void QmlProfilerCanvas::paint(QPainter *p, const QStyleOptionGraphicsItem *, QWidget *) +{ + if (m_context2d->size().width() != width() || m_context2d->size().height() != height()) { + m_dirty = true; + m_context2d->setSize(width(), height()); + } + + if (m_dirty) { + m_context2d->reset(); + + emit drawRegion(m_context2d, QRect(0, 0, width(), height())); + setDirty(false); + } + + p->drawPixmap(0, 0, m_context2d->pixmap()); +} + +void QmlProfilerCanvas::componentComplete() +{ + const QMetaObject *metaObject = this->metaObject(); + int propertyCount = metaObject->propertyCount(); + int requestPaintMethod = metaObject->indexOfMethod("requestPaint()"); + for (int ii = QmlProfilerCanvas::staticMetaObject.propertyCount(); ii < propertyCount; ++ii) { + QMetaProperty p = metaObject->property(ii); + if (p.hasNotifySignal()) + QMetaObject::connect(this, p.notifySignalIndex(), this, requestPaintMethod, 0, 0); + } + QDeclarativeItem::componentComplete(); +} + +} +} diff --git a/src/plugins/qmlprofiler/canvas/qmlprofilercanvas.h b/src/plugins/qmlprofiler/canvas/qmlprofilercanvas.h new file mode 100644 index 0000000000000000000000000000000000000000..dc90cb13d7e8230acd63a0442422fe7633fd649a --- /dev/null +++ b/src/plugins/qmlprofiler/canvas/qmlprofilercanvas.h @@ -0,0 +1,83 @@ +/************************************************************************** +** +** This file is part of Qt Creator +** +** Copyright (c) 2011 Nokia Corporation and/or its subsidiary(-ies). +** +** Contact: Nokia Corporation (info@qt.nokia.com) +** +** +** GNU Lesser General Public License Usage +** +** 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. +** +** Other Usage +** +** Alternatively, this file may be used in accordance with the terms and +** conditions contained in a signed written agreement between you and Nokia. +** +** If you have questions regarding the use of this file, please contact +** Nokia at info@qt.nokia.com. +** +**************************************************************************/ + +#ifndef QMLPROFILERCANVAS_H +#define QMLPROFILERCANVAS_H + +#include <QtDeclarative/QDeclarativeItem> + +class Context2D; + +namespace QmlProfiler { +namespace Internal { + +class QmlProfilerCanvas : public QDeclarativeItem +{ + Q_OBJECT + + Q_PROPERTY(bool dirty READ dirty WRITE setDirty NOTIFY dirtyChanged) + +public: + QmlProfilerCanvas(); + + bool dirty() const { return m_dirty; } + void setDirty(bool dirty) + { + if (m_dirty != dirty) { + m_dirty = dirty; + emit dirtyChanged(dirty); + } + } + +signals: + void dirtyChanged(bool dirty); + + void drawRegion(Context2D *ctxt, const QRect ®ion); + +public slots: + void requestPaint(); + void requestRedraw(); + +protected: + virtual void paint(QPainter *, const QStyleOptionGraphicsItem *, QWidget *); + virtual void componentComplete(); + +private: + Context2D *m_context2d; + + bool m_dirty; +}; + +} +} + +#endif // QMLPROFILERCANVAS_H diff --git a/src/plugins/qmlprofiler/qml/Label.qml b/src/plugins/qmlprofiler/qml/Label.qml index a9f3594ad17e09323451b4603b4f08d728fffb1a..1bb87a170ea7d460c5d9c0c05ec4d0701d391750 100644 --- a/src/plugins/qmlprofiler/qml/Label.qml +++ b/src/plugins/qmlprofiler/qml/Label.qml @@ -46,7 +46,7 @@ Item { var rE = labels.rowExpanded; rE[typeIndex] = expanded; labels.rowExpanded = rE; - backgroundMarks.requestPaint(); + backgroundMarks.requestRedraw(); view.rowExpanded(typeIndex, expanded); updateHeight(); } diff --git a/src/plugins/qmlprofiler/qml/Overview.js b/src/plugins/qmlprofiler/qml/Overview.js index 7c2ad698dc8d3e084b063c6145ba1307348e33b7..ba358e85736ac0ffb6e8de0bbe414b5607e38f1c 100644 --- a/src/plugins/qmlprofiler/qml/Overview.js +++ b/src/plugins/qmlprofiler/qml/Overview.js @@ -37,12 +37,12 @@ var qmlEventList = 0; //draw background of the graph function drawGraph(canvas, ctxt, region) { - var grad = ctxt.createLinearGradient(0, 0, 0, canvas.canvasSize.height); + var grad = ctxt.createLinearGradient(0, 0, 0, canvas.height); grad.addColorStop(0, '#fff'); grad.addColorStop(1, '#ccc'); ctxt.fillStyle = grad; - ctxt.fillRect(0, 0, canvas.canvasSize.width, canvas.canvasSize.height); + ctxt.fillRect(0, 0, canvas.width, canvas.height); } //draw the actual data to be graphed @@ -51,7 +51,7 @@ function drawData(canvas, ctxt, region) if ((!qmlEventList) || qmlEventList.count() == 0) return; - var width = canvas.canvasSize.width; + var width = canvas.width; var height = canvas.height; var sumValue = qmlEventList.traceEndTime() - qmlEventList.traceStartTime(); diff --git a/src/plugins/qmlprofiler/qml/Overview.qml b/src/plugins/qmlprofiler/qml/Overview.qml index c98bcdbfde147409c8345e2b4f8389d0ad2dda8c..10ed9d252338c3e4f10c5b53915cc18bbc59d820 100644 --- a/src/plugins/qmlprofiler/qml/Overview.qml +++ b/src/plugins/qmlprofiler/qml/Overview.qml @@ -34,7 +34,7 @@ import QtQuick 1.0 import Monitor 1.0 import "Overview.js" as Plotter -TiledCanvas { +Canvas2D { id: canvas // ***** properties @@ -43,20 +43,11 @@ TiledCanvas { property variant startTime : 0 property variant endTime : 0 - canvasSize.width: canvas.width - canvasSize.height: canvas.height - - tileSize.width: width - tileSize.height: height - - canvasWindow.width: width - canvasWindow.height: height - // ***** functions function clearDisplay() { dataAvailable = false; - requestPaint(); + requestRedraw(); } function updateRange() { @@ -89,7 +80,7 @@ TiledCanvas { onDataReady: { if (qmlEventList.count() > 0) { dataAvailable = true; - requestPaint(); + requestRedraw(); } } } diff --git a/src/plugins/qmlprofiler/qml/TimeDisplay.qml b/src/plugins/qmlprofiler/qml/TimeDisplay.qml index b96740d9b56bc9f14031414dff8d9d635bf3ac95..cbed0a10c45fd8a309f0ecb389b6404c78b7225a 100644 --- a/src/plugins/qmlprofiler/qml/TimeDisplay.qml +++ b/src/plugins/qmlprofiler/qml/TimeDisplay.qml @@ -33,39 +33,33 @@ import QtQuick 1.0 import Monitor 1.0 -TiledCanvas { +Canvas2D { id: timeDisplay property variant startTime : 0 property variant endTime : 0 property variant timePerPixel: 0 - canvasSize.width: timeDisplay.width - canvasSize.height: timeDisplay.height - tileSize.width: width - tileSize.height: height - canvasWindow.width: width - canvasWindow.height: height + + Component.onCompleted: { + requestRedraw(); + } + onWidthChanged: { + requestRedraw(); + } + onHeightChanged: { + requestRedraw(); + } Connections { target: zoomControl onRangeChanged: { startTime = zoomControl.startTime(); endTime = zoomControl.endTime(); - requestPaint(); + requestRedraw(); } } - Component.onCompleted: { - requestPaint(); - } - onWidthChanged: { - requestPaint(); - } - onHeightChanged: { - requestPaint(); - } - onDrawRegion: { ctxt.fillStyle = "white"; ctxt.fillRect(0, 0, width, height); @@ -89,7 +83,7 @@ TiledCanvas { ctxt.font = "8px sans-serif"; for (var ii = 0; ii < blockCount+1; ii++) { var x = Math.floor(ii*pixelsPerBlock - realStartPos); - ctxt.strokeStyle = "#909090"; + ctxt.strokeStyle = "#C0C0C0"; ctxt.beginPath(); ctxt.moveTo(x, 0); ctxt.lineTo(x, height); diff --git a/src/plugins/qmlprofiler/qml/TimeMarks.qml b/src/plugins/qmlprofiler/qml/TimeMarks.qml index eb378a79aa0eca51772638c433df9f94b9024396..ca5c129d2b82a1701439006840e5d8cd1cf57c33 100644 --- a/src/plugins/qmlprofiler/qml/TimeMarks.qml +++ b/src/plugins/qmlprofiler/qml/TimeMarks.qml @@ -33,30 +33,22 @@ import QtQuick 1.0 import Monitor 1.0 -TiledCanvas { +Canvas2D { id: timeDisplay property variant startTime property variant endTime property variant timePerPixel - canvasSize.width: timeDisplay.width - canvasSize.height: timeDisplay.height - - tileSize.width: width - tileSize.height: height - canvasWindow.width: width - canvasWindow.height: height - Component.onCompleted: { - requestPaint(); + requestRedraw(); } onWidthChanged: { - requestPaint(); + requestRedraw(); } onHeightChanged: { - requestPaint(); + requestRedraw(); } onDrawRegion: { @@ -81,13 +73,13 @@ TiledCanvas { ctxt.font = "8px sans-serif"; for (var ii = 0; ii < blockCount+1; ii++) { var x = Math.floor(ii*pixelsPerBlock - realStartPos); - ctxt.strokeStyle = "#909090"; + ctxt.strokeStyle = "#C0C0C0"; ctxt.beginPath(); ctxt.moveTo(x, 0); ctxt.lineTo(x, height); ctxt.stroke(); - ctxt.strokeStyle = "#C0C0C0"; + ctxt.strokeStyle = "#E0E0E0"; for (var jj=1; jj < 5; jj++) { var xx = Math.floor(ii*pixelsPerBlock + jj*pixelsPerSection - realStartPos); ctxt.beginPath(); @@ -102,7 +94,7 @@ TiledCanvas { if (startTime !== start || endTime !== end) { startTime = start; endTime = end; - requestPaint(); + requestRedraw(); } } diff --git a/src/plugins/qmlprofiler/qmlprofilerengine.cpp b/src/plugins/qmlprofiler/qmlprofilerengine.cpp index 62d109ea25dbdee0b012001f611110a333d10f3d..8e85eecf44dd853b79df0bc56de62194dcc3597c 100644 --- a/src/plugins/qmlprofiler/qmlprofilerengine.cpp +++ b/src/plugins/qmlprofiler/qmlprofilerengine.cpp @@ -32,9 +32,6 @@ #include "qmlprofilerengine.h" -#include "canvas/qdeclarativecanvas_p.h" -#include "canvas/qdeclarativecontext2d_p.h" -#include "canvas/qdeclarativetiledcanvas_p.h" #include "codaqmlprofilerrunner.h" #include "localqmlprofilerrunner.h" #include "remotelinuxqmlprofilerrunner.h" diff --git a/src/plugins/qmlprofiler/qmlprofilertool.cpp b/src/plugins/qmlprofiler/qmlprofilertool.cpp index 9ba33d195b0db796241f18c57443f922199f1e65..b6db11f50dc747456c019854c6bc8ff130a461ef 100644 --- a/src/plugins/qmlprofiler/qmlprofilertool.cpp +++ b/src/plugins/qmlprofiler/qmlprofilertool.cpp @@ -48,8 +48,8 @@ #include <analyzerbase/analyzerruncontrol.h> #include "canvas/qdeclarativecanvas_p.h" -#include "canvas/qdeclarativecontext2d_p.h" -#include "canvas/qdeclarativetiledcanvas_p.h" +#include "canvas/qdeclarativecanvastimer_p.h" +#include "canvas/qmlprofilercanvas.h" #include <qmlprojectmanager/qmlprojectrunconfiguration.h> #include <utils/fancymainwindow.h> @@ -139,7 +139,7 @@ QmlProfilerTool::QmlProfilerTool(QObject *parent) connect(&d->m_connectionTimer, SIGNAL(timeout()), SLOT(tryToConnect())); qmlRegisterType<Canvas>("Monitor", 1, 0, "Canvas"); - qmlRegisterType<TiledCanvas>("Monitor", 1, 0, "TiledCanvas"); + qmlRegisterType<QmlProfilerCanvas>("Monitor", 1, 0, "Canvas2D"); qmlRegisterType<Context2D>(); qmlRegisterType<CanvasImage>(); qmlRegisterType<CanvasGradient>();