QmlProfiler: Initial conversion from Quick 1 to Quick 2

Updated class names and functions. Fixed imports.

Change-Id: I5f12e3a108a0e60c091acc9c415ff77e52118029
Reviewed-by: Kai Koehne <kai.koehne@digia.com>
This commit is contained in:
Thomas Hartmann
2013-09-16 14:33:07 +02:00
parent 8e281fe27b
commit 9e58ab2ac8
25 changed files with 143 additions and 136 deletions

View File

@@ -41,9 +41,7 @@ QmlProfilerCanvas::QmlProfilerCanvas()
: m_context2d(new Context2D(this))
, m_dirty(true)
{
setFlag(QGraphicsItem::ItemHasNoContents, false);
setAcceptedMouseButtons(Qt::LeftButton);
setCacheMode(QGraphicsItem::DeviceCoordinateCache);
}
void QmlProfilerCanvas::requestPaint()
@@ -57,7 +55,7 @@ void QmlProfilerCanvas::requestRedraw()
update();
}
void QmlProfilerCanvas::paint(QPainter *p, const QStyleOptionGraphicsItem *, QWidget *)
void QmlProfilerCanvas::paint(QPainter *p)
{
if (m_context2d->size().width() != width() || m_context2d->size().height() != height()) {
m_dirty = true;
@@ -84,7 +82,7 @@ void QmlProfilerCanvas::componentComplete()
if (p.hasNotifySignal())
QMetaObject::connect(this, p.notifySignalIndex(), this, requestPaintMethod, 0, 0);
}
QDeclarativeItem::componentComplete();
QQuickItem::componentComplete();
}
}