Changes: fixing conversion of mmToPixels for x86 in certain cases
Changes: fixing conversion of mmToPixels for x86 in certain cases

RevBy: John Tapsell, Armin Berres
Details:

MWidgetStyle uses QSize for the following attributes:

    M_STYLE_ATTRIBUTE(QSize, preferredSize, PreferredSize)
    M_STYLE_ATTRIBUTE(QSize, minimumSize,   MinimumSize)
    M_STYLE_ATTRIBUTE(QSize, maximumSize,   MaximumSize)

These styles properties are supporting different units:
    PIXELS_UNIT, (px)
    MM_UNIT,(mm)
    PT_UNIT,(pt)
    PERCENT_UNIT, (%)

MStyleSheetAttribute::writeAttribute(...)  function checks if the
style attribute is QSize of QSizeF, based on these it calls one of these functions:

attributeToInt(..).
attributeToFloat(..).

However, the user can use float values in the CSS even if the style
property does not allow them (for example MButtonStyle):

minimum-size: 45.6mm 89.2mm;

When this value is parsed the system will identify that MButtonStyle uses
QSize, thus, it will redirect the values to the function attributeToInt(..).
Inside of attributeToInt(...) it is called the function:

MDeviceProfile::instance()->mmToPixels(qreal mm)

Although the function expects a double value it returns an integer:

int mmToPixels(qreal mm);

Thus inside of this function the float values are converted to integers.

Depending of the host target such conversion can involve the suppression
of some values, therefore, the widget can lost even 1 pixels per axis (W/H).

Although this issue is not reproducible in ARM, on x86 all the widgets using
style properties with float values and QSize types are subjected to this issue.

Adding the rounding in the int mmToPixels(qreal mm) fixes the issue.

nemomobile-graveyard/libmeegotouch,nemomobile-graveyard/libmeegotouch,nemomobile-graveyard/libmeegotouch,nemomobile-graveyard/libmeegotouch,nemomobile-graveyard/libmeegotouch,nemomobile-graveyard/libmeegotouch