2013-08-08 13:28:08 +02:00
|
|
|
/****************************************************************************
|
|
|
|
|
**
|
2014-01-07 13:27:11 +01:00
|
|
|
** Copyright (C) 2014 Digia Plc and/or its subsidiary(-ies).
|
2013-08-08 13:28:08 +02:00
|
|
|
** Contact: http://www.qt-project.org/legal
|
|
|
|
|
**
|
|
|
|
|
** This file is part of Qt Creator.
|
|
|
|
|
**
|
|
|
|
|
** Commercial License Usage
|
|
|
|
|
** Licensees holding valid commercial Qt licenses may use this file in
|
|
|
|
|
** accordance with the commercial license agreement provided with the
|
|
|
|
|
** Software or, alternatively, in accordance with the terms contained in
|
|
|
|
|
** a written agreement between you and Digia. For licensing terms and
|
2014-10-01 13:21:18 +02:00
|
|
|
** conditions see http://www.qt.io/licensing. For further information
|
|
|
|
|
** use the contact form at http://www.qt.io/contact-us.
|
2013-08-08 13:28:08 +02:00
|
|
|
**
|
|
|
|
|
** GNU Lesser General Public License Usage
|
|
|
|
|
** Alternatively, this file may be used under the terms of the GNU Lesser
|
2014-10-01 13:21:18 +02:00
|
|
|
** General Public License version 2.1 or version 3 as published by the Free
|
|
|
|
|
** Software Foundation and appearing in the file LICENSE.LGPLv21 and
|
|
|
|
|
** LICENSE.LGPLv3 included in the packaging of this file. Please review the
|
|
|
|
|
** following information to ensure the GNU Lesser General Public License
|
|
|
|
|
** requirements will be met: https://www.gnu.org/licenses/lgpl.html and
|
|
|
|
|
** http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html.
|
2013-08-08 13:28:08 +02:00
|
|
|
**
|
|
|
|
|
** In addition, as a special exception, Digia gives you certain additional
|
|
|
|
|
** rights. These rights are described in the Digia Qt LGPL Exception
|
|
|
|
|
** version 1.1, included in the file LGPL_EXCEPTION.txt in this package.
|
|
|
|
|
**
|
|
|
|
|
****************************************************************************/
|
|
|
|
|
|
2014-10-27 17:41:22 +01:00
|
|
|
#include "qmlprofilerrangemodel.h"
|
2013-08-08 13:28:08 +02:00
|
|
|
#include "qmlprofilermodelmanager.h"
|
2014-02-18 17:32:20 +01:00
|
|
|
#include "qmlprofilerdatamodel.h"
|
2014-06-12 16:01:04 +02:00
|
|
|
#include "abstracttimelinemodel_p.h"
|
2013-08-08 13:28:08 +02:00
|
|
|
|
|
|
|
|
#include <QCoreApplication>
|
|
|
|
|
#include <QVector>
|
|
|
|
|
#include <QHash>
|
|
|
|
|
#include <QUrl>
|
|
|
|
|
#include <QString>
|
|
|
|
|
#include <QStack>
|
|
|
|
|
|
|
|
|
|
#include <QDebug>
|
|
|
|
|
|
|
|
|
|
namespace QmlProfiler {
|
|
|
|
|
namespace Internal {
|
|
|
|
|
|
2014-10-27 17:41:22 +01:00
|
|
|
class QmlProfilerRangeModel::QmlProfilerRangeModelPrivate : public AbstractTimelineModelPrivate
|
2013-08-08 13:28:08 +02:00
|
|
|
{
|
|
|
|
|
public:
|
|
|
|
|
// convenience functions
|
|
|
|
|
void computeNestingContracted();
|
|
|
|
|
void computeExpandedLevels();
|
|
|
|
|
void findBindingLoops();
|
|
|
|
|
|
2014-07-08 17:18:51 +02:00
|
|
|
QVector<QmlRangeEventStartInstance> data;
|
2014-06-13 16:34:30 +02:00
|
|
|
QVector<int> expandedRowTypes;
|
2014-02-14 16:20:13 +01:00
|
|
|
private:
|
2014-10-27 17:41:22 +01:00
|
|
|
Q_DECLARE_PUBLIC(QmlProfilerRangeModel)
|
2013-08-08 13:28:08 +02:00
|
|
|
};
|
|
|
|
|
|
2014-10-27 17:41:22 +01:00
|
|
|
QmlProfilerRangeModel::QmlProfilerRangeModel(QmlDebug::RangeType rangeType, QObject *parent)
|
|
|
|
|
: AbstractTimelineModel(new QmlProfilerRangeModelPrivate, categoryLabel(rangeType),
|
2014-07-08 13:02:33 +02:00
|
|
|
QmlDebug::MaximumMessage, rangeType, parent)
|
2013-08-08 13:28:08 +02:00
|
|
|
{
|
2014-10-27 17:41:22 +01:00
|
|
|
Q_D(QmlProfilerRangeModel);
|
2014-06-13 16:34:30 +02:00
|
|
|
d->expandedRowTypes << -1;
|
2013-08-08 13:28:08 +02:00
|
|
|
}
|
|
|
|
|
|
2014-10-27 17:41:22 +01:00
|
|
|
quint64 QmlProfilerRangeModel::features() const
|
2014-09-09 18:22:58 +02:00
|
|
|
{
|
2014-10-27 17:41:22 +01:00
|
|
|
Q_D(const QmlProfilerRangeModel);
|
2014-09-24 07:59:13 +03:00
|
|
|
return 1ULL << QmlDebug::featureFromRangeType(d->rangeType);
|
2014-09-09 18:22:58 +02:00
|
|
|
}
|
|
|
|
|
|
2014-10-27 17:41:22 +01:00
|
|
|
void QmlProfilerRangeModel::clear()
|
2013-08-08 13:28:08 +02:00
|
|
|
{
|
2014-10-27 17:41:22 +01:00
|
|
|
Q_D(QmlProfilerRangeModel);
|
2014-06-13 16:34:30 +02:00
|
|
|
d->expandedRowTypes.clear();
|
|
|
|
|
d->expandedRowTypes << -1;
|
2014-07-08 17:18:51 +02:00
|
|
|
d->data.clear();
|
|
|
|
|
AbstractTimelineModel::clear();
|
2013-08-08 13:28:08 +02:00
|
|
|
}
|
|
|
|
|
|
2014-10-27 17:41:22 +01:00
|
|
|
void QmlProfilerRangeModel::loadData()
|
2013-08-08 13:28:08 +02:00
|
|
|
{
|
2014-10-27 17:41:22 +01:00
|
|
|
Q_D(QmlProfilerRangeModel);
|
2013-08-08 13:28:08 +02:00
|
|
|
clear();
|
2014-02-18 17:32:20 +01:00
|
|
|
QmlProfilerDataModel *simpleModel = d->modelManager->qmlModel();
|
2013-08-08 13:28:08 +02:00
|
|
|
if (simpleModel->isEmpty())
|
|
|
|
|
return;
|
|
|
|
|
|
|
|
|
|
// collect events
|
2014-06-13 16:34:30 +02:00
|
|
|
const QVector<QmlProfilerDataModel::QmlEventData> &eventList = simpleModel->getEvents();
|
|
|
|
|
const QVector<QmlProfilerDataModel::QmlEventTypeData> &typesList = simpleModel->getEventTypes();
|
2014-02-18 17:32:20 +01:00
|
|
|
foreach (const QmlProfilerDataModel::QmlEventData &event, eventList) {
|
2014-06-13 16:34:30 +02:00
|
|
|
const QmlProfilerDataModel::QmlEventTypeData &type = typesList[event.typeIndex];
|
2014-07-08 14:43:15 +02:00
|
|
|
if (!accepted(type))
|
2013-08-08 13:28:08 +02:00
|
|
|
continue;
|
|
|
|
|
|
|
|
|
|
// store starttime-based instance
|
2014-08-29 19:30:30 +02:00
|
|
|
d->data.insert(insert(event.startTime, event.duration, event.typeIndex),
|
|
|
|
|
QmlRangeEventStartInstance());
|
2014-07-08 17:18:51 +02:00
|
|
|
d->modelManager->modelProxyCountUpdated(d->modelId, count(), eventList.count() * 6);
|
2013-08-08 13:28:08 +02:00
|
|
|
}
|
|
|
|
|
|
2014-02-14 16:20:13 +01:00
|
|
|
d->modelManager->modelProxyCountUpdated(d->modelId, 2, 6);
|
2013-08-08 13:28:08 +02:00
|
|
|
|
2013-12-04 16:05:02 +01:00
|
|
|
// compute range nesting
|
2014-07-08 17:18:51 +02:00
|
|
|
computeNesting();
|
2013-08-08 13:28:08 +02:00
|
|
|
|
|
|
|
|
// compute nestingLevel - nonexpanded
|
|
|
|
|
d->computeNestingContracted();
|
|
|
|
|
|
2014-02-14 16:20:13 +01:00
|
|
|
d->modelManager->modelProxyCountUpdated(d->modelId, 3, 6);
|
2013-08-08 13:28:08 +02:00
|
|
|
|
|
|
|
|
// compute nestingLevel - expanded
|
|
|
|
|
d->computeExpandedLevels();
|
|
|
|
|
|
2014-02-14 16:20:13 +01:00
|
|
|
d->modelManager->modelProxyCountUpdated(d->modelId, 4, 6);
|
2013-08-08 13:28:08 +02:00
|
|
|
|
|
|
|
|
d->findBindingLoops();
|
|
|
|
|
|
2014-02-14 16:20:13 +01:00
|
|
|
d->modelManager->modelProxyCountUpdated(d->modelId, 5, 6);
|
2013-08-08 13:28:08 +02:00
|
|
|
|
2014-02-14 16:20:13 +01:00
|
|
|
d->modelManager->modelProxyCountUpdated(d->modelId, 1, 1);
|
2013-08-08 13:28:08 +02:00
|
|
|
}
|
|
|
|
|
|
2014-10-27 17:41:22 +01:00
|
|
|
void QmlProfilerRangeModel::QmlProfilerRangeModelPrivate::computeNestingContracted()
|
2013-08-08 13:28:08 +02:00
|
|
|
{
|
2014-10-27 17:41:22 +01:00
|
|
|
Q_Q(QmlProfilerRangeModel);
|
2013-08-08 13:28:08 +02:00
|
|
|
int i;
|
2014-07-08 17:18:51 +02:00
|
|
|
int eventCount = q->count();
|
2013-08-08 13:28:08 +02:00
|
|
|
|
2014-06-12 15:34:38 +02:00
|
|
|
int nestingLevels = QmlDebug::Constants::QML_MIN_LEVEL;
|
2014-09-11 10:57:34 +02:00
|
|
|
collapsedRowCount = nestingLevels + 1;
|
2014-06-12 15:34:38 +02:00
|
|
|
QVector<qint64> nestingEndTimes;
|
|
|
|
|
nestingEndTimes.fill(0, nestingLevels + 1);
|
2013-08-08 13:28:08 +02:00
|
|
|
|
|
|
|
|
for (i = 0; i < eventCount; i++) {
|
2014-07-08 17:18:51 +02:00
|
|
|
qint64 st = q->ranges[i].start;
|
2013-08-08 13:28:08 +02:00
|
|
|
|
|
|
|
|
// per type
|
2014-06-12 15:34:38 +02:00
|
|
|
if (nestingEndTimes[nestingLevels] > st) {
|
2014-06-24 12:45:27 +02:00
|
|
|
if (++nestingLevels == nestingEndTimes.size())
|
2014-06-12 15:34:38 +02:00
|
|
|
nestingEndTimes << 0;
|
2014-09-11 10:57:34 +02:00
|
|
|
if (nestingLevels == collapsedRowCount)
|
|
|
|
|
++collapsedRowCount;
|
2013-08-08 13:28:08 +02:00
|
|
|
} else {
|
2014-06-12 15:34:38 +02:00
|
|
|
while (nestingLevels > QmlDebug::Constants::QML_MIN_LEVEL &&
|
|
|
|
|
nestingEndTimes[nestingLevels-1] <= st)
|
|
|
|
|
nestingLevels--;
|
2013-08-08 13:28:08 +02:00
|
|
|
}
|
2014-07-08 17:18:51 +02:00
|
|
|
nestingEndTimes[nestingLevels] = st + q->ranges[i].duration;
|
2013-08-08 13:28:08 +02:00
|
|
|
|
2014-07-08 17:18:51 +02:00
|
|
|
data[i].displayRowCollapsed = nestingLevels;
|
2013-08-08 13:28:08 +02:00
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
|
2014-10-27 17:41:22 +01:00
|
|
|
void QmlProfilerRangeModel::QmlProfilerRangeModelPrivate::computeExpandedLevels()
|
2013-08-08 13:28:08 +02:00
|
|
|
{
|
2014-10-27 17:41:22 +01:00
|
|
|
Q_Q(QmlProfilerRangeModel);
|
2013-08-08 13:28:08 +02:00
|
|
|
QHash<int, int> eventRow;
|
2014-07-08 17:18:51 +02:00
|
|
|
int eventCount = q->count();
|
2013-08-08 13:28:08 +02:00
|
|
|
for (int i = 0; i < eventCount; i++) {
|
2014-08-29 19:30:30 +02:00
|
|
|
int typeId = q->range(i).typeId;
|
2014-08-29 16:32:42 +02:00
|
|
|
if (!eventRow.contains(typeId)) {
|
|
|
|
|
eventRow[typeId] = expandedRowTypes.size();
|
|
|
|
|
expandedRowTypes << typeId;
|
2013-08-08 13:28:08 +02:00
|
|
|
}
|
2014-08-29 16:32:42 +02:00
|
|
|
data[i].displayRowExpanded = eventRow[typeId];
|
2013-08-08 13:28:08 +02:00
|
|
|
}
|
2014-09-11 10:57:34 +02:00
|
|
|
expandedRowCount = expandedRowTypes.size();
|
2013-08-08 13:28:08 +02:00
|
|
|
}
|
|
|
|
|
|
2014-10-27 17:41:22 +01:00
|
|
|
void QmlProfilerRangeModel::QmlProfilerRangeModelPrivate::findBindingLoops()
|
2013-08-08 13:28:08 +02:00
|
|
|
{
|
2014-10-27 17:41:22 +01:00
|
|
|
Q_Q(QmlProfilerRangeModel);
|
2014-06-06 17:36:11 +02:00
|
|
|
if (rangeType != QmlDebug::Binding && rangeType != QmlDebug::HandlingSignal)
|
|
|
|
|
return;
|
|
|
|
|
|
2014-06-13 16:34:30 +02:00
|
|
|
typedef QPair<int, int> CallStackEntry;
|
2013-08-08 13:28:08 +02:00
|
|
|
QStack<CallStackEntry> callStack;
|
|
|
|
|
|
2014-07-08 17:18:51 +02:00
|
|
|
for (int i = 0; i < q->count(); ++i) {
|
2013-12-04 16:05:02 +01:00
|
|
|
const Range *potentialParent = callStack.isEmpty()
|
2014-07-08 17:18:51 +02:00
|
|
|
? 0 : &q->ranges[callStack.top().second];
|
2013-08-08 13:28:08 +02:00
|
|
|
|
|
|
|
|
while (potentialParent
|
2014-07-08 17:18:51 +02:00
|
|
|
&& !(potentialParent->start + potentialParent->duration > q->ranges[i].start)) {
|
2013-08-08 13:28:08 +02:00
|
|
|
callStack.pop();
|
|
|
|
|
potentialParent = callStack.isEmpty() ? 0
|
2014-07-08 17:18:51 +02:00
|
|
|
: &q->ranges[callStack.top().second];
|
2013-08-08 13:28:08 +02:00
|
|
|
}
|
|
|
|
|
|
|
|
|
|
// check whether event is already in stack
|
|
|
|
|
for (int ii = 0; ii < callStack.size(); ++ii) {
|
2014-08-29 19:30:30 +02:00
|
|
|
if (callStack.at(ii).first == q->range(i).typeId) {
|
2014-07-08 17:18:51 +02:00
|
|
|
data[i].bindingLoopHead = callStack.at(ii).second;
|
2013-08-08 13:28:08 +02:00
|
|
|
break;
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
2014-08-29 19:30:30 +02:00
|
|
|
CallStackEntry newEntry(q->range(i).typeId, i);
|
2013-08-08 13:28:08 +02:00
|
|
|
callStack.push(newEntry);
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
/////////////////// QML interface
|
|
|
|
|
|
2014-10-27 17:41:22 +01:00
|
|
|
QString QmlProfilerRangeModel::categoryLabel(QmlDebug::RangeType rangeType)
|
2013-08-08 13:28:08 +02:00
|
|
|
{
|
2014-09-10 13:51:36 +02:00
|
|
|
return QCoreApplication::translate("MainView",
|
|
|
|
|
QmlProfilerModelManager::featureName(QmlDebug::featureFromRangeType(rangeType)));
|
2013-08-08 13:28:08 +02:00
|
|
|
}
|
|
|
|
|
|
2014-10-27 17:41:22 +01:00
|
|
|
int QmlProfilerRangeModel::row(int index) const
|
2013-08-08 13:28:08 +02:00
|
|
|
{
|
2014-10-27 17:41:22 +01:00
|
|
|
Q_D(const QmlProfilerRangeModel);
|
2014-06-06 17:36:11 +02:00
|
|
|
if (d->expanded)
|
2014-07-08 17:18:51 +02:00
|
|
|
return d->data[index].displayRowExpanded;
|
2013-08-08 13:28:08 +02:00
|
|
|
else
|
2014-07-08 17:18:51 +02:00
|
|
|
return d->data[index].displayRowCollapsed;
|
2013-08-08 13:28:08 +02:00
|
|
|
}
|
|
|
|
|
|
2014-10-27 17:41:22 +01:00
|
|
|
int QmlProfilerRangeModel::bindingLoopDest(int index) const
|
2013-08-08 13:28:08 +02:00
|
|
|
{
|
2014-10-27 17:41:22 +01:00
|
|
|
Q_D(const QmlProfilerRangeModel);
|
2014-07-08 17:18:51 +02:00
|
|
|
return d->data[index].bindingLoopHead;
|
2013-08-08 13:28:08 +02:00
|
|
|
}
|
|
|
|
|
|
2014-10-27 17:41:22 +01:00
|
|
|
QColor QmlProfilerRangeModel::color(int index) const
|
2013-08-08 13:28:08 +02:00
|
|
|
{
|
2014-08-29 16:32:42 +02:00
|
|
|
return colorBySelectionId(index);
|
2013-08-08 13:28:08 +02:00
|
|
|
}
|
|
|
|
|
|
2014-10-27 17:41:22 +01:00
|
|
|
QVariantList QmlProfilerRangeModel::labels() const
|
2013-08-08 13:28:08 +02:00
|
|
|
{
|
2014-10-27 17:41:22 +01:00
|
|
|
Q_D(const QmlProfilerRangeModel);
|
2013-08-08 13:28:08 +02:00
|
|
|
QVariantList result;
|
|
|
|
|
|
2014-09-11 11:20:52 +02:00
|
|
|
if (d->expanded && !d->hidden) {
|
2014-06-13 16:34:30 +02:00
|
|
|
const QVector<QmlProfilerDataModel::QmlEventTypeData> &types =
|
|
|
|
|
d->modelManager->qmlModel()->getEventTypes();
|
2014-09-11 10:57:34 +02:00
|
|
|
for (int i = 1; i < d->expandedRowCount; i++) { // Ignore the -1 for the first row
|
2014-06-06 17:36:11 +02:00
|
|
|
QVariantMap element;
|
2014-06-13 16:34:30 +02:00
|
|
|
int typeId = d->expandedRowTypes[i];
|
|
|
|
|
element.insert(QLatin1String("displayName"), QVariant(types[typeId].displayName));
|
|
|
|
|
element.insert(QLatin1String("description"), QVariant(types[typeId].data));
|
|
|
|
|
element.insert(QLatin1String("id"), QVariant(typeId));
|
2014-06-06 17:36:11 +02:00
|
|
|
result << element;
|
2013-08-08 13:28:08 +02:00
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
return result;
|
|
|
|
|
}
|
|
|
|
|
|
2014-10-27 17:41:22 +01:00
|
|
|
QVariantMap QmlProfilerRangeModel::details(int index) const
|
2013-08-08 13:28:08 +02:00
|
|
|
{
|
2014-10-27 17:41:22 +01:00
|
|
|
Q_D(const QmlProfilerRangeModel);
|
2014-07-07 14:02:29 +02:00
|
|
|
QVariantMap result;
|
2014-08-29 16:32:42 +02:00
|
|
|
int id = selectionId(index);
|
2014-06-13 16:34:30 +02:00
|
|
|
const QVector<QmlProfilerDataModel::QmlEventTypeData> &types =
|
|
|
|
|
d->modelManager->qmlModel()->getEventTypes();
|
2013-08-08 13:28:08 +02:00
|
|
|
|
2014-07-07 14:02:29 +02:00
|
|
|
result.insert(QStringLiteral("displayName"), categoryLabel(d->rangeType));
|
2014-07-08 17:18:51 +02:00
|
|
|
result.insert(tr("Duration"), QmlProfilerBaseModel::formatTime(range(index).duration));
|
2013-08-08 13:28:08 +02:00
|
|
|
|
2014-07-07 14:03:33 +02:00
|
|
|
result.insert(tr("Details"), types[id].data);
|
2014-07-07 14:02:29 +02:00
|
|
|
result.insert(tr("Location"), types[id].displayName);
|
2013-08-08 13:28:08 +02:00
|
|
|
return result;
|
|
|
|
|
}
|
|
|
|
|
|
2014-10-27 17:41:22 +01:00
|
|
|
QVariantMap QmlProfilerRangeModel::location(int index) const
|
2013-08-08 13:28:08 +02:00
|
|
|
{
|
2014-10-27 17:41:22 +01:00
|
|
|
Q_D(const QmlProfilerRangeModel);
|
2013-08-08 13:28:08 +02:00
|
|
|
QVariantMap result;
|
2014-08-29 16:32:42 +02:00
|
|
|
int id = selectionId(index);
|
2013-08-08 13:28:08 +02:00
|
|
|
|
2014-06-24 12:20:13 +02:00
|
|
|
const QmlDebug::QmlEventLocation &location
|
2014-07-08 14:43:15 +02:00
|
|
|
= d->modelManager->qmlModel()->getEventTypes().at(id).location;
|
2013-08-08 13:28:08 +02:00
|
|
|
|
2014-06-24 12:20:13 +02:00
|
|
|
result.insert(QStringLiteral("file"), location.filename);
|
|
|
|
|
result.insert(QStringLiteral("line"), location.line);
|
|
|
|
|
result.insert(QStringLiteral("column"), location.column);
|
2013-08-08 13:28:08 +02:00
|
|
|
|
|
|
|
|
return result;
|
|
|
|
|
}
|
|
|
|
|
|
2014-10-27 17:41:22 +01:00
|
|
|
bool QmlProfilerRangeModel::isSelectionIdValid(int typeId) const
|
2013-08-08 13:28:08 +02:00
|
|
|
{
|
2014-10-27 17:41:22 +01:00
|
|
|
Q_D(const QmlProfilerRangeModel);
|
2014-08-29 16:32:42 +02:00
|
|
|
if (typeId < 0)
|
|
|
|
|
return false;
|
2014-06-13 16:34:30 +02:00
|
|
|
const QmlProfilerDataModel::QmlEventTypeData &type =
|
2014-08-29 16:32:42 +02:00
|
|
|
d->modelManager->qmlModel()->getEventTypes().at(typeId);
|
2014-06-13 16:34:30 +02:00
|
|
|
if (type.message != d->message || type.rangeType != d->rangeType)
|
2014-08-29 16:32:42 +02:00
|
|
|
return false;
|
|
|
|
|
return true;
|
2013-08-08 13:28:08 +02:00
|
|
|
}
|
|
|
|
|
|
2014-10-27 17:41:22 +01:00
|
|
|
int QmlProfilerRangeModel::selectionIdForLocation(const QString &filename, int line, int column) const
|
2013-08-08 13:28:08 +02:00
|
|
|
{
|
2014-10-27 17:41:22 +01:00
|
|
|
Q_D(const QmlProfilerRangeModel);
|
2013-08-08 13:28:08 +02:00
|
|
|
// if this is called from v8 view, we don't have the column number, it will be -1
|
2014-06-13 16:34:30 +02:00
|
|
|
const QVector<QmlProfilerDataModel::QmlEventTypeData> &types =
|
|
|
|
|
d->modelManager->qmlModel()->getEventTypes();
|
2014-09-11 10:57:34 +02:00
|
|
|
for (int i = 1; i < d->expandedRowCount; ++i) {
|
2014-06-13 16:34:30 +02:00
|
|
|
int typeId = d->expandedRowTypes[i];
|
|
|
|
|
const QmlProfilerDataModel::QmlEventTypeData &eventData = types[typeId];
|
2013-08-08 13:28:08 +02:00
|
|
|
if (eventData.location.filename == filename &&
|
|
|
|
|
eventData.location.line == line &&
|
|
|
|
|
(column == -1 || eventData.location.column == column))
|
2014-06-13 16:34:30 +02:00
|
|
|
return typeId;
|
2013-08-08 13:28:08 +02:00
|
|
|
}
|
|
|
|
|
return -1;
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
}
|
|
|
|
|
}
|