Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Browse files
Browse the repository at this point in the history
Return rgba from ramp_color
- Loading branch information
Showing
1 changed file
with
1 addition
and
1 deletion.
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
7962361
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.
So I don't know if this should be a static function as all other functions like this are marked as static and it is defined here as static:
new StaticFunction( "ramp_color", 2, fcnRampColor, QObject::tr( "Color" ) )
Also I think these changes broke the unit tests:
FAIL! : TestQgsExpression::evaluation(ramp color) Compared values are not the same
Actual (res.toString()): 253,190,115,255
Expected (result.toString()): #fdbe73
Loc: [/home/ben/git/Quantum-GIS/tests/src/core/testqgsexpression.cpp(399)]
FAIL! : TestQgsExpression::evaluation(color rgb) Compared values are not the same
Actual (res.toString()): 255,127,0
Expected (result.toString()): #ff7f00
Loc: [/home/ben/git/Quantum-GIS/tests/src/core/testqgsexpression.cpp(399)]
FAIL! : TestQgsExpression::evaluation(color hsl) Compared values are not the same
Actual (res.toString()): 166,217,140
Expected (result.toString()): #a6d98c
Loc: [/home/ben/git/Quantum-GIS/tests/src/core/testqgsexpression.cpp(399)]
FAIL! : TestQgsExpression::evaluation(color hsv) Compared values are not the same
Actual (res.toString()): 255,170,0
Expected (result.toString()): #ffaa00
Loc: [/home/ben/git/Quantum-GIS/tests/src/core/testqgsexpression.cpp(399)]
FAIL! : TestQgsExpression::evaluation(color cmyk) Compared values are not the same
Actual (res.toString()): 0,115,154
Expected (result.toString()): #00739a
Loc: [/home/ben/git/Quantum-GIS/tests/src/core/testqgsexpression.cpp(399)]
It looks like they were returning hex values before and now are returning RGB(A) values instead. If this is true, I can update the unit tests.
7962361
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.
Yes both are true. It should be a static and the return value is now rgba