forked from qt-creator/qt-creator
QmlProfiler: remove dead code
We never propagate a selection by source location. Change-Id: I4594b88080bd1834572c0087db0397bc08a81d70 Reviewed-by: Joerg Bornemann <joerg.bornemann@theqtcompany.com>
This commit is contained in:
@@ -345,11 +345,6 @@ void QmlProfilerEventsWidget::selectByTypeId(int typeIndex) const
|
|||||||
d->m_eventTree->selectType(typeIndex);
|
d->m_eventTree->selectType(typeIndex);
|
||||||
}
|
}
|
||||||
|
|
||||||
void QmlProfilerEventsWidget::selectBySourceLocation(const QString &filename, int line, int column)
|
|
||||||
{
|
|
||||||
d->m_eventTree->selectByLocation(filename, line, column);
|
|
||||||
}
|
|
||||||
|
|
||||||
void QmlProfilerEventsWidget::onVisibleFeaturesChanged(quint64 features)
|
void QmlProfilerEventsWidget::onVisibleFeaturesChanged(quint64 features)
|
||||||
{
|
{
|
||||||
for (int i = 0; i < MaximumRangeType; ++i) {
|
for (int i = 0; i < MaximumRangeType; ++i) {
|
||||||
@@ -780,23 +775,6 @@ void QmlProfilerEventsMainView::selectType(int typeIndex)
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
void QmlProfilerEventsMainView::selectByLocation(const QString &filename, int line, int column)
|
|
||||||
{
|
|
||||||
if (d->m_preventSelectBounce)
|
|
||||||
return;
|
|
||||||
|
|
||||||
for (int i=0; i<d->m_model->rowCount(); i++) {
|
|
||||||
QStandardItem *infoItem = d->m_model->item(i, 0);
|
|
||||||
if (infoItem->data(FilenameRole).toString() == filename &&
|
|
||||||
infoItem->data(LineRole).toInt() == line &&
|
|
||||||
(column == -1 ||
|
|
||||||
infoItem->data(ColumnRole).toInt() == column)) {
|
|
||||||
selectItem(infoItem);
|
|
||||||
return;
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
QModelIndex QmlProfilerEventsMainView::selectedModelIndex() const
|
QModelIndex QmlProfilerEventsMainView::selectedModelIndex() const
|
||||||
{
|
{
|
||||||
QModelIndexList sel = selectedIndexes();
|
QModelIndexList sel = selectedIndexes();
|
||||||
|
|||||||
@@ -106,7 +106,6 @@ signals:
|
|||||||
|
|
||||||
public slots:
|
public slots:
|
||||||
void selectByTypeId(int typeIndex) const;
|
void selectByTypeId(int typeIndex) const;
|
||||||
void selectBySourceLocation(const QString &filename, int line, int column);
|
|
||||||
void onVisibleFeaturesChanged(quint64 features);
|
void onVisibleFeaturesChanged(quint64 features);
|
||||||
|
|
||||||
protected:
|
protected:
|
||||||
@@ -150,7 +149,6 @@ public slots:
|
|||||||
void clear();
|
void clear();
|
||||||
void jumpToItem(const QModelIndex &index);
|
void jumpToItem(const QModelIndex &index);
|
||||||
void selectType(int typeIndex);
|
void selectType(int typeIndex);
|
||||||
void selectByLocation(const QString &filename, int line, int column);
|
|
||||||
void buildModel();
|
void buildModel();
|
||||||
void updateNotes(int typeIndex);
|
void updateNotes(int typeIndex);
|
||||||
|
|
||||||
|
|||||||
@@ -194,24 +194,6 @@ void QmlProfilerTraceView::selectByTypeId(int typeId)
|
|||||||
QMetaObject::invokeMethod(rootObject, "selectByTypeId", Q_ARG(QVariant,QVariant(typeId)));
|
QMetaObject::invokeMethod(rootObject, "selectByTypeId", Q_ARG(QVariant,QVariant(typeId)));
|
||||||
}
|
}
|
||||||
|
|
||||||
void QmlProfilerTraceView::selectBySourceLocation(const QString &filename, int line, int column)
|
|
||||||
{
|
|
||||||
QQuickItem *rootObject = d->m_mainView->rootObject();
|
|
||||||
if (!rootObject)
|
|
||||||
return;
|
|
||||||
|
|
||||||
for (int modelIndex = 0; modelIndex < d->m_modelProxy->modelCount(); ++modelIndex) {
|
|
||||||
int typeId = d->m_modelProxy->model(modelIndex)->selectionIdForLocation(filename, line,
|
|
||||||
column);
|
|
||||||
if (typeId != -1) {
|
|
||||||
QMetaObject::invokeMethod(rootObject, "selectBySelectionId",
|
|
||||||
Q_ARG(QVariant,QVariant(modelIndex)),
|
|
||||||
Q_ARG(QVariant,QVariant(typeId)));
|
|
||||||
return;
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
void QmlProfilerTraceView::selectByEventIndex(int modelId, int eventIndex)
|
void QmlProfilerTraceView::selectByEventIndex(int modelId, int eventIndex)
|
||||||
{
|
{
|
||||||
QQuickItem *rootObject = d->m_mainView->rootObject();
|
QQuickItem *rootObject = d->m_mainView->rootObject();
|
||||||
|
|||||||
@@ -66,7 +66,6 @@ public:
|
|||||||
public slots:
|
public slots:
|
||||||
void clear();
|
void clear();
|
||||||
void selectByTypeId(int typeId);
|
void selectByTypeId(int typeId);
|
||||||
void selectBySourceLocation(const QString &filename, int line, int column);
|
|
||||||
void selectByEventIndex(int modelId, int eventIndex);
|
void selectByEventIndex(int modelId, int eventIndex);
|
||||||
void updateCursorPosition();
|
void updateCursorPosition();
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user