Revision
14669
Author
jmesquita
Date
2009-08-28 19:19:18 -0500 (Fri, 28 Aug 2009)

Log Message

Finally solve the damn performance problem. Why is QListView slower then QTableView?

Modified Paths

Diff

Modified: freeswitch/trunk/contrib/jmesquita/fsgui/src/plugins/consoleplugin/consoleplugin.pro (14668 => 14669)


--- freeswitch/trunk/contrib/jmesquita/fsgui/src/plugins/consoleplugin/consoleplugin.pro	2009-08-28 21:48:13 UTC (rev 14668)
+++ freeswitch/trunk/contrib/jmesquita/fsgui/src/plugins/consoleplugin/consoleplugin.pro	2009-08-29 00:19:18 UTC (rev 14669)
@@ -52,3 +52,4 @@
     -L../../../../../../libs/esl/ \
     -lesl
 RESOURCES += ../../resources/resources.qrc
+

Modified: freeswitch/trunk/contrib/jmesquita/fsgui/src/plugins/consoleplugin/consoletabwidget.cpp (14668 => 14669)


--- freeswitch/trunk/contrib/jmesquita/fsgui/src/plugins/consoleplugin/consoletabwidget.cpp	2009-08-28 21:48:13 UTC (rev 14668)
+++ freeswitch/trunk/contrib/jmesquita/fsgui/src/plugins/consoleplugin/consoletabwidget.cpp	2009-08-29 00:19:18 UTC (rev 14669)
@@ -20,10 +20,13 @@
     model->setFilterKeyColumn(0);
     m_ui->consoleListView->setModel(model);
 
+    m_ui->consoleListView->setShowGrid(false);
+    m_ui->consoleListView->verticalHeader()->hide();
+    m_ui->consoleListView->horizontalHeader()->hide();
+
     QObject::connect(sourceModel, SIGNAL(beforeInserting()),
                      this, SLOT(setConditionalScroll()));
-    /*QObject::connect(sourceModel, SIGNAL(layoutChanged()),
-                     this, SLOT(conditionalScroll()));*/
+
     QObject::connect(sourceModel, SIGNAL(dataChanged(QModelIndex,QModelIndex)),
                      this, SLOT(conditionalScroll()));
 

Modified: freeswitch/trunk/contrib/jmesquita/fsgui/src/plugins/consoleplugin/consoletabwidget.ui (14668 => 14669)


--- freeswitch/trunk/contrib/jmesquita/fsgui/src/plugins/consoleplugin/consoletabwidget.ui	2009-08-28 21:48:13 UTC (rev 14668)
+++ freeswitch/trunk/contrib/jmesquita/fsgui/src/plugins/consoleplugin/consoletabwidget.ui	2009-08-29 00:19:18 UTC (rev 14669)
@@ -112,18 +112,7 @@
      <property name="orientation">
       <enum>Qt::Horizontal</enum>
      </property>
-     <widget class="QListView" name="consoleListView">
-      <property name="editTriggers">
-       <set>QAbstractItemView::NoEditTriggers</set>
-      </property>
-      <property name="selectionMode">
-       <enum>QAbstractItemView::ExtendedSelection</enum>
-      </property>
-      <property name="layoutMode">
-       <enum>QListView::SinglePass</enum>
-      </property>
-     </widget>
-     <widget class="QWidget" name="">
+     <widget class="QWidget" name="layoutWidget">
       <layout class="QVBoxLayout" name="verticalLayout_3">
        <property name="sizeConstraint">
         <enum>QLayout::SetMaximumSize</enum>
@@ -316,6 +305,62 @@
        </item>
       </layout>
      </widget>
+     <widget class="QTableView" name="consoleListView">
+      <property name="editTriggers">
+       <set>QAbstractItemView::NoEditTriggers</set>
+      </property>
+      <property name="showDropIndicator" stdset="0">
+       <bool>false</bool>
+      </property>
+      <property name="dragDropOverwriteMode">
+       <bool>false</bool>
+      </property>
+      <property name="selectionMode">
+       <enum>QAbstractItemView::ExtendedSelection</enum>
+      </property>
+      <property name="showGrid">
+       <bool>false</bool>
+      </property>
+      <property name="cornerButtonEnabled">
+       <bool>false</bool>
+      </property>
+      <attribute name="horizontalHeaderVisible">
+       <bool>false</bool>
+      </attribute>
+      <attribute name="horizontalHeaderHighlightSections">
+       <bool>false</bool>
+      </attribute>
+      <attribute name="horizontalHeaderStretchLastSection">
+       <bool>true</bool>
+      </attribute>
+      <attribute name="verticalHeaderVisible">
+       <bool>false</bool>
+      </attribute>
+      <attribute name="verticalHeaderHighlightSections">
+       <bool>false</bool>
+      </attribute>
+      <attribute name="verticalHeaderStretchLastSection">
+       <bool>false</bool>
+      </attribute>
+      <attribute name="verticalHeaderVisible">
+       <bool>false</bool>
+      </attribute>
+      <attribute name="horizontalHeaderStretchLastSection">
+       <bool>true</bool>
+      </attribute>
+      <attribute name="horizontalHeaderVisible">
+       <bool>false</bool>
+      </attribute>
+      <attribute name="horizontalHeaderHighlightSections">
+       <bool>false</bool>
+      </attribute>
+      <attribute name="verticalHeaderHighlightSections">
+       <bool>false</bool>
+      </attribute>
+      <attribute name="verticalHeaderStretchLastSection">
+       <bool>false</bool>
+      </attribute>
+     </widget>
     </widget>
    </item>
    <item>

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


--- freeswitch/trunk/contrib/jmesquita/fsgui/src/plugins/consoleplugin/sortfilterproxymodel.cpp	2009-08-28 21:48:13 UTC (rev 14668)
+++ freeswitch/trunk/contrib/jmesquita/fsgui/src/plugins/consoleplugin/sortfilterproxymodel.cpp	2009-08-29 00:19:18 UTC (rev 14669)
@@ -26,6 +26,7 @@
 void ConsoleModel::clear()
 {
     _listDisplayModel.clear();
+    reset();
 }
 
 void ConsoleModel::appendRow ( QStandardItem* item )