Bug 147540 - Compile error on Solaris 8 - kdegraphics/okular/ui/thumbnaillist.cpp uses lround which is not available
Summary: Compile error on Solaris 8 - kdegraphics/okular/ui/thumbnaillist.cpp uses lro...
Status: RESOLVED FIXED
Alias: None
Product: okular
Classification: Applications
Component: general (show other bugs)
Version: unspecified
Platform: Compiled Sources Solaris
: NOR normal
Target Milestone: ---
Assignee: Okular developers
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2007-07-04 16:30 UTC by Steve Evans
Modified: 2007-07-04 16:41 UTC (History)
0 users

See Also:
Latest Commit:
Version Fixed In:


Attachments
Replace lround with qRound (515 bytes, patch)
2007-07-04 16:32 UTC, Steve Evans
Details

Note You need to log in before you can comment on or make changes to this bug.
Description Steve Evans 2007-07-04 16:30:05 UTC
Version:            (using KDE Devel)
Installed from:    Compiled sources
Compiler:          gcc 3.4.6 
OS:                Solaris

I get this compile error on Solaris 8:

[ 76%] Building CXX object okular/CMakeFiles/okularpart.dir/ui/thumbnaillist.o
/cad4/stevee/kde-svn/kdegraphics/okular/ui/thumbnaillist.cpp: In member function `void ThumbnailWidget::resizeFitWidth(int)':
/cad4/stevee/kde-svn/kdegraphics/okular/ui/thumbnaillist.cpp:511: error: `lround' was not declared in this scope
Comment 1 Steve Evans 2007-07-04 16:32:25 UTC
Created attachment 21041 [details]
Replace lround with qRound
Comment 2 Pino Toscano 2007-07-04 16:41:20 UTC
SVN commit 683290 by pino:

lround() -> qRound()

BUG: 147540


 M  +1 -4      thumbnaillist.cpp  


--- trunk/KDE/kdegraphics/okular/ui/thumbnaillist.cpp #683289:683290
@@ -23,9 +23,6 @@
 #include <kactioncollection.h>
 #include <kicon.h>
 
-// system includes
-#include <math.h>
-
 // local includes
 #include "pagepainter.h"
 #include "core/area.h"
@@ -508,7 +505,7 @@
 void ThumbnailWidget::resizeFitWidth( int width )
 {
     m_pixmapWidth = width - m_margin;
-    m_pixmapHeight = lround( m_page->ratio() * (double)m_pixmapWidth );
+    m_pixmapHeight = qRound( m_page->ratio() * (double)m_pixmapWidth );
     setFixedSize( QSize( width, heightHint() ) );
 }