From 67c3c7a29c9bebf68a367aeb85162248b58675b3 Mon Sep 17 00:00:00 2001 From: Giuseppe D'Angelo Date: Fri, 21 Aug 2020 22:48:43 +0200 Subject: Smart pointers: port to explicit operator bool Enough with the restricted bool trick; use the established solution. [ChangeLog][Potentially Source-Incompatible Changes] QScopedPointer, QSharedPointer and QWeakPointer's conversion operator towards bool is now explicit. In some cases this may require an explicit cast towards bool that was not needed before (notably, when returning an object of these types from a function that actually returns bool). Change-Id: I02b89278e75b7e7493ee7e35460504719e00f028 Reviewed-by: Thiago Macieira --- src/plugins/platforms/windows/qwindowsdialoghelpers.h | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'src/plugins') diff --git a/src/plugins/platforms/windows/qwindowsdialoghelpers.h b/src/plugins/platforms/windows/qwindowsdialoghelpers.h index 8686749011..55167ad36d 100644 --- a/src/plugins/platforms/windows/qwindowsdialoghelpers.h +++ b/src/plugins/platforms/windows/qwindowsdialoghelpers.h @@ -80,7 +80,7 @@ public: protected: QWindowsDialogHelperBase() = default; QWindowsNativeDialogBase *nativeDialog() const; - inline bool hasNativeDialog() const { return m_nativeDialog; } + inline bool hasNativeDialog() const { return !m_nativeDialog.isNull(); } void timerEvent(QTimerEvent *) override; private: -- cgit v1.2.3