diff options
author | Christiaan Janssen <christiaan.janssen@nokia.com> | 2011-11-10 11:19:22 +0100 |
---|---|---|
committer | Christiaan Janssen <christiaan.janssen@nokia.com> | 2011-11-10 11:39:49 +0100 |
commit | efa7e7a43a3ecf7a6e7fbf01c1302ecb218ffa1b (patch) | |
tree | 4e9bfc54bdd89118f49efc1d3f2cbeab839c7223 /src/plugins/qmlprofiler/qmlprofilereventview.cpp | |
parent | d09b3b903daf38b930ae95f7f76d56bcb4a3c843 (diff) | |
download | qt-creator-efa7e7a43a3ecf7a6e7fbf01c1302ecb218ffa1b.tar.gz |
QmlProfiler: changed labels in context menu for statistics
Change-Id: I125016944130c7171423e2dec80b2b03832cd282
Reviewed-by: Kai Koehne <kai.koehne@nokia.com>
Diffstat (limited to 'src/plugins/qmlprofiler/qmlprofilereventview.cpp')
-rw-r--r-- | src/plugins/qmlprofiler/qmlprofilereventview.cpp | 14 |
1 files changed, 14 insertions, 0 deletions
diff --git a/src/plugins/qmlprofiler/qmlprofilereventview.cpp b/src/plugins/qmlprofiler/qmlprofilereventview.cpp index b5b1ee1eae..7de11d5c89 100644 --- a/src/plugins/qmlprofiler/qmlprofilereventview.cpp +++ b/src/plugins/qmlprofiler/qmlprofilereventview.cpp @@ -117,6 +117,8 @@ QmlProfilerEventsWidget::QmlProfilerEventsWidget(QmlJsDebugClient::QmlProfilerEv connect(model,SIGNAL(dataReady()),m_eventChildren,SLOT(clear())); connect(model,SIGNAL(dataReady()),m_eventParents,SLOT(clear())); } + + m_globalStatsEnabled = true; } QmlProfilerEventsWidget::~QmlProfilerEventsWidget() @@ -143,6 +145,7 @@ void QmlProfilerEventsWidget::getStatisticsInRange(qint64 rangeStart, qint64 ran { clear(); m_eventTree->getStatisticsInRange(rangeStart, rangeEnd); + m_globalStatsEnabled = m_eventTree->isRangeGlobal(rangeStart, rangeEnd); } QModelIndex QmlProfilerEventsWidget::selectedItem() const @@ -178,6 +181,11 @@ void QmlProfilerEventsWidget::updateSelectedEvent(int eventId) const m_eventTree->selectEvent(eventId); } +bool QmlProfilerEventsWidget::hasGlobalStats() const +{ + return m_globalStatsEnabled; +} + //////////////////////////////////////////////////////////////////////////////////// class QmlProfilerEventsMainView::QmlProfilerEventsMainViewPrivate @@ -553,6 +561,11 @@ void QmlProfilerEventsMainView::getStatisticsInRange(qint64 rangeStart, qint64 r buildModel(); } +bool QmlProfilerEventsMainView::isRangeGlobal(qint64 rangeStart, qint64 rangeEnd) const +{ + return d->m_eventStatistics->traceStartTime() == rangeStart && d->m_eventStatistics->traceEndTime() == rangeEnd; +} + int QmlProfilerEventsMainView::selectedEventId() const { QModelIndex index = selectedItem(); @@ -723,6 +736,7 @@ void QmlProfilerEventsParentsAndChildrenView::displayEvent(int eventId) updateHeader(); resizeColumnToContents(0); + setSortingEnabled(true); } void QmlProfilerEventsParentsAndChildrenView::rebuildTree(void *eventList) |