summaryrefslogtreecommitdiffstats
path: root/src/gui/painting/qprintengine_win.cpp
diff options
context:
space:
mode:
authorThierry Bastian <thierry.bastian@nokia.com>2009-08-14 11:01:37 (GMT)
committerThierry Bastian <thierry.bastian@nokia.com>2009-08-14 11:03:51 (GMT)
commitb770651f19741907cd415ea9ad6e087cb32cc948 (patch)
treeecc163e8b33af66454b84ca7f9159d11d6f0cd91 /src/gui/painting/qprintengine_win.cpp
parent51ce8a80acebc67ef09d506d89a2ee1972377877 (diff)
downloadQt-b770651f19741907cd415ea9ad6e087cb32cc948.zip
Qt-b770651f19741907cd415ea9ad6e087cb32cc948.tar.gz
Qt-b770651f19741907cd415ea9ad6e087cb32cc948.tar.bz2
QVariant: added toFloat and toReal
Made better use of qreal all over the place. We were previously using QVariant::toDouble a lot. That is triggering unnecessary conversions between float and double on embedded. Reviewed-by: ogoffart
Diffstat (limited to 'src/gui/painting/qprintengine_win.cpp')
-rw-r--r--src/gui/painting/qprintengine_win.cpp8
1 files changed, 4 insertions, 4 deletions
diff --git a/src/gui/painting/qprintengine_win.cpp b/src/gui/painting/qprintengine_win.cpp
index 7ac3224..21c0873 100644
--- a/src/gui/painting/qprintengine_win.cpp
+++ b/src/gui/painting/qprintengine_win.cpp
@@ -1360,10 +1360,10 @@ void QWin32PrintEngine::setProperty(PrintEnginePropertyKey key, const QVariant &
Q_ASSERT(margins.size() == 4);
int left, top, right, bottom;
// specified in 1/100 mm
- left = (margins.at(0).toDouble()*25.4/72.0) * 100;
- top = (margins.at(1).toDouble()*25.4/72.0) * 100;
- right = (margins.at(2).toDouble()*25.4/72.0) * 100;
- bottom = (margins.at(3).toDouble()*25.4/72.0) * 100;
+ left = (margins.at(0).toReal()*25.4/72.0) * 100;
+ top = (margins.at(1).toReal()*25.4/72.0) * 100;
+ right = (margins.at(2).toReal()*25.4/72.0) * 100;
+ bottom = (margins.at(3).toReal()*25.4/72.0) * 100;
d->setPageMargins(left, top, right, bottom);
break;
}