diff options
author | Eike Ziller <eike.ziller@theqtcompany.com> | 2015-06-17 12:04:21 +0200 |
---|---|---|
committer | Eike Ziller <eike.ziller@theqtcompany.com> | 2015-06-17 12:04:21 +0200 |
commit | 4dd95aa5d4fd349e4cb9dceb5c35b55cdbe5bc13 (patch) | |
tree | 4f6d55002a3cf98a9c2d6771401dc066ed0527e9 /src/plugins/valgrind/callgrind | |
parent | bea726e8e2948b1ccfe2b94e6dd0ac0c81957d9e (diff) | |
parent | 50c6343615e12398524d1a126fb19d6b8934337a (diff) | |
download | qt-creator-4dd95aa5d4fd349e4cb9dceb5c35b55cdbe5bc13.tar.gz |
Merge remote-tracking branch 'origin/3.4'
Change-Id: Id13cbdf2f7047366e543c91fbe7c21a9c4759e56
Diffstat (limited to 'src/plugins/valgrind/callgrind')
-rw-r--r-- | src/plugins/valgrind/callgrind/callgrindcallmodel.cpp | 5 | ||||
-rw-r--r-- | src/plugins/valgrind/callgrind/callgrinddatamodel.cpp | 5 |
2 files changed, 4 insertions, 6 deletions
diff --git a/src/plugins/valgrind/callgrind/callgrindcallmodel.cpp b/src/plugins/valgrind/callgrind/callgrindcallmodel.cpp index 44d8e33530..b743e679bc 100644 --- a/src/plugins/valgrind/callgrind/callgrindcallmodel.cpp +++ b/src/plugins/valgrind/callgrind/callgrindcallmodel.cpp @@ -167,9 +167,8 @@ QModelIndex CallModel::index(int row, int column, const QModelIndex &parent) con QVariant CallModel::data(const QModelIndex &index, int role) const { - //QTC_ASSERT(index.isValid() && index.model() == this, return QVariant()); - //QTC_ASSERT(index.column() >= 0 && index.column() < columnCount(index.parent()), return QVariant()); - //QTC_ASSERT(index.row() >= 0 && index.row() < rowCount(index.parent()), return QVariant()); + if (!index.isValid()) + return QVariant(); const FunctionCall *call = d->m_calls.at(index.row()); if (role == Qt::DisplayRole || role == Qt::ToolTipRole) { diff --git a/src/plugins/valgrind/callgrind/callgrinddatamodel.cpp b/src/plugins/valgrind/callgrind/callgrinddatamodel.cpp index 003f3c6408..2ee0cb4a9c 100644 --- a/src/plugins/valgrind/callgrind/callgrinddatamodel.cpp +++ b/src/plugins/valgrind/callgrind/callgrinddatamodel.cpp @@ -214,9 +214,8 @@ static QString shortenTemplate(QString str) QVariant DataModel::data(const QModelIndex &index, int role) const { - //QTC_ASSERT(index.isValid() && index.model() == this, return QVariant()); - //QTC_ASSERT(index.column() >= 0 && index.column() < columnCount(index.parent()), return QVariant()); - //QTC_ASSERT(index.row() >= 0 && index.row() < rowCount(index.parent()), return QVariant()); + if (!index.isValid()) + return QVariant(); const Function *func = d->m_functions.at(index.row()); |