forked from qt-creator/qt-creator
QmlProfiler: Coding style fixes
Change-Id: I302ea39510043b53464af47c45210c19dd232690 Reviewed-by: Christiaan Janssen <christiaan.janssen@nokia.com>
This commit is contained in:
@@ -1588,39 +1588,48 @@ void QmlProfilerEventList::load()
|
||||
}
|
||||
|
||||
///////////////////////////////////////////////
|
||||
qint64 QmlProfilerEventList::getStartTime(int index) const {
|
||||
qint64 QmlProfilerEventList::getStartTime(int index) const
|
||||
{
|
||||
return d->m_startTimeSortedList[index].startTime;
|
||||
}
|
||||
|
||||
qint64 QmlProfilerEventList::getEndTime(int index) const {
|
||||
qint64 QmlProfilerEventList::getEndTime(int index) const
|
||||
{
|
||||
return d->m_startTimeSortedList[index].startTime + d->m_startTimeSortedList[index].length;
|
||||
}
|
||||
|
||||
qint64 QmlProfilerEventList::getDuration(int index) const {
|
||||
qint64 QmlProfilerEventList::getDuration(int index) const
|
||||
{
|
||||
return d->m_startTimeSortedList[index].length;
|
||||
}
|
||||
|
||||
int QmlProfilerEventList::getType(int index) const {
|
||||
int QmlProfilerEventList::getType(int index) const
|
||||
{
|
||||
return d->m_startTimeSortedList[index].description->eventType;
|
||||
}
|
||||
|
||||
int QmlProfilerEventList::getNestingLevel(int index) const {
|
||||
int QmlProfilerEventList::getNestingLevel(int index) const
|
||||
{
|
||||
return d->m_startTimeSortedList[index].nestingLevel;
|
||||
}
|
||||
|
||||
int QmlProfilerEventList::getNestingDepth(int index) const {
|
||||
int QmlProfilerEventList::getNestingDepth(int index) const
|
||||
{
|
||||
return d->m_startTimeSortedList[index].nestingDepth;
|
||||
}
|
||||
|
||||
QString QmlProfilerEventList::getFilename(int index) const {
|
||||
QString QmlProfilerEventList::getFilename(int index) const
|
||||
{
|
||||
return d->m_startTimeSortedList[index].description->filename;
|
||||
}
|
||||
|
||||
int QmlProfilerEventList::getLine(int index) const {
|
||||
int QmlProfilerEventList::getLine(int index) const
|
||||
{
|
||||
return d->m_startTimeSortedList[index].description->line;
|
||||
}
|
||||
|
||||
QString QmlProfilerEventList::getDetails(int index) const {
|
||||
QString QmlProfilerEventList::getDetails(int index) const
|
||||
{
|
||||
// special: animations
|
||||
if (d->m_startTimeSortedList[index].description->eventType == QmlJsDebugClient::Painting &&
|
||||
d->m_startTimeSortedList[index].animationCount >= 0)
|
||||
@@ -1654,37 +1663,43 @@ int QmlProfilerEventList::getMinimumAnimationCount() const
|
||||
return d->m_minimumAnimationCount;
|
||||
}
|
||||
|
||||
int QmlProfilerEventList::uniqueEventsOfType(int type) const {
|
||||
int QmlProfilerEventList::uniqueEventsOfType(int type) const
|
||||
{
|
||||
if (!d->m_typeCounts.contains(type))
|
||||
return 0;
|
||||
return d->m_typeCounts[type]->eventIds.count();
|
||||
}
|
||||
|
||||
int QmlProfilerEventList::maxNestingForType(int type) const {
|
||||
int QmlProfilerEventList::maxNestingForType(int type) const
|
||||
{
|
||||
if (!d->m_typeCounts.contains(type))
|
||||
return 0;
|
||||
return d->m_typeCounts[type]->nestingCount;
|
||||
}
|
||||
|
||||
QString QmlProfilerEventList::eventTextForType(int type, int index) const {
|
||||
QString QmlProfilerEventList::eventTextForType(int type, int index) const
|
||||
{
|
||||
if (!d->m_typeCounts.contains(type))
|
||||
return QString();
|
||||
return d->m_eventDescriptions.values().at(d->m_typeCounts[type]->eventIds[index])->details;
|
||||
}
|
||||
|
||||
QString QmlProfilerEventList::eventDisplayNameForType(int type, int index) const {
|
||||
QString QmlProfilerEventList::eventDisplayNameForType(int type, int index) const
|
||||
{
|
||||
if (!d->m_typeCounts.contains(type))
|
||||
return QString();
|
||||
return d->m_eventDescriptions.values().at(d->m_typeCounts[type]->eventIds[index])->displayname;
|
||||
}
|
||||
|
||||
int QmlProfilerEventList::eventIdForType(int type, int index) const {
|
||||
int QmlProfilerEventList::eventIdForType(int type, int index) const
|
||||
{
|
||||
if (!d->m_typeCounts.contains(type))
|
||||
return -1;
|
||||
return d->m_typeCounts[type]->eventIds[index];
|
||||
}
|
||||
|
||||
int QmlProfilerEventList::eventPosInType(int index) const {
|
||||
int QmlProfilerEventList::eventPosInType(int index) const
|
||||
{
|
||||
int eventType = d->m_startTimeSortedList[index].description->eventType;
|
||||
return d->m_typeCounts[eventType]->eventIds.indexOf(d->m_startTimeSortedList[index].description->eventId);
|
||||
}
|
||||
|
||||
@@ -564,7 +564,7 @@ void TraceWindow::updateProfilerState()
|
||||
emit profilerStateChanged(qmlActive, v8Active);
|
||||
}
|
||||
|
||||
void TraceWindow::updateToolTip(QString text)
|
||||
void TraceWindow::updateToolTip(const QString &text)
|
||||
{
|
||||
setToolTip(text);
|
||||
}
|
||||
|
||||
@@ -126,7 +126,7 @@ public slots:
|
||||
void v8Complete();
|
||||
void selectNextEvent(int eventId);
|
||||
void updateProfilerState();
|
||||
void updateToolTip(QString text);
|
||||
void updateToolTip(const QString &text);
|
||||
|
||||
signals:
|
||||
void viewUpdated();
|
||||
|
||||
Reference in New Issue
Block a user