From 99de80e7224f2491fb7518e32f195ad6a912b624 Mon Sep 17 00:00:00 2001 From: Tannin Date: Fri, 28 Nov 2014 11:19:20 +0100 Subject: replaced all uses of NULL with nullptr fixed a few placed where NULL was used as a number or boolean --- src/messagedialog.cpp | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) (limited to 'src/messagedialog.cpp') diff --git a/src/messagedialog.cpp b/src/messagedialog.cpp index 36902bbf..90b0a9d3 100644 --- a/src/messagedialog.cpp +++ b/src/messagedialog.cpp @@ -52,7 +52,7 @@ MessageDialog::MessageDialog(const QString &text, QWidget *reference) : this->setFocusPolicy(Qt::NoFocus); this->setAttribute(Qt::WA_ShowWithoutActivating); QTimer::singleShot(1000 + (text.length() * 40), this, SLOT(hide())); - if (reference != NULL) { + if (reference != nullptr) { QPoint position = reference->mapToGlobal(QPoint(reference->width() / 2, reference->height())); position.rx() -= this->width() / 2; position.ry() -= this->height() + 5; @@ -70,7 +70,7 @@ MessageDialog::~MessageDialog() void MessageDialog::resizeEvent(QResizeEvent *event) { QWidget *par = parentWidget(); - if (par != NULL) { + if (par != nullptr) { QPoint position = par->mapToGlobal(QPoint(par->width() / 2, par->height())); position.rx() -= event->size().width() / 2; position.ry() -= event->size().height() + 5; @@ -83,7 +83,7 @@ void MessageDialog::showMessage(const QString &text, QWidget *reference, bool br { qDebug("%s", qPrintable(text)); if (reference != nullptr) { - if (bringToFront || (qApp->activeWindow() != NULL)) { + if (bringToFront || (qApp->activeWindow() != nullptr)) { MessageDialog *dialog = new MessageDialog(text, reference); dialog->show(); reference->activateWindow(); -- cgit v1.3.1