Commit 483b850a authored by Christian Stenger's avatar Christian Stenger

Valgrind: Fix possible crashes

Change-Id: Ifae94d68d6c83f65a1938bfe41b4c5932407c0cf
Reviewed-by: default avatarhjk <hjk@theqtcompany.com>
parent c7b81c60
......@@ -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) {
......
......@@ -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());
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment