Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Flip a couple of Q_FOREACHs to c++11 for loops
... just to check how bad the Q_FOREACH deprecation will be. And yep, it's horrendous. Each one takes around 10 seconds or so to port, and we've got some 2500+ remaining uses.
- Loading branch information
1 parent
0cb52f6
commit 9ac511d
Showing
4 changed files
with
41 additions
and
36 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
9ac511d
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
What's the reasoning for flipping all type names to auto?
For reading / reviewing code as well as for navigating within the code in QtCreator I like it when the code is explicit.
9ac511d
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Seems like the modern c++ way to do things. I'm also not a huge fan, but want to stick by best practice c++11.
If you set QtCreator to clang code model this works correctly (also unique_ptrs and other stuff)... but... it's also slow as hell.
I'm happy to change this, but can we set a general QGIS code style convention here? I'd rather one or the other than an inconsistent mix.
9ac511d
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Probably because it's less typing for examples.
That's why I turned it off...
Well, personally I've been using it to replace things like
QList<QPair<int, QMap<QString, QgsSomeVeryVeryLongClassName>>>::const_iterator
. I don't mind using it selectively in such situations.