summaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authorFelix Geyer <debfx@fobos.de>2011-11-09 09:39:58 +0100
committerEike Ziller <eike.ziller@nokia.com>2011-11-09 11:00:13 +0100
commit28b920ecd446e46512c9e7b1bba9e459136a30ed (patch)
treed429d91c3c0fc5fa1887c19bc173c80d6db63f64 /src
parent371ae894f0fc4a26313eafb5de168b3e31b8a8de (diff)
downloadqt-creator-28b920ecd446e46512c9e7b1bba9e459136a30ed.tar.gz
Fix qreal is not double.
Change-Id: Ife56e908a67da70ebe5af223b19fc8b99fc3a1d2 Reviewed-by: hjk <qthjk@ovi.com> (cherry picked from commit 3b0f26e23136e60b61203c26075349f1e541f654)
Diffstat (limited to 'src')
-rw-r--r--src/plugins/designer/formeditorw.cpp4
-rw-r--r--src/plugins/help/helpviewer_qwv.cpp2
-rw-r--r--src/plugins/qmldesigner/components/formeditor/anchorlinecontroller.cpp4
-rw-r--r--src/plugins/valgrind/callgrindhelper.cpp2
4 files changed, 6 insertions, 6 deletions
diff --git a/src/plugins/designer/formeditorw.cpp b/src/plugins/designer/formeditorw.cpp
index 6aab52c197..8dc12c7e29 100644
--- a/src/plugins/designer/formeditorw.cpp
+++ b/src/plugins/designer/formeditorw.cpp
@@ -889,8 +889,8 @@ void FormEditorW::print()
const double maxScaling = qMin(page.size().width() / pixmapSize.width(), page.size().height() / pixmapSize.height());
const double scaling = qMin(suggestedScaling, maxScaling);
- const double xOffset = page.left() + qMax(qreal(0.0), (page.size().width() - scaling * pixmapSize.width()) / 2.0);
- const double yOffset = page.top() + qMax(qreal(0.0), (page.size().height() - scaling * pixmapSize.height()) / 2.0);
+ const double xOffset = page.left() + qMax(0.0, (page.size().width() - scaling * pixmapSize.width()) / 2.0);
+ const double yOffset = page.top() + qMax(0.0, (page.size().height() - scaling * pixmapSize.height()) / 2.0);
// Draw.
painter.translate(xOffset, yOffset);
diff --git a/src/plugins/help/helpviewer_qwv.cpp b/src/plugins/help/helpviewer_qwv.cpp
index f6281c54f6..a4d017caae 100644
--- a/src/plugins/help/helpviewer_qwv.cpp
+++ b/src/plugins/help/helpviewer_qwv.cpp
@@ -295,7 +295,7 @@ void HelpViewer::scaleUp()
void HelpViewer::scaleDown()
{
- setTextSizeMultiplier(qMax(qreal(0.0), textSizeMultiplier() - 0.1));
+ setTextSizeMultiplier(qMax(qreal(0.0), textSizeMultiplier() - qreal(0.1)));
}
void HelpViewer::resetScale()
diff --git a/src/plugins/qmldesigner/components/formeditor/anchorlinecontroller.cpp b/src/plugins/qmldesigner/components/formeditor/anchorlinecontroller.cpp
index d3074af333..3dcb0e4df8 100644
--- a/src/plugins/qmldesigner/components/formeditor/anchorlinecontroller.cpp
+++ b/src/plugins/qmldesigner/components/formeditor/anchorlinecontroller.cpp
@@ -170,8 +170,8 @@ void AnchorLineController::updatePosition()
rightBoundingRect.adjust(0, 7, 5, -7);
} else {
- double height = qMin(boundingRect.height() / 4., qreal(10.0));
- double width = qMin(boundingRect.width() / 4., qreal(10.0));
+ double height = qMin(boundingRect.height() / 4., 10.0);
+ double width = qMin(boundingRect.width() / 4., 10.0);
topBoundingRect.setHeight(height);
topBoundingRect.adjust(width, -4, -width, -1);
diff --git a/src/plugins/valgrind/callgrindhelper.cpp b/src/plugins/valgrind/callgrindhelper.cpp
index 704223b43f..d196d53685 100644
--- a/src/plugins/valgrind/callgrindhelper.cpp
+++ b/src/plugins/valgrind/callgrindhelper.cpp
@@ -58,7 +58,7 @@ QColor CallgrindHelper::colorForString(const QString &text)
QColor CallgrindHelper::colorForCostRatio(qreal ratio)
{
- ratio = qBound(0.0, ratio, 1.0);
+ ratio = qBound(qreal(0.0), ratio, qreal(1.0));
return QColor::fromHsv(120 - ratio * 120, 255, 255, (-((ratio-1) * (ratio-1))) * 120 + 120);
}