From: Marcus Comstedt Date: Sun, 6 Apr 2014 15:04:42 +0000 (+0200) Subject: Fix polymorphic function lookup problem X-Git-Tag: pulseview-0.2.0~3 X-Git-Url: https://sigrok.org/gitweb/?p=pulseview.git;a=commitdiff_plain;h=ea86bc4d01851dab34b6ec0e1015a224cecc0fd5 Fix polymorphic function lookup problem Instead of taking min() of a qreal and a double, use two doubles. (The result is assigned to a double anyway.) Fixes build problem on Android --- diff --git a/pv/view/decodetrace.cpp b/pv/view/decodetrace.cpp index c3bc1dff..618de9a3 100644 --- a/pv/view/decodetrace.cpp +++ b/pv/view/decodetrace.cpp @@ -373,7 +373,7 @@ void DecodeTrace::draw_instant(const pv::data::decode::Annotation &a, QPainter & { const QString text = a.annotations().empty() ? QString() : a.annotations().back(); - const double w = min(p.boundingRect(QRectF(), 0, text).width(), + const double w = min((double)p.boundingRect(QRectF(), 0, text).width(), 0.0) + h; const QRectF rect(x - w / 2, y - h / 2, w, h);