videocollection/tsrc/stubs/src/videolistdatamodel.cpp
changeset 17 69946d1824c4
parent 15 cf5481c2bc0b
child 20 b9e04db066d4
--- a/videocollection/tsrc/stubs/src/videolistdatamodel.cpp	Fri Apr 16 14:59:52 2010 +0300
+++ b/videocollection/tsrc/stubs/src/videolistdatamodel.cpp	Mon May 03 12:32:50 2010 +0300
@@ -24,6 +24,7 @@
 QModelIndex VideoListDataModelData::mLastIndex;
 int VideoListDataModelData::mDataAccessCount = 0;
 int VideoListDataModelData::mRowCount = 0;
+int VideoListDataModelData::mRowCountDecrement = 0;
 
 VideoListDataModel::VideoListDataModel(QObject *parent) :
     QAbstractItemModel(parent),
@@ -103,7 +104,12 @@
 {
     Q_UNUSED(parent);
 
-    return VideoListDataModelData::mRowCount;
+    uint count = VideoListDataModelData::mRowCount - VideoListDataModelData::mRowCountDecrement;
+    if(VideoListDataModelData::mRowCountDecrement > 0)
+    {
+        VideoListDataModelData::mRowCountDecrement--;
+    }
+    return count;
 }
 
 QMap<int, QVariant> VideoListDataModel::itemData(const QModelIndex &index) const
@@ -135,12 +141,12 @@
     return QString();
 }
 
-QStringList VideoListDataModel::prepareLengthStrings(int index) const
+QString VideoListDataModel::prepareShortLengthString(int index) const
 {
     Q_UNUSED(index);
     
     // not stubbed
-    return QStringList();
+    return QString();
 }
 
 QVariant VideoListDataModel::data(const QModelIndex &index, int role) const