Bug 209406

Summary: deskutils/plasma-applet-playwolf: Fix build with libc++ 3.8.0
Product: Ports & Packages Reporter: Dimitry Andric <dim>
Component: Individual Port(s)Assignee: Jason E. Hale <jhale>
Status: Closed FIXED    
Severity: Affects Some People Flags: bugzilla: maintainer-feedback? (jhale)
Priority: ---    
Version: Latest   
Hardware: Any   
OS: Any   
Bug Depends on:    
Bug Blocks: 208158    
Attachments:
Description Flags
Use Qt's own qFabs() in deskutils/plasma-applet-playwolf none

Description Dimitry Andric freebsd_committer freebsd_triage 2016-05-09 21:04:53 UTC
Created attachment 170158 [details]
Use Qt's own qFabs() in deskutils/plasma-applet-playwolf

During the exp-run in bug 208158, it was found that deskutils/plasma-applet-playwolf gives errors with libc++ 3.8.0 [1]:

/wrkdirs/usr/ports/deskutils/plasma-applet-playwolf/work/playwolf/wolflabel.cpp:198:47: error: call to 'abs' is ambiguous
                m_animation->setDuration((2 * abs(x) + SPACING) * 150);
                                              ^~~

This is because the floating point version of abs() should be used, but the file does not include <math.h>, nor <cmath>.  Instead, make it use the Qt-specific function, qFabs(), from QtCore/qmath.h.

[1] http://package18.nyi.freebsd.org/data/headamd64PR208158-default/2016-05-01_10h29m48s/logs/errors/plasma-applet-playwolf-0.8.1_6.log
Comment 1 Jason E. Hale freebsd_committer freebsd_triage 2016-09-19 22:39:35 UTC
Committed in r421307 by amdmi3.