Bug report #229

Assignments used as truth value in qgsproject.cpp

Added by Mateusz Loskot - over 16 years ago. Updated over 16 years ago.

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


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() ) ))


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.


#1 Updated by Gavin Macaulay - over 16 years ago

  • Resolution set to fixed
  • Status changed from Open to Closed

Appled to head

Also available in: Atom PDF