Commit 3b0f26e2 authored by Felix Geyer's avatar Felix Geyer Committed by hjk

Fix qreal is not double.

Change-Id: Ife56e908a67da70ebe5af223b19fc8b99fc3a1d2
Reviewed-by: default avatarhjk <qthjk@ovi.com>
parent 243a6771
...@@ -889,8 +889,8 @@ void FormEditorW::print() ...@@ -889,8 +889,8 @@ void FormEditorW::print()
const double maxScaling = qMin(page.size().width() / pixmapSize.width(), page.size().height() / pixmapSize.height()); const double maxScaling = qMin(page.size().width() / pixmapSize.width(), page.size().height() / pixmapSize.height());
const double scaling = qMin(suggestedScaling, maxScaling); 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 xOffset = page.left() + qMax(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 yOffset = page.top() + qMax(0.0, (page.size().height() - scaling * pixmapSize.height()) / 2.0);
// Draw. // Draw.
painter.translate(xOffset, yOffset); painter.translate(xOffset, yOffset);
......
...@@ -295,7 +295,7 @@ void HelpViewer::scaleUp() ...@@ -295,7 +295,7 @@ void HelpViewer::scaleUp()
void HelpViewer::scaleDown() void HelpViewer::scaleDown()
{ {
setTextSizeMultiplier(qMax(qreal(0.0), textSizeMultiplier() - 0.1)); setTextSizeMultiplier(qMax(qreal(0.0), textSizeMultiplier() - qreal(0.1)));
} }
void HelpViewer::resetScale() void HelpViewer::resetScale()
......
...@@ -170,8 +170,8 @@ void AnchorLineController::updatePosition() ...@@ -170,8 +170,8 @@ void AnchorLineController::updatePosition()
rightBoundingRect.adjust(0, 7, 5, -7); rightBoundingRect.adjust(0, 7, 5, -7);
} else { } else {
double height = qMin(boundingRect.height() / 4., qreal(10.0)); double height = qMin(boundingRect.height() / 4., 10.0);
double width = qMin(boundingRect.width() / 4., qreal(10.0)); double width = qMin(boundingRect.width() / 4., 10.0);
topBoundingRect.setHeight(height); topBoundingRect.setHeight(height);
topBoundingRect.adjust(width, -4, -width, -1); topBoundingRect.adjust(width, -4, -width, -1);
......
...@@ -58,7 +58,7 @@ QColor CallgrindHelper::colorForString(const QString &text) ...@@ -58,7 +58,7 @@ QColor CallgrindHelper::colorForString(const QString &text)
QColor CallgrindHelper::colorForCostRatio(qreal ratio) 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); return QColor::fromHsv(120 - ratio * 120, 255, 255, (-((ratio-1) * (ratio-1))) * 120 + 120);
} }
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment