From 6549dede60bc1b2dde4e29aad19cf7ec71076c96 Mon Sep 17 00:00:00 2001 From: Simon Rettberg Date: Thu, 30 Aug 2018 15:47:44 +0200 Subject: Sanitize C++11 --- src/mainwindow.cpp | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) (limited to 'src/mainwindow.cpp') diff --git a/src/mainwindow.cpp b/src/mainwindow.cpp index 0ebdb59..b66a73d 100644 --- a/src/mainwindow.cpp +++ b/src/mainwindow.cpp @@ -31,7 +31,7 @@ MainWindow::MainWindow(bool primary, int screen, const QRect &screenRect, QWidge QWidget(parent), m_ScreenRect(screenRect), m_Primary(primary), - m_LoginForm(NULL), + m_LoginForm(nullptr), m_messages(nullptr), m_Clock(nullptr) { @@ -310,7 +310,7 @@ void MainWindow::setBackground() void MainWindow::showStandby() { - if (m_LoginForm != NULL) { + if (m_LoginForm != nullptr) { m_LoginForm->hide(); } QSvgWidget *img = new QSvgWidget(":/resources/gnome-face-tired.svg", this); @@ -324,7 +324,7 @@ void MainWindow::showStandby() QTimer::singleShot(4000, [this, img]() { img->hide(); img->deleteLater(); - if (this->m_LoginForm != NULL) { + if (this->m_LoginForm != nullptr) { m_LoginForm->show(); } }); @@ -346,6 +346,6 @@ int MainWindow::drawClock() QLocale loc; m_Clock->setText(time.toString(loc.dateFormat() + " HH:mm ")); m_Clock->adjustSize(); - ((QWidget*)m_Clock->parent())->adjustSize(); + reinterpret_cast(m_Clock->parent())->adjustSize(); return (60 - time.time().second()) * 1000 + 100; } -- cgit v1.2.3-55-g7522