Debugger: Use std style iterator

Change-Id: I6f6593aa18ec9da768876413ef2d5169bce635ca
Reviewed-by: hjk <hjk@qt.io>
Reviewed-by: Jarek Kobus <jaroslaw.kobus@qt.io>
This commit is contained in:
David Schulz
2019-11-26 09:21:17 +01:00
committed by Jarek Kobus
parent 4c1ce54d17
commit 6325590815

View File

@@ -1972,16 +1972,14 @@ QMenu *WatchModel::createFormatMenuForManySelected(const WatchItemSet &items, QW
});
int countOfSelectItems = items.size();
QHashIterator<DisplayFormat, int> iter(allItemsFormats);
while (iter.hasNext()) {
iter.next();
DisplayFormat format = iter.key();
for (auto it = allItemsFormats.begin(), end = allItemsFormats.end(); it != end; ++it) {
DisplayFormat format = it.key();
QString formatName = nameForFormat(format);
if (formatName.isEmpty())
continue;
addCheckableAction(menu, spacer + formatName,
iter.value() == countOfSelectItems,
it.value() == countOfSelectItems,
false,
[this, format, items] {
setItemsFormat(items, format);