ubports / ubuntu-ui-toolkit

Moved to https://gitlab.com/ubports/core/lomiri-ui-toolkit
https://gitlab.com/ubports/core/lomiri-ui-toolkit
GNU Lesser General Public License v3.0
13 stars 21 forks source link

Add include to math.h #71

Closed z3ntu closed 4 years ago

z3ntu commented 4 years ago

Fixes the following error:

colorutils.cpp: In static member function 'static qreal ColorUtils::contrast(const QColor&)':
colorutils.cpp:46:20: error: 'pow' was not declared in this scope
   46 |         redLight = pow((color.redF() + 0.055) / 1.055, 2.4);
      |                    ^~~
colorutils.cpp:52:22: error: 'pow' was not declared in this scope
   52 |         greenLight = pow((color.greenF() + 0.055) / 1.055, 2.4);
      |                      ^~~
colorutils.cpp:58:21: error: 'pow' was not declared in this scope
   58 |         blueLight = pow((color.blueF() + 0.055) / 1.055, 2.4);
      |                     ^~~