Use nullptr instead of 0

This commit is contained in:
Luis Ángel San Martín
2019-05-31 20:10:35 +02:00
parent 2fe3fcf041
commit 923ad40057
17 changed files with 39 additions and 39 deletions

View File

@ -34,7 +34,7 @@ PageLabelWidget::PageLabelWidget(QWidget *parent)
setFixedSize(labelSize);
if (parent != 0)
if (parent != nullptr)
move(QPoint((parent->geometry().size().width() - this->width()), -this->height()));
layout->addWidget(textLabel, 0, Qt::AlignCenter);
@ -45,7 +45,7 @@ void PageLabelWidget::show()
{
if (this->pos().y() <= 0 && animation->state() != QPropertyAnimation::Running) {
QWidget *parent = dynamic_cast<QWidget *>(this->parent());
if (parent == 0) {
if (parent == nullptr) {
return;
}
@ -63,7 +63,7 @@ void PageLabelWidget::hide()
{
if (this->pos().y() >= 0 && animation->state() != QPropertyAnimation::Running) {
QWidget *parent = dynamic_cast<QWidget *>(this->parent());
if (parent == 0) {
if (parent == nullptr) {
return;
}
//connect(animation,SIGNAL(finished()),this,SLOT(setHidden()));
@ -88,7 +88,7 @@ void PageLabelWidget::paintEvent(QPaintEvent *)
void PageLabelWidget::updatePosition()
{
QWidget *parent = dynamic_cast<QWidget *>(this->parent());
if (parent == 0) {
if (parent == nullptr) {
return;
}