Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Convert from Qt foreach() macro to C++ standard range-for. (plugins)
The use of foreach has caused some unexpected problems in the scheduler, which were chased down to containers detaching in the call to get the last item of the range. This detach guarantees that the current iterator is now invalid and the operation will eventually run off the end of the range. The Qt company is also planning to remove the foreach/Q_FOREACH macro in an (as yet unspecified) upcoming release. Replace all instances of the foreach macro with a standard C++ range-for iteration, and (in almost all cases) use the qAsConst macro mark to the ranges as constant to prevent detaching of the data. There are a couple of places where adding the qAsConst macro throws a compiler error, so omit qAsConst in those instances. These cases all appear to occur with temporary lists, and this behavior is intentional on Qt's part (see the Qt documentation). Refs #13621
- Loading branch information
1 parent
1a1b698
commit 5d9b74e
Showing
26 changed files
with
99 additions
and
99 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.