Skip to content

Commit

Permalink
Valgrind: Remove some dead ends
Browse files Browse the repository at this point in the history
Detected by Axivion plugin.

Change-Id: Ieba20a8fe370b467359d5e3c0a7eea0989fca0b7
  • Loading branch information
JarekKobus committed Feb 7, 2025
1 parent f8a7ff0 commit bb455db
Show file tree
Hide file tree
Showing 7 changed files with 0 additions and 58 deletions.
20 changes: 0 additions & 20 deletions src/plugins/valgrind/callgrind/callgrindcallmodel.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -48,26 +48,11 @@ void CallModel::setCalls(const QList<const FunctionCall *> &calls, const Functio
endResetModel();
}

QList<const FunctionCall *> CallModel::calls() const
{
return d->m_calls;
}

const Function *CallModel::function() const
{
return d->m_function;
}

void CallModel::setCostEvent(int event)
{
d->m_event = event;
}

int CallModel::costEvent() const
{
return d->m_event;
}

void CallModel::setParseData(const ParseDataPtr &data)
{
if (d->m_data == data)
Expand All @@ -79,11 +64,6 @@ void CallModel::setParseData(const ParseDataPtr &data)
d->m_data = data;
}

ParseDataPtr CallModel::parseData() const
{
return d->m_data;
}

int CallModel::rowCount(const QModelIndex &parent) const
{
QTC_ASSERT(!parent.isValid() || parent.model() == this, return 0);
Expand Down
4 changes: 0 additions & 4 deletions src/plugins/valgrind/callgrind/callgrindcallmodel.h
Original file line number Diff line number Diff line change
Expand Up @@ -28,15 +28,11 @@ class CallModel : public QAbstractItemModel

/// Only one cost event column will be shown, this decides which one it is.
/// By default it is the first event in the @c ParseData, i.e. 0.
int costEvent() const;
void setCostEvent(int event);

void setParseData(const ParseDataPtr &data);
ParseDataPtr parseData() const;

void setCalls(const QList<const FunctionCall *> &calls, const Function *function);
QList<const FunctionCall *> calls() const;
const Function *function() const;

int rowCount(const QModelIndex &parent = QModelIndex()) const override;
int columnCount(const QModelIndex &parent = QModelIndex()) const override;
Expand Down
10 changes: 0 additions & 10 deletions src/plugins/valgrind/callgrind/callgrinddatamodel.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -67,11 +67,6 @@ void DataModel::setVerboseToolTipsEnabled(bool enabled)
d->m_verboseToolTips = enabled;
}

bool DataModel::verboseToolTipsEnabled() const
{
return d->m_verboseToolTips;
}

ParseDataPtr DataModel::parseData() const
{
return d->m_data;
Expand All @@ -90,11 +85,6 @@ void DataModel::setCostEvent(int event)
emit dataChanged(index(0, SelfCostColumn), index(qMax(0, rowCount() - 1), InclusiveCostColumn));
}

int DataModel::costEvent() const
{
return d->m_event;
}

int DataModel::rowCount(const QModelIndex &parent) const
{
QTC_ASSERT(!parent.isValid() || parent.model() == this, return 0);
Expand Down
5 changes: 0 additions & 5 deletions src/plugins/valgrind/callgrind/callgrinddatamodel.h
Original file line number Diff line number Diff line change
Expand Up @@ -25,11 +25,6 @@ class DataModel : public QAbstractItemModel
ParseDataPtr parseData() const;

void setVerboseToolTipsEnabled(bool enabled);
bool verboseToolTipsEnabled() const;

/// Only one cost event column will be shown, this decides which one it is.
/// By default it is the first event in the @c ParseData, i.e. 0.
int costEvent() const;

int rowCount(const QModelIndex &parent = QModelIndex()) const override;
int columnCount(const QModelIndex &parent = QModelIndex()) const override;
Expand Down
2 changes: 0 additions & 2 deletions src/plugins/valgrind/callgrind/callgrindproxymodel.h
Original file line number Diff line number Diff line change
Expand Up @@ -19,9 +19,7 @@ class DataProxyModel : public QSortFilterProxyModel

void setSourceModel(QAbstractItemModel *sourceModel) override;

QString filterBaseDir() const { return m_baseDir; }
const Function *filterFunction() const;
int filterMaximumRows() const { return m_maxRows; }

/// Only functions with an inclusive cost ratio above this minimum will be shown in the model
double minimumInclusiveCostRatio() const { return m_minimumInclusiveCostRatio; }
Expand Down
16 changes: 0 additions & 16 deletions src/plugins/valgrind/callgrindvisualisation.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -58,7 +58,6 @@ class FunctionGraphicsItem : public QGraphicsRectItem

void paint(QPainter *painter,
const QStyleOptionGraphicsItem *option, QWidget *widget) override;
FunctionGraphicsTextItem *textItem() const;

private:
FunctionGraphicsTextItem *m_text = nullptr;
Expand Down Expand Up @@ -139,11 +138,6 @@ FunctionGraphicsItem::FunctionGraphicsItem(const QString &text,
m_text->setPos(rect().center().x(), y);
}

FunctionGraphicsTextItem *FunctionGraphicsItem::textItem() const
{
return m_text;
}

void FunctionGraphicsItem::paint(QPainter *painter,
const QStyleOptionGraphicsItem *option, QWidget *)
{
Expand Down Expand Up @@ -265,16 +259,6 @@ const Function *Visualization::functionForItem(QGraphicsItem *item) const
return item->data(FunctionGraphicsItem::FunctionCallKey).value<const Function *>();
}

QGraphicsItem *Visualization::itemForFunction(const Function *function) const
{
const QList<QGraphicsItem *> itemList = items();
for (QGraphicsItem *item : itemList) {
if (functionForItem(item) == function)
return item;
}
return nullptr;
}

void Visualization::setFunction(const Function *function)
{
d->m_model->setFilterFunction(function);
Expand Down
1 change: 0 additions & 1 deletion src/plugins/valgrind/callgrindvisualisation.h
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,6 @@ class Visualization : public QGraphicsView
void setModel(QAbstractItemModel *model);

const Valgrind::Callgrind::Function *functionForItem(QGraphicsItem *item) const;
QGraphicsItem *itemForFunction(const Valgrind::Callgrind::Function *function) const;

void setFunction(const Valgrind::Callgrind::Function *function);
const Valgrind::Callgrind::Function *function() const;
Expand Down

0 comments on commit bb455db

Please sign in to comment.