Revision
14926
Author
jmesquita
Date
2009-09-20 15:08:43 -0500 (Sun, 20 Sep 2009)

Log Message

Finally! Not hitting 100% CPU usage anymore.

Modified Paths

Diff

Modified: freeswitch/trunk/contrib/jmesquita/fsgui/src/plugins/consoleplugin/sortfilterproxymodel.cpp (14925 => 14926)


--- freeswitch/trunk/contrib/jmesquita/fsgui/src/plugins/consoleplugin/sortfilterproxymodel.cpp	2009-09-19 19:12:30 UTC (rev 14925)
+++ freeswitch/trunk/contrib/jmesquita/fsgui/src/plugins/consoleplugin/sortfilterproxymodel.cpp	2009-09-20 20:08:43 UTC (rev 14926)
@@ -38,6 +38,7 @@
 void ConsoleModel::appendRow ( QStandardItem* item )
 {
     _listInsertModel.append(item);
+    insertionTimer->start(0, this);
 }
 
 void ConsoleModel::timerEvent(QTimerEvent *e)
@@ -47,6 +48,7 @@
     {
         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 @@
             }
             endInsertRows();
             emit afterInserting();
+        } else {
+            insertionTimer->stop();
         }
     }
 }