diff options
author | Allan Sandfeld Jensen <allan.jensen@qt.io> | 2019-11-18 17:01:26 +0100 |
---|---|---|
committer | Allan Sandfeld Jensen <allan.jensen@qt.io> | 2019-11-20 19:43:38 +0100 |
commit | af2daafde72db02454d24b7d691aa6861525ab99 (patch) | |
tree | b59c47baf8af94a6ace5cbf4338944272e40e32b /src/gui/painting/qplatformbackingstore.cpp | |
parent | 8bc4ea1e97c138034d08c705a75f75763361400b (diff) |
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 <thiago.macieira@intel.com>
Diffstat (limited to 'src/gui/painting/qplatformbackingstore.cpp')
-rw-r--r-- | src/gui/painting/qplatformbackingstore.cpp | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/src/gui/painting/qplatformbackingstore.cpp b/src/gui/painting/qplatformbackingstore.cpp index 45e90bd99b..0ecb4390e9 100644 --- a/src/gui/painting/qplatformbackingstore.cpp +++ b/src/gui/painting/qplatformbackingstore.cpp @@ -427,7 +427,7 @@ void QPlatformBackingStore::composeAndFlush(QWindow *window, const QRegion ®i origin = QOpenGLTextureBlitter::OriginBottomLeft; textureId = d_ptr->textureId; } else { - TextureFlags flags = 0; + TextureFlags flags; textureId = toTexture(deviceRegion(region, window, offset), &d_ptr->textureSize, &flags); d_ptr->needsSwizzle = (flags & TextureSwizzle) != 0; d_ptr->premultiplied = (flags & TexturePremultiplied) != 0; @@ -534,7 +534,7 @@ GLuint QPlatformBackingStore::toTexture(const QRegion &dirtyRegion, QSize *textu GLuint pixelType = GL_UNSIGNED_BYTE; bool needsConversion = false; - *flags = 0; + *flags = { }; switch (image.format()) { case QImage::Format_ARGB32_Premultiplied: *flags |= TexturePremultiplied; |