mirror of
https://github.com/subsurface/subsurface.git
synced 2025-02-19 22:16:15 +00:00
cleanup: replace Q_FOREACH by range-based for in profile code
With Qt-containers, this might be a small pessimization, because it might lead to a deep copy. This can be "fixed" by for (const Type &item: qAsConst(container)) But frankly, I don't care. Ultimately it is probably best to replace the Qt containers by standard containers. Signed-off-by: Berthold Stoeger <bstoeger@mail.tuwien.ac.at>
This commit is contained in:
parent
4128fec1ea
commit
3f2e4e8b16
3 changed files with 8 additions and 11 deletions
|
@ -689,7 +689,7 @@ void ProfileWidget2::hideEvents(DiveEventItem *item)
|
|||
QMessageBox::Ok | QMessageBox::Cancel) == QMessageBox::Ok) {
|
||||
if (!empty_string(event->name)) {
|
||||
hide_event(event->name);
|
||||
Q_FOREACH (DiveEventItem *evItem, profileScene->eventItems) {
|
||||
for (DiveEventItem *evItem: profileScene->eventItems) {
|
||||
if (same_string(evItem->getEvent()->name, event->name))
|
||||
evItem->hide();
|
||||
}
|
||||
|
@ -702,7 +702,7 @@ void ProfileWidget2::hideEvents(DiveEventItem *item)
|
|||
void ProfileWidget2::unhideEvents()
|
||||
{
|
||||
show_all_events();
|
||||
Q_FOREACH (DiveEventItem *item, profileScene->eventItems)
|
||||
for (DiveEventItem *item: profileScene->eventItems)
|
||||
item->show();
|
||||
}
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue