From: Fridrich S. <str...@us...> - 2008-07-12 00:07:08
|
Update of /cvsroot/libwpg/perfectspot/src In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv14690/src Modified Files: aboutbox.cpp renderer.cpp Log Message: make the casts from double to int correctly + make some features that are not present in all Qt4 versions conditional Index: aboutbox.cpp =================================================================== RCS file: /cvsroot/libwpg/perfectspot/src/aboutbox.cpp,v retrieving revision 1.7 retrieving revision 1.8 diff -u -d -r1.7 -r1.8 --- aboutbox.cpp 11 Oct 2007 10:03:43 -0000 1.7 +++ aboutbox.cpp 12 Jul 2008 00:07:05 -0000 1.8 @@ -206,9 +206,14 @@ QString info = "<b>"; info += tr("Perfectspot version %1").arg( MAKE_STRING(PERFECTSPOT_VERSION) ); info += "</b><br>"; +#if QT_VERSION >= 0x040200 info += QString("<a href=\"%1\">%2</a>").arg(website).arg(website); infoLabel->setText( info ); infoLabel->setOpenExternalLinks(true); +#else + info += QString("<u>%1</u>").arg(website); + infoLabel->setText( info ); +#endif QLabel* iconLabel = new QLabel( this ); iconLabel->setPixmap( QPixmap( ":/perfectspot.png" ) ); Index: renderer.cpp =================================================================== RCS file: /cvsroot/libwpg/perfectspot/src/renderer.cpp,v retrieving revision 1.13 retrieving revision 1.14 diff -u -d -r1.13 -r1.14 --- renderer.cpp 11 Jul 2008 22:42:47 -0000 1.13 +++ renderer.cpp 12 Jul 2008 00:07:05 -0000 1.14 @@ -168,12 +168,12 @@ { double roundx = rx * 200 / rect.width(); double roundy = ry * 200 / rect.height(); - m_target->drawRoundRect((int)m_zoomX*rect.x1, (int)m_zoomY*rect.y1, (int)m_zoomX*rect.width(), (int)m_zoomY*rect.height(), (int)roundx, (int)roundy); + m_target->drawRoundRect((int)(m_zoomX*rect.x1), (int)(m_zoomY*rect.y1), (int)(m_zoomX*rect.width()), (int)(m_zoomY*rect.height()), (int)roundx, (int)roundy); } void Painter::drawEllipse(const WPGPoint& center, double rx, double ry) { - m_target->drawEllipse((int)m_zoomX*(center.x - rx), (int)m_zoomY*(center.y - ry), (int)2*m_zoomX*rx, (int)2*m_zoomY*ry); + m_target->drawEllipse((int)(m_zoomX*(center.x - rx)), (int)(m_zoomY*(center.y - ry)), (int)(2*m_zoomX*rx), (int)(2*m_zoomY*ry)); } void Painter::drawPolygon(const WPGPointArray& vertices) |