Fix warnings

This commit is contained in:
Martin Delille 2021-12-07 11:41:00 +01:00
parent 86f3bb8abb
commit b2ad2e287b
No known key found for this signature in database
GPG Key ID: C073D887B6E32DE5
2 changed files with 4 additions and 4 deletions

View File

@ -826,7 +826,7 @@ Q_OBJECT
public:
explicit QtAwesome(QObject *parent = 0);
explicit QtAwesome(QObject *parent = nullptr);
virtual ~QtAwesome();
void init( const QString& fontname );

View File

@ -9,7 +9,7 @@
QtAwesomeAnimation::QtAwesomeAnimation(QWidget *parentWidget, int interval, int step)
: parentWidgetRef_( parentWidget )
, timer_( 0 )
, timer_( nullptr )
, interval_( interval )
, step_( step )
, angle_( 0.0f )
@ -29,8 +29,8 @@ void QtAwesomeAnimation::setup( QPainter &painter, const QRect &rect)
else
{
//timer, angle, self.step = self.info[self.parent_widget]
float x_center = rect.width() * 0.5;
float y_center = rect.height() * 0.5;
float x_center = rect.width() * 0.5f;
float y_center = rect.height() * 0.5f;
painter.translate(x_center, y_center);
painter.rotate(angle_);
painter.translate(-x_center, -y_center);