-
-
Notifications
You must be signed in to change notification settings - Fork 3k
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
This is the equivalent of std::as_const (which requires c++17) or qAsConst (which requires Qt 5.7), neither of which we have as minimum dependancies. By wrapping implicitly shared Qt containers in qgsAsConst we can safely use c++ for ranged loops instead of Q_FOREACH. (Since Q_FOREACH's future is shaky) See https://www.kdab.com/goodbye-q_foreach/ for further details on why for causes a detach for Qt containers and why Q_FOREACH is being removed from Qt.
- Loading branch information
1 parent
30b46f7
commit 029f741
Showing
3 changed files
with
54 additions
and
0 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