forked from qt-creator/qt-creator
QmlProfiler: Avoid generic property types in QML
Change-Id: I4dddf19d37004f59bfbe75b45e0b626bf1563fa2 Reviewed-by: Kai Koehne <kai.koehne@digia.com>
This commit is contained in:
committed by
Kai Koehne
parent
a2d771b41e
commit
c9a851c649
@@ -36,9 +36,9 @@ Item {
|
|||||||
property int categoryIndex: qmlProfilerModelProxy.correctedCategoryIndexForModel(modelIndex, index)
|
property int categoryIndex: qmlProfilerModelProxy.correctedCategoryIndexForModel(modelIndex, index)
|
||||||
property int modelIndex: qmlProfilerModelProxy.modelIndexForCategory(index);
|
property int modelIndex: qmlProfilerModelProxy.modelIndexForCategory(index);
|
||||||
|
|
||||||
property variant descriptions: []
|
property var descriptions: []
|
||||||
property variant extdescriptions: []
|
property var extdescriptions: []
|
||||||
property variant eventIds: []
|
property var eventIds: []
|
||||||
|
|
||||||
visible: qmlProfilerModelProxy.categoryDepth(modelIndex, categoryIndex) > 0;
|
visible: qmlProfilerModelProxy.categoryDepth(modelIndex, categoryIndex) > 0;
|
||||||
|
|
||||||
|
|||||||
@@ -51,7 +51,7 @@ Rectangle {
|
|||||||
signal selectedEventChanged(int eventId)
|
signal selectedEventChanged(int eventId)
|
||||||
property bool lockItemSelection : false
|
property bool lockItemSelection : false
|
||||||
|
|
||||||
property variant mainviewTimePerPixel : 0
|
property real mainviewTimePerPixel : 0
|
||||||
|
|
||||||
signal updateCursorPosition
|
signal updateCursorPosition
|
||||||
property string fileName: ""
|
property string fileName: ""
|
||||||
@@ -62,8 +62,8 @@ Rectangle {
|
|||||||
property bool selectionRangeMode: false
|
property bool selectionRangeMode: false
|
||||||
|
|
||||||
property bool selectionRangeReady: selectionRange.ready
|
property bool selectionRangeReady: selectionRange.ready
|
||||||
property variant selectionRangeStart: selectionRange.startTime
|
property real selectionRangeStart: selectionRange.startTime
|
||||||
property variant selectionRangeEnd: selectionRange.startTime + selectionRange.duration
|
property real selectionRangeEnd: selectionRange.startTime + selectionRange.duration
|
||||||
|
|
||||||
signal changeToolTip(string text)
|
signal changeToolTip(string text)
|
||||||
signal updateVerticalScroll(int newPosition)
|
signal updateVerticalScroll(int newPosition)
|
||||||
@@ -410,7 +410,7 @@ Rectangle {
|
|||||||
width: flick.width
|
width: flick.width
|
||||||
height: root.height
|
height: root.height
|
||||||
|
|
||||||
property variant startX: 0
|
property real startX: 0
|
||||||
onStartXChanged: {
|
onStartXChanged: {
|
||||||
var newStartTime = Math.round(startX * (endTime - startTime) / flick.width) +
|
var newStartTime = Math.round(startX * (endTime - startTime) / flick.width) +
|
||||||
qmlProfilerModelProxy.traceStartTime();
|
qmlProfilerModelProxy.traceStartTime();
|
||||||
|
|||||||
@@ -37,8 +37,8 @@ Canvas2D {
|
|||||||
// ***** properties
|
// ***** properties
|
||||||
height: 50
|
height: 50
|
||||||
property bool dataReady: false
|
property bool dataReady: false
|
||||||
property variant startTime : 0
|
property real startTime : 0
|
||||||
property variant endTime : 0
|
property real endTime : 0
|
||||||
|
|
||||||
// ***** functions
|
// ***** functions
|
||||||
function clearDisplay()
|
function clearDisplay()
|
||||||
|
|||||||
@@ -65,7 +65,7 @@ Item {
|
|||||||
onCandidateHeightChanged: fitInView();
|
onCandidateHeightChanged: fitInView();
|
||||||
}
|
}
|
||||||
|
|
||||||
//property variant eventInfo
|
//property int eventInfo
|
||||||
|
|
||||||
ListModel {
|
ListModel {
|
||||||
id: eventInfo
|
id: eventInfo
|
||||||
|
|||||||
@@ -47,15 +47,15 @@ Rectangle {
|
|||||||
property string endTimeString: detailedPrintTime(startTime+duration)
|
property string endTimeString: detailedPrintTime(startTime+duration)
|
||||||
property string durationString: detailedPrintTime(duration)
|
property string durationString: detailedPrintTime(duration)
|
||||||
|
|
||||||
property variant startTime: x * selectionRange.viewTimePerPixel + qmlProfilerModelProxy.traceStartTime()
|
property real startTime: x * selectionRange.viewTimePerPixel + qmlProfilerModelProxy.traceStartTime()
|
||||||
property variant duration: width * selectionRange.viewTimePerPixel
|
property real duration: width * selectionRange.viewTimePerPixel
|
||||||
property variant viewTimePerPixel: 1
|
property real viewTimePerPixel: 1
|
||||||
property variant creationState : 0
|
property int creationState : 0
|
||||||
|
|
||||||
property variant x1
|
property real x1
|
||||||
property variant x2
|
property real x2
|
||||||
property variant x3: Math.min(x1, x2)
|
property real x3: Math.min(x1, x2)
|
||||||
property variant x4: Math.max(x1, x2)
|
property real x4: Math.max(x1, x2)
|
||||||
|
|
||||||
property bool isDragging: false
|
property bool isDragging: false
|
||||||
|
|
||||||
|
|||||||
@@ -33,9 +33,9 @@ import Monitor 1.0
|
|||||||
Canvas2D {
|
Canvas2D {
|
||||||
id: timeDisplay
|
id: timeDisplay
|
||||||
|
|
||||||
property variant startTime : 0
|
property real startTime : 0
|
||||||
property variant endTime : 0
|
property real endTime : 0
|
||||||
property variant timePerPixel: 0
|
property real timePerPixel: 0
|
||||||
|
|
||||||
|
|
||||||
Component.onCompleted: {
|
Component.onCompleted: {
|
||||||
|
|||||||
@@ -33,9 +33,9 @@ import Monitor 1.0
|
|||||||
Canvas2D {
|
Canvas2D {
|
||||||
id: timeDisplay
|
id: timeDisplay
|
||||||
|
|
||||||
property variant startTime
|
property real startTime
|
||||||
property variant endTime
|
property real endTime
|
||||||
property variant timePerPixel
|
property real timePerPixel
|
||||||
|
|
||||||
Component.onCompleted: {
|
Component.onCompleted: {
|
||||||
requestRedraw();
|
requestRedraw();
|
||||||
|
|||||||
Reference in New Issue
Block a user