diff --git a/layouts/layoutanimator.cpp b/layouts/layoutanimator.cpp index 5d6942831..573cf3989 100644 --- a/layouts/layoutanimator.cpp +++ b/layouts/layoutanimator.cpp @@ -220,9 +220,9 @@ void LayoutAnimator::moveEffectUpdateItem( qreal value , LayoutItem* item , Effe Widget* widget = dynamic_cast(item->graphicsItem()); if ( widget && effect == FadeInMoveEffect ) - widget->setOpacity( qMin(1.0,widget->opacity()+d->delta(value)) ); + widget->setOpacity( qMin(qreal(1.0),widget->opacity()+d->delta(value)) ); else if ( widget && effect == FadeOutMoveEffect ) - widget->setOpacity( qMax(0.0,widget->opacity()-d->delta(value)) ); + widget->setOpacity( qMax(qreal(0.0),widget->opacity()-d->delta(value)) ); if ( effect == FadeInMoveEffect ) { diff --git a/layouts/nodelayout.cpp b/layouts/nodelayout.cpp index 64ca9dd56..2eace2766 100644 --- a/layouts/nodelayout.cpp +++ b/layouts/nodelayout.cpp @@ -141,8 +141,8 @@ public: // not do anything smarter concerning the sizeHint when there are // autosized elements. - qreal width = item->sizeHint().width() / qMin(scaled.width(), 1.0); - qreal height = item->sizeHint().height() / qMin(scaled.height(), 1.0); + qreal width = item->sizeHint().width() / qMin(scaled.width(), qreal(1.0)); + qreal height = item->sizeHint().height() / qMin(scaled.height(), qreal(1.0)); if (width > sizeHint.width()) sizeHint.setWidth(width); if (height > sizeHint.height()) sizeHint.setHeight(height); diff --git a/phase.cpp b/phase.cpp index fba273867..bd8c35486 100644 --- a/phase.cpp +++ b/phase.cpp @@ -115,7 +115,7 @@ class Phase::Private { qreal progress = frames; progress = currentFrame / progress; - progress = qMin(1.0, qMax(0.0, progress)); + progress = qMin(qreal(1.0), qMax(qreal(0.0), progress)); return progress; } @@ -420,7 +420,7 @@ QPixmap Phase::animationResult(AnimId id) qreal progress = state->frames; //kDebug() << "Phase::animationResult(" << id << " at " << progress; progress = state->currentFrame / progress; - progress = qMin(1.0, qMax(0.0, progress)); + progress = qMin(qreal(1.0), qMax(qreal(0.0), progress)); //kDebug() << "Phase::animationResult(" << id << " at " << progress; switch (state->animation) { diff --git a/searchmatch.cpp b/searchmatch.cpp index 03b13ed85..bb1e2399a 100644 --- a/searchmatch.cpp +++ b/searchmatch.cpp @@ -92,7 +92,7 @@ QString SearchMatch::searchTerm() const void SearchMatch::setRelevance(qreal relevance) { - d->relevance = qMax(0.0, qMin(1.0, relevance)); + d->relevance = qMax(qreal(0.0), qMin(qreal(1.0), relevance)); } qreal SearchMatch::relevance() const diff --git a/widgets/signalplotter.cpp b/widgets/signalplotter.cpp index 842c87fac..546824a08 100644 --- a/widgets/signalplotter.cpp +++ b/widgets/signalplotter.cpp @@ -255,7 +255,7 @@ void SignalPlotter::scale(qreal delta) calculateNiceRange(); } -double SignalPlotter::scaledBy() const +qreal SignalPlotter::scaledBy() const { return d->scaledBy; }