# HG changeset patch # User Chris Cannam # Date 1340353532 -3600 # Node ID e22b6e89a7f7332a59fbaccfc87b4a53c09c4bca # Parent 51d3b8e816b82ba7247466400859d34615cafef5 Fix conversions from false to pointer type diff -r 51d3b8e816b8 -r e22b6e89a7f7 data/model/ImageModel.h --- a/data/model/ImageModel.h Fri May 25 14:58:21 2012 +0100 +++ b/data/model/ImageModel.h Fri Jun 22 09:25:32 2012 +0100 @@ -181,9 +181,9 @@ (row, column, value, role); } - if (role != Qt::EditRole) return false; + if (role != Qt::EditRole) return 0; PointListIterator i = getPointListIteratorForRow(row); - if (i == m_points.end()) return false; + if (i == m_points.end()) return 0; EditCommand *command = new EditCommand(this, tr("Edit Data")); Point point(*i); diff -r 51d3b8e816b8 -r e22b6e89a7f7 data/model/IntervalModel.h --- a/data/model/IntervalModel.h Fri May 25 14:58:21 2012 +0100 +++ b/data/model/IntervalModel.h Fri Jun 22 09:25:32 2012 +0100 @@ -95,10 +95,10 @@ (row, column, value, role); } - if (role != Qt::EditRole) return false; + if (role != Qt::EditRole) return 0; typename I::PointList::const_iterator i = I::getPointListIteratorForRow(row); - if (i == I::m_points.end()) return false; + if (i == I::m_points.end()) return 0; typename I::EditCommand *command = new typename I::EditCommand (this, I::tr("Edit Data")); diff -r 51d3b8e816b8 -r e22b6e89a7f7 data/model/NoteModel.h --- a/data/model/NoteModel.h Fri May 25 14:58:21 2012 +0100 +++ b/data/model/NoteModel.h Fri Jun 22 09:25:32 2012 +0100 @@ -196,9 +196,9 @@ (row, column, value, role); } - if (role != Qt::EditRole) return false; + if (role != Qt::EditRole) return 0; PointListConstIterator i = getPointListIteratorForRow(row); - if (i == m_points.end()) return false; + if (i == m_points.end()) return 0; EditCommand *command = new EditCommand(this, tr("Edit Data")); Point point(*i); diff -r 51d3b8e816b8 -r e22b6e89a7f7 data/model/RegionModel.h --- a/data/model/RegionModel.h Fri May 25 14:58:21 2012 +0100 +++ b/data/model/RegionModel.h Fri Jun 22 09:25:32 2012 +0100 @@ -181,9 +181,9 @@ (row, column, value, role); } - if (role != Qt::EditRole) return false; + if (role != Qt::EditRole) return 0; PointListIterator i = getPointListIteratorForRow(row); - if (i == m_points.end()) return false; + if (i == m_points.end()) return 0; EditCommand *command = new EditCommand(this, tr("Edit Data")); Point point(*i); diff -r 51d3b8e816b8 -r e22b6e89a7f7 data/model/SparseModel.h --- a/data/model/SparseModel.h Fri May 25 14:58:21 2012 +0100 +++ b/data/model/SparseModel.h Fri Jun 22 09:25:32 2012 +0100 @@ -322,9 +322,9 @@ virtual Command *getSetDataCommand(int row, int column, const QVariant &value, int role) { - if (role != Qt::EditRole) return false; + if (role != Qt::EditRole) return 0; PointListIterator i = getPointListIteratorForRow(row); - if (i == m_points.end()) return false; + if (i == m_points.end()) return 0; EditCommand *command = new EditCommand(this, tr("Edit Data")); Point point(*i); diff -r 51d3b8e816b8 -r e22b6e89a7f7 data/model/SparseOneDimensionalModel.h --- a/data/model/SparseOneDimensionalModel.h Fri May 25 14:58:21 2012 +0100 +++ b/data/model/SparseOneDimensionalModel.h Fri Jun 22 09:25:32 2012 +0100 @@ -154,9 +154,9 @@ (row, column, value, role); } - if (role != Qt::EditRole) return false; + if (role != Qt::EditRole) return 0; PointListConstIterator i = getPointListIteratorForRow(row); - if (i == m_points.end()) return false; + if (i == m_points.end()) return 0; EditCommand *command = new EditCommand(this, tr("Edit Data")); Point point(*i); diff -r 51d3b8e816b8 -r e22b6e89a7f7 data/model/SparseTimeValueModel.h --- a/data/model/SparseTimeValueModel.h Fri May 25 14:58:21 2012 +0100 +++ b/data/model/SparseTimeValueModel.h Fri Jun 22 09:25:32 2012 +0100 @@ -147,9 +147,9 @@ (row, column, value, role); } - if (role != Qt::EditRole) return false; + if (role != Qt::EditRole) return 0; PointListConstIterator i = getPointListIteratorForRow(row); - if (i == m_points.end()) return false; + if (i == m_points.end()) return 0; EditCommand *command = new EditCommand(this, tr("Edit Data")); Point point(*i); diff -r 51d3b8e816b8 -r e22b6e89a7f7 data/model/TextModel.h --- a/data/model/TextModel.h Fri May 25 14:58:21 2012 +0100 +++ b/data/model/TextModel.h Fri Jun 22 09:25:32 2012 +0100 @@ -146,9 +146,9 @@ (row, column, value, role); } - if (role != Qt::EditRole) return false; + if (role != Qt::EditRole) return 0; PointListIterator i = getPointListIteratorForRow(row); - if (i == m_points.end()) return false; + if (i == m_points.end()) return 0; EditCommand *command = new EditCommand(this, tr("Edit Data")); Point point(*i);