From ece0c0a5e7e0b18beb58ccd868bde54c7be64f78 Mon Sep 17 00:00:00 2001 From: Allan Sandfeld Jensen Date: Fri, 22 Nov 2019 14:46:58 +0100 Subject: Tidy nullptr usage Move away from using 0 as pointer literal. Done using clang-tidy. This is not complete as run-clang-tidy can't handle all of qtbase in one go. Change-Id: I1076a21f32aac0dab078af6f175f7508145eece0 Reviewed-by: Friedemann Kleint Reviewed-by: Lars Knoll --- src/widgets/widgets/qpushbutton.cpp | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) (limited to 'src/widgets/widgets/qpushbutton.cpp') diff --git a/src/widgets/widgets/qpushbutton.cpp b/src/widgets/widgets/qpushbutton.cpp index f48b5706f7..b0d3ba51f9 100644 --- a/src/widgets/widgets/qpushbutton.cpp +++ b/src/widgets/widgets/qpushbutton.cpp @@ -297,7 +297,7 @@ QDialog *QPushButtonPrivate::dialogParent() const if (const QDialog *dialog = qobject_cast(p)) return const_cast(dialog); } - return 0; + return nullptr; } #endif @@ -353,7 +353,7 @@ bool QPushButton::autoDefault() const { Q_D(const QPushButton); if(d->autoDefault == QPushButtonPrivate::Auto) - return ( d->dialogParent() != 0 ); + return ( d->dialogParent() != nullptr ); return d->autoDefault; } @@ -496,7 +496,7 @@ void QPushButton::focusOutEvent(QFocusEvent *e) #if QT_CONFIG(dialog) QDialog *dlg = qobject_cast(window()); if (dlg) - dlg->d_func()->setDefault(0); + dlg->d_func()->setDefault(nullptr); else d->defaultButton = false; #endif -- cgit v1.2.3