forked from qt-creator/qt-creator
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:
@@ -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();
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user