changeset 740:e22b6e89a7f7

Fix conversions from false to pointer type
author Chris Cannam
date Fri, 22 Jun 2012 09:25:32 +0100
parents 51d3b8e816b8
children aca6e61eaea3
files data/model/ImageModel.h data/model/IntervalModel.h data/model/NoteModel.h data/model/RegionModel.h data/model/SparseModel.h data/model/SparseOneDimensionalModel.h data/model/SparseTimeValueModel.h data/model/TextModel.h
diffstat 8 files changed, 16 insertions(+), 16 deletions(-) [+]
line wrap: on
line diff
--- 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);
--- 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"));
 
--- 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);
--- 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);
--- 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);
--- 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);
--- 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);
--- 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);