QmlProfiler: hiding paintevents depending on Qt version

Change-Id: I7f542c8e3abe3eaf8e3221e174f5255a78ceff02
Reviewed-by: Kai Koehne <kai.koehne@digia.com>
This commit is contained in:
Christiaan Janssen
2013-06-13 16:23:22 +02:00
committed by Kai Koehne
parent 1068b288f6
commit 1b49b4df11
4 changed files with 22 additions and 27 deletions

View File

@@ -40,17 +40,11 @@ Item {
property variant extdescriptions: []
property variant eventIds: []
visible: qmlProfilerModelProxy.categoryDepth(modelIndex, categoryIndex) > 0;
height: root.singleRowHeight
width: 150
visible: (!qmlProfilerModelProxy.empty) && qmlProfilerModelProxy.categoryDepth(modelIndex,categoryIndex) > 0;
onVisibleChanged: {
if (visible) {
modelIndex = qmlProfilerModelProxy.modelIndexForCategory(index);
categoryIndex = qmlProfilerModelProxy.correctedCategoryIndexForModel(modelIndex, index);
}
}
onExpandedChanged: {
qmlProfilerModelProxy.setExpanded(modelIndex, categoryIndex, expanded);
backgroundMarks.requestRedraw();
@@ -67,6 +61,10 @@ Item {
}
function getDescriptions() {
visible = qmlProfilerModelProxy.categoryDepth(modelIndex, categoryIndex) > 0;
if (!visible)
return;
var desc=[];
var ids=[];
var extdesc=[];

View File

@@ -299,8 +299,8 @@ Rectangle {
// which tracks only events from the basic model
if (!lockItemSelection) {
lockItemSelection = true;
var itemIndex = view.nextItemFromId( eventId );
var modelIndex = qmlProfilerModelProxy.basicModelIndex();
var itemIndex = view.nextItemFromId( modelIndex, eventId );
// select an item, lock to it, and recenter if necessary
if (view.selectedItem != itemIndex || view.selectedModel != modelIndex) {
view.selectedModel = modelIndex;