forked from qt-creator/qt-creator
Valgrind: Fix possible crashes
Change-Id: Ifae94d68d6c83f65a1938bfe41b4c5932407c0cf Reviewed-by: hjk <hjk@theqtcompany.com>
This commit is contained in:
@@ -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());
|
||||
|
||||
|
Reference in New Issue
Block a user