Utils: Rename ListModel::forItems to ListModel::forAllData

This is more consistent with allData() and setAllData().

Adjust its only user.

Change-Id: Idd5cea3f37c6a84d052bd56a4a413a35d80289ad
Reviewed-by: David Schulz <david.schulz@qt.io>
This commit is contained in:
hjk
2020-05-20 08:24:49 +02:00
parent b2f06b7695
commit 8017c0763e
2 changed files with 2 additions and 2 deletions

View File

@@ -142,7 +142,7 @@ public:
appendItem(data);
}
void forItems(const std::function<void(ItemData &)> &func) const
void forAllData(const std::function<void(ItemData &)> &func) const
{
BaseModel::rootItem()->forFirstLevelChildren([func](ChildType *child) {
func(child->itemData);

View File

@@ -265,7 +265,7 @@ void LspLoggerWidget::saveLog()
{
QString contents;
QTextStream stream(&contents);
m_model.forItems([&](const LspLogMessage &message) {
m_model.forAllData([&](const LspLogMessage &message) {
stream << message.time.toString("hh:mm:ss.zzz") << ' ';
stream << (message.sender == LspLogMessage::ClientMessage ? QString{"Client"}
: QString{"Server"});