Diff
Modified: freeswitch/trunk/contrib/jmesquita/fsgui/src/plugins/consoleplugin/consoletabwidget.cpp (14676 => 14677)
--- freeswitch/trunk/contrib/jmesquita/fsgui/src/plugins/consoleplugin/consoletabwidget.cpp 2009-08-29 13:24:59 UTC (rev 14676)
+++ freeswitch/trunk/contrib/jmesquita/fsgui/src/plugins/consoleplugin/consoletabwidget.cpp 2009-08-30 01:11:46 UTC (rev 14677)
@@ -23,7 +23,7 @@
QObject::connect(sourceModel, SIGNAL(beforeInserting()),
this, SLOT(setConditionalScroll()));
- QObject::connect(sourceModel, SIGNAL(dataChanged(QModelIndex,QModelIndex)),
+ QObject::connect(sourceModel, SIGNAL(afterInserting()),
this, SLOT(conditionalScroll()));
QObject::connect(m_ui->btnSend, SIGNAL(clicked()),
Modified: freeswitch/trunk/contrib/jmesquita/fsgui/src/plugins/consoleplugin/sortfilterproxymodel.cpp (14676 => 14677)
--- freeswitch/trunk/contrib/jmesquita/fsgui/src/plugins/consoleplugin/sortfilterproxymodel.cpp 2009-08-29 13:24:59 UTC (rev 14676)
+++ freeswitch/trunk/contrib/jmesquita/fsgui/src/plugins/consoleplugin/sortfilterproxymodel.cpp 2009-08-30 01:11:46 UTC (rev 14677)
@@ -10,8 +10,10 @@
insertionTimer->start(0, this);
}
-int ConsoleModel::rowCount ( const QModelIndex & /*parent*/ ) const
+int ConsoleModel::rowCount ( const QModelIndex & parent ) const
{
+ if (parent.isValid())
+ return 0;
return _listDisplayModel.count();
}
@@ -49,21 +51,15 @@
} else {
toBeInserted = batchSize - 1;
}
- QModelIndex topLeft = QModelIndex();
- if (!_listDisplayModel.isEmpty())
- {
- topLeft = index(_listDisplayModel.size()-1,0,QModelIndex());
- }
emit beforeInserting();
beginInsertRows( QModelIndex(), _listDisplayModel.size(), _listDisplayModel.size() + toBeInserted );
- while( !_listInsertModel.isEmpty() && inserted_items < batchSize)
+ while( !_listInsertModel.isEmpty() && inserted_items <= batchSize)
{
_listDisplayModel.append(_listInsertModel.takeFirst());
inserted_items++;
}
endInsertRows();
- QModelIndex bottomRight = index(_listDisplayModel.size()-1,0,QModelIndex());
- emit dataChanged( topLeft, bottomRight );
+ emit afterInserting();
}
}
}
Modified: freeswitch/trunk/contrib/jmesquita/fsgui/src/plugins/consoleplugin/sortfilterproxymodel.h (14676 => 14677)
--- freeswitch/trunk/contrib/jmesquita/fsgui/src/plugins/consoleplugin/sortfilterproxymodel.h 2009-08-29 13:24:59 UTC (rev 14676)
+++ freeswitch/trunk/contrib/jmesquita/fsgui/src/plugins/consoleplugin/sortfilterproxymodel.h 2009-08-30 01:11:46 UTC (rev 14677)
@@ -64,6 +64,7 @@
};
signals:
void beforeInserting();
+ void afterInserting();
protected:
void timerEvent(QTimerEvent *);
private: