forked from qt-creator/qt-creator
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:
@@ -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();
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user