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