Bug report #229
Assignments used as truth value in qgsproject.cpp
Status: | Closed | ||
---|---|---|---|
Priority: | Low | ||
Assignee: | Gary Sherman | ||
Category: | Project Loading/Saving | ||
Affected QGIS version: | Regression?: | No | |
Operating System: | Linux | Easy fix?: | No |
Pull Request or Patch supplied: | Resolution: | fixed | |
Crashes QGIS or corrupts data: | Copied to github as #: | 10288 |
Description
I'm not sure what's the idea behind conditional statements in qgsproject.cpp file, in lines: 126, 204 and 274 where following comparisons are used:
} else if ( nextProperty = currentProperty->find( keySequence.first() ) ) {
but for me this seems to be a bug.
Probably, this statement should look like:
} else if (( nextProperty == currentProperty->find( keySequence.first() ) )) {
or
} else if ( 0 == (nextProperty = currentProperty->find( keySequence.first() ) ) ) {
Additional note, I see the code around those lines is mostly a copy-paste, may be it's reasonable to put it to a separate class or function.
History
#1 Updated by Gavin Macaulay - over 18 years ago
- Resolution set to fixed
- Status changed from Open to Closed
Appled to head