Commit d3e0ad94 authored by Ulf Hermann's avatar Ulf Hermann
Browse files

Remove non-functional tracking of profiler root's vertical scroll



Vertical scrolling doesn't work at the moment and has to be implemented
in a different way. Besides, the code tracking the root's vertical
scroll hasn't done anything useful in a long time.

Change-Id: If2add3874cba971bbaace2c22fbf1b2bf0b463b7
Reviewed-by: default avatarKai Koehne <kai.koehne@digia.com>
Reviewed-by: default avatarUlf Hermann <ulf.hermann@digia.com>
parent e5a65d58
......@@ -35,8 +35,6 @@ Rectangle {
// ***** properties
property int scrollY: 0
property int singleRowHeight: 30
property bool dataAvailable: true
......@@ -64,7 +62,6 @@ Rectangle {
property real selectionRangeEnd: selectionRange.startTime + selectionRange.duration
signal changeToolTip(string text)
signal updateVerticalScroll(int newPosition)
property bool recordingEnabled: false
property bool appKilled : false
......@@ -458,18 +455,6 @@ Rectangle {
zoomControl.setRange(from, from + windowLength);
}
// center view (vertically)
var itemY = view.getYPosition(selectedModel, selectedItem);
if (itemY < root.scrollY) {
root.updateVerticalScroll(itemY);
} else
if (itemY + root.singleRowHeight >
root.scrollY + root.height) {
root.updateVerticalScroll(itemY + root.singleRowHeight -
root.height);
}
} else {
root.hideRangeDetails();
}
......@@ -585,7 +570,7 @@ Rectangle {
}
Rectangle {
y: root.scrollY + root.height - height
y: root.height - height
height: 6
width: root.width
x: 0
......
......@@ -50,14 +50,6 @@ Item {
x: 200
y: 25
property int yoffset: root.scrollY
onYoffsetChanged: {
y = relativey + yoffset
fitInView();
}
property int relativey : y - yoffset
onYChanged: relativey = y - yoffset
// keep inside view
Connections {
target: root
......@@ -104,10 +96,10 @@ Item {
x = root.width - width;
if (x < 0)
x = 0;
if (y - yoffset + height > root.height)
y = root.height - height + yoffset;
if (y < yoffset)
y = yoffset;
if (y + height > root.height)
y = root.height - height;
if (y < 0)
y = 0;
}
// shadow
......@@ -192,8 +184,8 @@ Item {
drag.target: parent
drag.minimumX: 0
drag.maximumX: root.width - parent.width
drag.minimumY: yoffset
drag.maximumY: root.height - parent.height + yoffset
drag.minimumY: 0
drag.maximumY: root.height - parent.height
onClicked: {
root.gotoSourceLocation(file, line, column);
root.recenterOnItem(view.selectedModel, view.selectedItem);
......
......@@ -45,14 +45,6 @@ Item {
x: 200
y: 125
property int yoffset: root.scrollY
onYoffsetChanged: {
y = relativey + yoffset
fitInView();
}
property int relativey : y - yoffset
onYChanged: relativey = y - yoffset
// keep inside view
Connections {
target: root
......@@ -69,10 +61,10 @@ Item {
x = root.width - width;
if (x < 0)
x = 0;
if (y + height - yoffset > root.height)
y = root.height - height + yoffset;
if (y < yoffset)
y = yoffset;
if (y + height > root.height)
y = root.height - height;
if (y < 0)
y = 0;
}
// shadow
......@@ -161,8 +153,8 @@ Item {
drag.target: parent
drag.minimumX: 0
drag.maximumX: root.width - parent.width
drag.minimumY: yoffset
drag.maximumY: root.height - parent.height + yoffset
drag.minimumY: 0
drag.maximumY: root.height - parent.height + 0
onClicked: {
if ((selectionRange.x < flick.contentX) ^ (selectionRange.x+selectionRange.width > flick.contentX + flick.width)) {
root.recenter(selectionRange.startTime + selectionRange.duration/2);
......
......@@ -238,7 +238,6 @@ void QmlProfilerTraceView::reset()
connect(this, SIGNAL(jumpToNext()), rootObject, SLOT(nextEvent()));
connect(rootObject, SIGNAL(selectedEventChanged(int)), this, SIGNAL(selectedEventChanged(int)));
connect(rootObject, SIGNAL(changeToolTip(QString)), this, SLOT(updateToolTip(QString)));
connect(rootObject, SIGNAL(updateVerticalScroll(int)), this, SLOT(updateVerticalScroll(int)));
}
QWidget *QmlProfilerTraceView::createToolbar()
......@@ -373,8 +372,6 @@ qint64 QmlProfilerTraceView::selectionEnd() const
void QmlProfilerTraceView::clearDisplay()
{
d->m_zoomControl->setRange(0,0);
updateVerticalScroll(0);
d->m_mainView->rootObject()->setProperty("scrollY", QVariant(0));
QMetaObject::invokeMethod(d->m_mainView->rootObject(), "clearAll");
......@@ -496,10 +493,6 @@ void QmlProfilerTraceView::updateToolTip(const QString &text)
setToolTip(text);
}
void QmlProfilerTraceView::updateVerticalScroll(int /*newPosition*/)
{
}
void QmlProfilerTraceView::resizeEvent(QResizeEvent *event)
{
QWidget::resizeEvent(event);
......
......@@ -117,7 +117,6 @@ private slots:
void mouseWheelMoved(int mouseX, int mouseY, int wheelDelta);
void updateToolTip(const QString &text);
void updateVerticalScroll(int newPosition);
void profilerDataModelStateChanged();
protected:
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment