mirror of
https://github.com/YACReader/yacreader
synced 2025-07-18 21:14:33 -04:00
Use nullptr instead of 0
This commit is contained in:
@ -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;
|
||||
}
|
||||
|
||||
|
Reference in New Issue
Block a user