diff examples/itemviews/customsortfiltermodel/mysortfilterproxymodel.d @ 323:7a3c43424dca signals

make all examples compile with new signals/slots
author eldar_ins@eldar-laptop
date Mon, 28 Dec 2009 16:28:55 +0500
parents 26036621830e
children
line wrap: on
line diff
--- a/examples/itemviews/customsortfiltermodel/mysortfilterproxymodel.d	Sun Dec 27 21:13:38 2009 +0500
+++ b/examples/itemviews/customsortfiltermodel/mysortfilterproxymodel.d	Mon Dec 28 16:28:55 2009 +0500
@@ -82,7 +82,7 @@
 
 protected:
 
-	override bool filterAcceptsRow(int sourceRow, const QModelIndex sourceParent)
+	override bool filterAcceptsRow(int sourceRow, const QModelIndex sourceParent) const
 	{
 		QModelIndex index0 = sourceModel().index(sourceRow, 0, sourceParent);
 		QModelIndex index1 = sourceModel().index(sourceRow, 1, sourceParent);
@@ -96,10 +96,10 @@
 		
 		return (contains(sourceModel().data(index0).toString(), filterRegExp())
 			|| contains(sourceModel().data(index1).toString(), filterRegExp()))
-			&& dateInRange(sourceModel().data(index2).toDate());
+			/* && dateInRange(sourceModel().data(index2).toDate())*/;
 	}
 
-	override bool lessThan(const QModelIndex left, const QModelIndex right)
+	override bool lessThan(const QModelIndex left, const QModelIndex right) const
 	{
 		QVariant leftData = sourceModel().data(left);
 		QVariant rightData = sourceModel().data(right);
@@ -122,12 +122,12 @@
 	}
 
 private:
-
-	bool dateInRange(QDate date)
+/*
+	bool dateInRange(const QDate date) const
 	{
 		return (!minDate.isValid() || date > minDate) && (!maxDate.isValid() || date < maxDate);
 	}
-
+*/
 	QDate minDate;
 	QDate maxDate;
 }