提交 b14e7a57 authored 作者: João Mesquita's avatar João Mesquita

Finally! Not hitting 100% CPU usage anymore.

git-svn-id: http://svn.freeswitch.org/svn/freeswitch/trunk/contrib@14926 d0543943-73ff-0310-b7d9-9358b9ac24b2
上级 0f3c9a9f
......@@ -38,6 +38,7 @@ void ConsoleModel::clear()
void ConsoleModel::appendRow ( QStandardItem* item )
{
_listInsertModel.append(item);
insertionTimer->start(0, this);
}
void ConsoleModel::timerEvent(QTimerEvent *e)
......@@ -47,6 +48,7 @@ void ConsoleModel::timerEvent(QTimerEvent *e)
{
if (!_listInsertModel.isEmpty())
{
qDebug() << "Are we being called like crazy?";
int inserted_items = 0;
int toBeInserted = 0;
if (_listInsertModel.size() < batchSize)
......@@ -64,6 +66,8 @@ void ConsoleModel::timerEvent(QTimerEvent *e)
}
endInsertRows();
emit afterInserting();
} else {
insertionTimer->stop();
}
}
}
......
Markdown 格式
0%
您添加了 0 到此讨论。请谨慎行事。
请先完成此评论的编辑!
注册 或者 后发表评论