mirror of
https://github.com/gamecreature/QtAwesome.git
synced 2024-11-15 13:35:44 +08:00
Fix warnings
This commit is contained in:
parent
86f3bb8abb
commit
b2ad2e287b
@ -826,7 +826,7 @@ Q_OBJECT
|
||||
|
||||
public:
|
||||
|
||||
explicit QtAwesome(QObject *parent = 0);
|
||||
explicit QtAwesome(QObject *parent = nullptr);
|
||||
virtual ~QtAwesome();
|
||||
|
||||
void init( const QString& fontname );
|
||||
|
@ -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);
|
||||
|
Loading…
Reference in New Issue
Block a user