From af2daafde72db02454d24b7d691aa6861525ab99 Mon Sep 17 00:00:00 2001 From: Allan Sandfeld Jensen Date: Mon, 18 Nov 2019 17:01:26 +0100 Subject: Deprecate constructing QFlags from a pointer This was used to support QFlags f = 0 initialization, but with 0 used as a pointer literal now considered bad form, it had been changed many places to QFlags f = nullptr, which is meaningless and confusing. Change-Id: I4bc592151c255dc5cab1a232615caecc520f02e8 Reviewed-by: Thiago Macieira --- src/gui/kernel/qplatformcursor.cpp | 2 +- src/gui/kernel/qplatformtheme.h | 2 +- src/gui/kernel/qsimpledrag.cpp | 2 +- src/gui/kernel/qsurfaceformat.cpp | 2 +- 4 files changed, 4 insertions(+), 4 deletions(-) (limited to 'src/gui/kernel') diff --git a/src/gui/kernel/qplatformcursor.cpp b/src/gui/kernel/qplatformcursor.cpp index 49eff2ad23..34c4549443 100644 --- a/src/gui/kernel/qplatformcursor.cpp +++ b/src/gui/kernel/qplatformcursor.cpp @@ -103,7 +103,7 @@ QT_BEGIN_NAMESPACE QPlatformCursor::clearOverrideCursor(). */ -QPlatformCursor::Capabilities QPlatformCursor::m_capabilities = 0; +QPlatformCursor::Capabilities QPlatformCursor::m_capabilities = { }; /*! \fn QPlatformCursor::QPlatformCursor() diff --git a/src/gui/kernel/qplatformtheme.h b/src/gui/kernel/qplatformtheme.h index 356c4ea3ea..3185fc4541 100644 --- a/src/gui/kernel/qplatformtheme.h +++ b/src/gui/kernel/qplatformtheme.h @@ -309,7 +309,7 @@ public: virtual QPixmap standardPixmap(StandardPixmap sp, const QSizeF &size) const; virtual QIcon fileIcon(const QFileInfo &fileInfo, - QPlatformTheme::IconOptions iconOptions = nullptr) const; + QPlatformTheme::IconOptions iconOptions = { }) const; virtual QIconEngine *createIconEngine(const QString &iconName) const; #ifndef QT_NO_SHORTCUT diff --git a/src/gui/kernel/qsimpledrag.cpp b/src/gui/kernel/qsimpledrag.cpp index d3070a3d1a..803206477c 100644 --- a/src/gui/kernel/qsimpledrag.cpp +++ b/src/gui/kernel/qsimpledrag.cpp @@ -393,7 +393,7 @@ void QSimpleDrag::startDrag() static void sendDragLeave(QWindow *window) { - QWindowSystemInterface::handleDrag(window, nullptr, QPoint(), Qt::IgnoreAction, 0, 0); + QWindowSystemInterface::handleDrag(window, nullptr, QPoint(), Qt::IgnoreAction, { }, { }); } void QSimpleDrag::cancel() diff --git a/src/gui/kernel/qsurfaceformat.cpp b/src/gui/kernel/qsurfaceformat.cpp index 238886220b..571b820409 100644 --- a/src/gui/kernel/qsurfaceformat.cpp +++ b/src/gui/kernel/qsurfaceformat.cpp @@ -57,7 +57,7 @@ QT_BEGIN_NAMESPACE class QSurfaceFormatPrivate { public: - explicit QSurfaceFormatPrivate(QSurfaceFormat::FormatOptions _opts = 0) + explicit QSurfaceFormatPrivate(QSurfaceFormat::FormatOptions _opts = { }) : ref(1) , opts(_opts) , redBufferSize(-1) -- cgit v1.2.3