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:
Ulf Hermann
2015-11-11 11:44:55 +01:00
parent 07241006ee
commit 35ce8f50df
4 changed files with 0 additions and 43 deletions

View File

@@ -345,11 +345,6 @@ void QmlProfilerEventsWidget::selectByTypeId(int typeIndex) const
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)
{
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
{
QModelIndexList sel = selectedIndexes();

View File

@@ -106,7 +106,6 @@ signals:
public slots:
void selectByTypeId(int typeIndex) const;
void selectBySourceLocation(const QString &filename, int line, int column);
void onVisibleFeaturesChanged(quint64 features);
protected:
@@ -150,7 +149,6 @@ public slots:
void clear();
void jumpToItem(const QModelIndex &index);
void selectType(int typeIndex);
void selectByLocation(const QString &filename, int line, int column);
void buildModel();
void updateNotes(int typeIndex);

View File

@@ -194,24 +194,6 @@ void QmlProfilerTraceView::selectByTypeId(int 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)
{
QQuickItem *rootObject = d->m_mainView->rootObject();

View File

@@ -66,7 +66,6 @@ public:
public slots:
void clear();
void selectByTypeId(int typeId);
void selectBySourceLocation(const QString &filename, int line, int column);
void selectByEventIndex(int modelId, int eventIndex);
void updateCursorPosition();