refs #325, added some comments to simplify review

This commit is contained in:
Klaus Basan
2014-09-29 03:35:06 +02:00
parent e929423fc9
commit e745885906
2 changed files with 12 additions and 6 deletions

View File

@@ -171,7 +171,7 @@ namespace BlackGui
* \param container used list
* \param column column inder
* \param order sort order (ascending / descending)
* \threadsafe
* \threadsafe under normal conditions thread safe as long as the column metadata are not changed
*/
ContainerType sortContainerByColumn(const ContainerType &container, int column, Qt::SortOrder order) const;
@@ -247,6 +247,7 @@ namespace BlackGui
m_container = m_model->sortContainerByColumn(m_container, m_sortColumn, m_sortOrder);
}
// now update model itself thread safe, but time for sort was saved
// the invoked method itself will run in the main thread's event loop again
QMetaObject::invokeMethod(m_model, "updateContainer", Qt::QueuedConnection,
Q_ARG(QVariant, m_container.toQVariant()), Q_ARG(bool, false));
}