summaryrefslogtreecommitdiffstats
path: root/src/gui
diff options
context:
space:
mode:
authorAllan Sandfeld Jensen <allan.jensen@qt.io>2019-11-18 17:01:26 +0100
committerAllan Sandfeld Jensen <allan.jensen@qt.io>2019-11-20 19:43:38 +0100
commitaf2daafde72db02454d24b7d691aa6861525ab99 (patch)
treeb59c47baf8af94a6ace5cbf4338944272e40e32b /src/gui
parent8bc4ea1e97c138034d08c705a75f75763361400b (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')
-rw-r--r--src/gui/image/qimage.cpp6
-rw-r--r--src/gui/kernel/qplatformcursor.cpp2
-rw-r--r--src/gui/kernel/qplatformtheme.h2
-rw-r--r--src/gui/kernel/qsimpledrag.cpp2
-rw-r--r--src/gui/kernel/qsurfaceformat.cpp2
-rw-r--r--src/gui/opengl/qopenglbuffer.cpp4
-rw-r--r--src/gui/opengl/qopenglfunctions.cpp4
-rw-r--r--src/gui/opengl/qopenglpaintengine.cpp2
-rw-r--r--src/gui/painting/qpaintengineex.cpp2
-rw-r--r--src/gui/painting/qpainter.cpp16
-rw-r--r--src/gui/painting/qplatformbackingstore.cpp4
-rw-r--r--src/gui/painting/qplatformbackingstore.h2
-rw-r--r--src/gui/text/qcssparser.cpp2
-rw-r--r--src/gui/text/qdistancefield.cpp2
-rw-r--r--src/gui/text/qfontengine.cpp4
-rw-r--r--src/gui/text/qfontmetrics.cpp8
-rw-r--r--src/gui/text/qglyphrun.cpp2
-rw-r--r--src/gui/text/qglyphrun_p.h3
-rw-r--r--src/gui/text/qrawfont.cpp2
-rw-r--r--src/gui/text/qtextengine.cpp10
-rw-r--r--src/gui/util/qgridlayoutengine.cpp2
-rw-r--r--src/gui/util/qgridlayoutengine_p.h4
-rw-r--r--src/gui/vulkan/qvulkanwindow_p.h2
23 files changed, 44 insertions, 45 deletions
diff --git a/src/gui/image/qimage.cpp b/src/gui/image/qimage.cpp
index d8ed0829af..869e206524 100644
--- a/src/gui/image/qimage.cpp
+++ b/src/gui/image/qimage.cpp
@@ -1912,10 +1912,10 @@ void QImage::invertPixels(InvertMode mode)
// Inverting premultiplied pixels would produce invalid image data.
if (hasAlphaChannel() && qPixelLayouts[d->format].premultiplied) {
if (depth() > 32) {
- if (!d->convertInPlace(QImage::Format_RGBA64, 0))
+ if (!d->convertInPlace(QImage::Format_RGBA64, { }))
*this = convertToFormat(QImage::Format_RGBA64);
} else {
- if (!d->convertInPlace(QImage::Format_ARGB32, 0))
+ if (!d->convertInPlace(QImage::Format_ARGB32, { }))
*this = convertToFormat(QImage::Format_ARGB32);
}
}
@@ -1982,7 +1982,7 @@ void QImage::invertPixels(InvertMode mode)
}
if (originalFormat != d->format) {
- if (!d->convertInPlace(originalFormat, 0))
+ if (!d->convertInPlace(originalFormat, { }))
*this = convertToFormat(originalFormat);
}
}
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)
diff --git a/src/gui/opengl/qopenglbuffer.cpp b/src/gui/opengl/qopenglbuffer.cpp
index 537097c09f..5ad16a8438 100644
--- a/src/gui/opengl/qopenglbuffer.cpp
+++ b/src/gui/opengl/qopenglbuffer.cpp
@@ -545,9 +545,9 @@ void *QOpenGLBuffer::map(QOpenGLBuffer::Access access)
qWarning("QOpenGLBuffer::map(): buffer not created");
#endif
if (!d->guard || !d->guard->id())
- return 0;
+ return nullptr;
if (d->funcs->hasOpenGLExtension(QOpenGLExtensions::MapBufferRange)) {
- QOpenGLBuffer::RangeAccessFlags rangeAccess = 0;
+ QOpenGLBuffer::RangeAccessFlags rangeAccess;
switch (access) {
case QOpenGLBuffer::ReadOnly:
rangeAccess = QOpenGLBuffer::RangeRead;
diff --git a/src/gui/opengl/qopenglfunctions.cpp b/src/gui/opengl/qopenglfunctions.cpp
index 8ec814296a..42186ace23 100644
--- a/src/gui/opengl/qopenglfunctions.cpp
+++ b/src/gui/opengl/qopenglfunctions.cpp
@@ -489,7 +489,7 @@ QOpenGLFunctions::OpenGLFeatures QOpenGLFunctions::openGLFeatures() const
{
QOpenGLFunctionsPrivateEx *d = static_cast<QOpenGLFunctionsPrivateEx *>(d_ptr);
if (!d)
- return 0;
+ return { };
if (d->m_features == -1)
d->m_features = qt_gl_resolve_features();
return QOpenGLFunctions::OpenGLFeatures(d->m_features);
@@ -527,7 +527,7 @@ QOpenGLExtensions::OpenGLExtensions QOpenGLExtensions::openGLExtensions()
{
QOpenGLFunctionsPrivateEx *d = static_cast<QOpenGLFunctionsPrivateEx *>(d_ptr);
if (!d)
- return 0;
+ return { };
if (d->m_extensions == -1)
d->m_extensions = qt_gl_resolve_extensions();
return QOpenGLExtensions::OpenGLExtensions(d->m_extensions);
diff --git a/src/gui/opengl/qopenglpaintengine.cpp b/src/gui/opengl/qopenglpaintengine.cpp
index 47394999c6..20cc2b5ae5 100644
--- a/src/gui/opengl/qopenglpaintengine.cpp
+++ b/src/gui/opengl/qopenglpaintengine.cpp
@@ -1575,7 +1575,7 @@ void QOpenGL2PaintEngineEx::drawImage(const QRectF& dest, const QImage& image, c
case QImage::Format_ARGB32:
case QImage::Format_RGBA64:
d->shaderManager->setSrcPixelType(QOpenGLEngineShaderManager::NonPremultipliedImageSrc);
- bindOption = 0;
+ bindOption = { };
break;
case QImage::Format_Alpha8:
if (ctx->functions()->hasOpenGLFeature(QOpenGLFunctions::TextureRGFormats)) {
diff --git a/src/gui/painting/qpaintengineex.cpp b/src/gui/painting/qpaintengineex.cpp
index 8314e8bc8a..722afaf119 100644
--- a/src/gui/painting/qpaintengineex.cpp
+++ b/src/gui/painting/qpaintengineex.cpp
@@ -1061,7 +1061,7 @@ void QPaintEngineEx::drawStaticTextItem(QStaticTextItem *staticTextItem)
QFontEngine *fontEngine = staticTextItem->fontEngine();
fontEngine->addGlyphsToPath(staticTextItem->glyphs, staticTextItem->glyphPositions,
- staticTextItem->numGlyphs, &path, 0);
+ staticTextItem->numGlyphs, &path, { });
if (!path.isEmpty()) {
QPainterState *s = state();
QPainter::RenderHints oldHints = s->renderHints;
diff --git a/src/gui/painting/qpainter.cpp b/src/gui/painting/qpainter.cpp
index 3ce54c20be..4336ff66be 100644
--- a/src/gui/painting/qpainter.cpp
+++ b/src/gui/painting/qpainter.cpp
@@ -5902,7 +5902,7 @@ void QPainter::drawText(const QPointF &p, const QString &str, int tf, int justif
int numGlyphs = len;
QVarLengthGlyphLayoutArray glyphs(len);
QFontEngine *fontEngine = d->state->font.d->engineForScript(QChar::Script_Common);
- if (!fontEngine->stringToCMap(str.data(), len, &glyphs, &numGlyphs, 0))
+ if (!fontEngine->stringToCMap(str.data(), len, &glyphs, &numGlyphs, { }))
Q_UNREACHABLE();
QTextItemInt gf(glyphs, &d->state->font, str.data(), len, fontEngine);
@@ -6404,7 +6404,7 @@ Q_GUI_EXPORT void qt_draw_decoration_for_glyphs(QPainter *painter, const glyph_t
}
QFixed width = rightMost - leftMost;
- QTextItem::RenderFlags flags = 0;
+ QTextItem::RenderFlags flags;
if (font.underline())
flags |= QTextItem::Underline;
@@ -7213,7 +7213,7 @@ QPainter::RenderHints QPainter::renderHints() const
Q_D(const QPainter);
if (!d->engine)
- return 0;
+ return { };
return d->state->renderHints;
}
@@ -7795,7 +7795,7 @@ QPainterState::QPainterState()
composition_mode(QPainter::CompositionMode_SourceOver),
emulationSpecifier(0), changeFlags(0)
{
- dirtyFlags = 0;
+ dirtyFlags = { };
}
QPainterState::~QPainterState()
@@ -7824,9 +7824,9 @@ void QPainterState::init(QPainter *p) {
layoutDirection = QGuiApplication::layoutDirection();
composition_mode = QPainter::CompositionMode_SourceOver;
emulationSpecifier = 0;
- dirtyFlags = 0;
+ dirtyFlags = { };
changeFlags = 0;
- renderHints = 0;
+ renderHints = { };
opacity = 1;
}
@@ -7883,7 +7883,7 @@ void QPainterState::init(QPainter *p) {
/*!
\fn void QPainter::drawImage(const QPointF &point, const QImage &image, const QRectF &source,
- Qt::ImageConversionFlags flags = 0)
+ Qt::ImageConversionFlags flags = Qt::AutoColor)
\overload
@@ -7893,7 +7893,7 @@ void QPainterState::init(QPainter *p) {
/*!
\fn void QPainter::drawImage(const QPoint &point, const QImage &image, const QRect &source,
- Qt::ImageConversionFlags flags = 0)
+ Qt::ImageConversionFlags flags = Qt::AutoColor)
\overload
Draws the rectangular portion \a source of the given \a image with
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 &regi
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;
diff --git a/src/gui/painting/qplatformbackingstore.h b/src/gui/painting/qplatformbackingstore.h
index 4f08b0092f..7aa054f1e2 100644
--- a/src/gui/painting/qplatformbackingstore.h
+++ b/src/gui/painting/qplatformbackingstore.h
@@ -100,7 +100,7 @@ public:
bool isLocked() const;
void appendTexture(void *source, GLuint textureId, const QRect &geometry,
- const QRect &clipRect = QRect(), Flags flags = nullptr);
+ const QRect &clipRect = QRect(), Flags flags = { });
void clear();
Q_SIGNALS:
diff --git a/src/gui/text/qcssparser.cpp b/src/gui/text/qcssparser.cpp
index 793ef5774b..cf3d8e5ea2 100644
--- a/src/gui/text/qcssparser.cpp
+++ b/src/gui/text/qcssparser.cpp
@@ -682,7 +682,7 @@ bool ValueExtractor::extractOutline(int *borders, QBrush *colors, BorderStyle *s
static Qt::Alignment parseAlignment(const QCss::Value *values, int count)
{
- Qt::Alignment a[2] = { 0, 0 };
+ Qt::Alignment a[2] = { { }, { } };
for (int i = 0; i < qMin(2, count); i++) {
if (values[i].type != Value::KnownIdentifier)
break;
diff --git a/src/gui/text/qdistancefield.cpp b/src/gui/text/qdistancefield.cpp
index d8a971c7b7..89f943ca51 100644
--- a/src/gui/text/qdistancefield.cpp
+++ b/src/gui/text/qdistancefield.cpp
@@ -952,7 +952,7 @@ void QDistanceField::setGlyph(QFontEngine *fontEngine, glyph_t glyph, bool doubl
{
QFixedPoint position;
QPainterPath path;
- fontEngine->addGlyphsToPath(&glyph, &position, 1, &path, 0);
+ fontEngine->addGlyphsToPath(&glyph, &position, 1, &path, { });
path.translate(-path.boundingRect().topLeft());
path.setFillRule(Qt::WindingFill);
diff --git a/src/gui/text/qfontengine.cpp b/src/gui/text/qfontengine.cpp
index 403a0510fa..3a1f5ed4f4 100644
--- a/src/gui/text/qfontengine.cpp
+++ b/src/gui/text/qfontengine.cpp
@@ -506,7 +506,7 @@ void QFontEngine::getGlyphPositions(const QGlyphLayout &glyphs, const QTransform
g.numGlyphs = 1;
g.glyphs = &kashidaGlyph;
g.advances = &kashidaWidth;
- recalcAdvances(&g, 0);
+ recalcAdvances(&g, { });
for (uint k = 0; k < glyphs.justifications[i].nKashidas; ++k) {
xpos -= kashidaWidth;
@@ -948,7 +948,7 @@ QImage QFontEngine::alphaMapForGlyph(glyph_t glyph)
im.fill(Qt::transparent);
QPainter p(&im);
p.setRenderHint(QPainter::Antialiasing);
- addGlyphsToPath(&glyph, &pt, 1, &path, 0);
+ addGlyphsToPath(&glyph, &pt, 1, &path, { });
p.setPen(Qt::NoPen);
p.setBrush(Qt::black);
p.drawPath(path);
diff --git a/src/gui/text/qfontmetrics.cpp b/src/gui/text/qfontmetrics.cpp
index d3e4f11e8c..906047cdb4 100644
--- a/src/gui/text/qfontmetrics.cpp
+++ b/src/gui/text/qfontmetrics.cpp
@@ -562,7 +562,7 @@ int QFontMetrics::width(const QString &text, int len, int flags) const
int numGlyphs = len;
QVarLengthGlyphLayoutArray glyphs(numGlyphs);
QFontEngine *engine = d->engineForScript(QChar::Script_Common);
- if (!engine->stringToCMap(text.data(), len, &glyphs, &numGlyphs, 0))
+ if (!engine->stringToCMap(text.data(), len, &glyphs, &numGlyphs, { }))
Q_UNREACHABLE();
QFixed width;
@@ -684,7 +684,7 @@ int QFontMetrics::horizontalAdvance(QChar ch) const
glyphs.numGlyphs = 1;
glyphs.glyphs = &glyph;
glyphs.advances = &advance;
- engine->recalcAdvances(&glyphs, 0);
+ engine->recalcAdvances(&glyphs, { });
return qRound(advance);
}
@@ -736,7 +736,7 @@ int QFontMetrics::charWidth(const QString &text, int pos) const
glyphs.numGlyphs = 1;
glyphs.glyphs = &glyph;
glyphs.advances = &advance;
- engine->recalcAdvances(&glyphs, 0);
+ engine->recalcAdvances(&glyphs, { });
width = qRound(advance);
}
@@ -1619,7 +1619,7 @@ qreal QFontMetricsF::horizontalAdvance(QChar ch) const
glyphs.numGlyphs = 1;
glyphs.glyphs = &glyph;
glyphs.advances = &advance;
- engine->recalcAdvances(&glyphs, 0);
+ engine->recalcAdvances(&glyphs, { });
return advance.toReal();
}
diff --git a/src/gui/text/qglyphrun.cpp b/src/gui/text/qglyphrun.cpp
index 3c16c3bf62..f4cd839f15 100644
--- a/src/gui/text/qglyphrun.cpp
+++ b/src/gui/text/qglyphrun.cpp
@@ -279,7 +279,7 @@ void QGlyphRun::clear()
{
detach();
d->rawFont = QRawFont();
- d->flags = 0;
+ d->flags = { };
setPositions(QVector<QPointF>());
setGlyphIndexes(QVector<quint32>());
diff --git a/src/gui/text/qglyphrun_p.h b/src/gui/text/qglyphrun_p.h
index 465c3c7000..46e2a8bbfb 100644
--- a/src/gui/text/qglyphrun_p.h
+++ b/src/gui/text/qglyphrun_p.h
@@ -65,8 +65,7 @@ class QGlyphRunPrivate: public QSharedData
{
public:
QGlyphRunPrivate()
- : flags(nullptr)
- , glyphIndexData(glyphIndexes.constData())
+ : glyphIndexData(glyphIndexes.constData())
, glyphIndexDataSize(0)
, glyphPositionData(glyphPositions.constData())
, glyphPositionDataSize(0)
diff --git a/src/gui/text/qrawfont.cpp b/src/gui/text/qrawfont.cpp
index a060448924..e04c8909f3 100644
--- a/src/gui/text/qrawfont.cpp
+++ b/src/gui/text/qrawfont.cpp
@@ -303,7 +303,7 @@ QPainterPath QRawFont::pathForGlyph(quint32 glyphIndex) const
QFixedPoint position;
QPainterPath path;
- d->fontEngine->addGlyphsToPath(&glyphIndex, &position, 1, &path, 0);
+ d->fontEngine->addGlyphsToPath(&glyphIndex, &position, 1, &path, { });
return path;
}
diff --git a/src/gui/text/qtextengine.cpp b/src/gui/text/qtextengine.cpp
index 209433dac5..40adc4a3cf 100644
--- a/src/gui/text/qtextengine.cpp
+++ b/src/gui/text/qtextengine.cpp
@@ -1720,7 +1720,7 @@ int QTextEngine::shapeTextWithHarfbuzzNG(const QScriptItem &si,
g.glyphs[i] = actualFontEngine->glyphIndex('-');
if (Q_LIKELY(g.glyphs[i] != 0)) {
QGlyphLayout tmp = g.mid(i, 1);
- actualFontEngine->recalcAdvances(&tmp, 0);
+ actualFontEngine->recalcAdvances(&tmp, { });
}
g.attributes[i].dontPrint = true;
}
@@ -2581,7 +2581,7 @@ static void set(QJustificationPoint *point, int type, const QGlyphLayout &glyph,
g.numGlyphs = 1;
g.glyphs = &kashidaGlyph;
g.advances = &point->kashidaWidth;
- fe->recalcAdvances(&g, 0);
+ fe->recalcAdvances(&g, { });
if (point->kashidaWidth == 0)
point->type = Justification_Prohibited;
@@ -3214,13 +3214,13 @@ QString QTextEngine::elidedText(Qt::TextElideMode mode, const QFixed &width, int
glyphs.advances = &ellipsisWidth;
if (glyph != 0) {
- engine->recalcAdvances(&glyphs, 0);
+ engine->recalcAdvances(&glyphs, { });
ellipsisText = ellipsisChar;
} else {
glyph = engine->glyphIndex('.');
if (glyph != 0) {
- engine->recalcAdvances(&glyphs, 0);
+ engine->recalcAdvances(&glyphs, { });
ellipsisWidth *= 3;
ellipsisText = QStringLiteral("...");
@@ -3928,7 +3928,7 @@ void QTextItemInt::initWithScriptItem(const QScriptItem &si)
{
// explicitly initialize flags so that initFontAttributes can be called
// multiple times on the same TextItem
- flags = 0;
+ flags = { };
if (si.analysis.bidiLevel %2)
flags |= QTextItem::RightToLeft;
ascent = si.ascent;
diff --git a/src/gui/util/qgridlayoutengine.cpp b/src/gui/util/qgridlayoutengine.cpp
index 33adac40b2..024f0f084e 100644
--- a/src/gui/util/qgridlayoutengine.cpp
+++ b/src/gui/util/qgridlayoutengine.cpp
@@ -1147,7 +1147,7 @@ QLayoutPolicy::ControlTypes QGridLayoutEngine::controlTypes(LayoutSide side) con
Qt::Orientation orientation = (side == Top || side == Bottom) ? Qt::Vertical : Qt::Horizontal;
int row = (side == Top || side == Left) ? effectiveFirstRow(orientation)
: effectiveLastRow(orientation);
- QLayoutPolicy::ControlTypes result = 0;
+ QLayoutPolicy::ControlTypes result;
for (int column = columnCount(orientation) - 1; column >= 0; --column) {
if (QGridLayoutItem *item = itemAt(row, column, orientation))
diff --git a/src/gui/util/qgridlayoutengine_p.h b/src/gui/util/qgridlayoutengine_p.h
index 5f0e84edb1..181326103b 100644
--- a/src/gui/util/qgridlayoutengine_p.h
+++ b/src/gui/util/qgridlayoutengine_p.h
@@ -276,7 +276,7 @@ class Q_GUI_EXPORT QGridLayoutItem
{
public:
QGridLayoutItem(int row, int column, int rowSpan = 1, int columnSpan = 1,
- Qt::Alignment alignment = nullptr);
+ Qt::Alignment alignment = { });
virtual ~QGridLayoutItem() {}
inline int firstRow() const { return q_firstRows[Ver]; }
@@ -339,7 +339,7 @@ private:
class Q_GUI_EXPORT QGridLayoutEngine
{
public:
- QGridLayoutEngine(Qt::Alignment defaultAlignment = Qt::Alignment(nullptr), bool snapToPixelGrid = false);
+ QGridLayoutEngine(Qt::Alignment defaultAlignment = { }, bool snapToPixelGrid = false);
inline ~QGridLayoutEngine() { qDeleteAll(q_items); }
int rowCount(Qt::Orientation orientation) const;
diff --git a/src/gui/vulkan/qvulkanwindow_p.h b/src/gui/vulkan/qvulkanwindow_p.h
index 777be237a8..915e359673 100644
--- a/src/gui/vulkan/qvulkanwindow_p.h
+++ b/src/gui/vulkan/qvulkanwindow_p.h
@@ -97,7 +97,7 @@ public:
int physDevIndex = 0;
QVector<VkPhysicalDevice> physDevs;
QVector<VkPhysicalDeviceProperties> physDevProps;
- QVulkanWindow::Flags flags = nullptr;
+ QVulkanWindow::Flags flags;
QByteArrayList requestedDevExtensions;
QHash<VkPhysicalDevice, QVulkanInfoVector<QVulkanExtension> > supportedDevExtensions;
QVector<VkFormat> requestedColorFormats;