Welcome: Start some performance improvements

This is essentially a widgets based re-implementation
of the current design. It is still using the QAIM based
interface layer between to the real data and display even
though this is not needed with this approach.
Removal of this layer would further reduce code size
and cycle counts.

For now:
               old          new
Load time    215ms        182ms
delete        22ms          2ms

Change-Id: I90d779a60a47a78399eaad0f1bc032d39f3ae3c0
Reviewed-by: Eike Ziller <eike.ziller@qt.io>
Reviewed-by: Alessandro Portale <alessandro.portale@qt.io>
This commit is contained in:
hjk
2017-01-06 21:41:46 +01:00
parent 36d1a75118
commit 16944277d2
59 changed files with 1443 additions and 3184 deletions

View File

@@ -629,10 +629,8 @@ QString prefixForItem(const ExampleItem &item)
QVariant ExamplesListModel::data(const QModelIndex &index, int role) const
{
if (!index.isValid() || index.row()+1 > m_exampleItems.count()) {
qDebug() << Q_FUNC_INFO << "invalid index requested";
if (!index.isValid() || index.row()+1 > m_exampleItems.count())
return QVariant();
}
ExampleItem item = m_exampleItems.at(index.row());
switch (role)
@@ -674,7 +672,6 @@ QVariant ExamplesListModel::data(const QModelIndex &index, int role) const
case IsHighlighted:
return item.isHighlighted;
default:
qDebug() << Q_FUNC_INFO << "role type not supported";
return QVariant();
}
}