Avoid initializing QFlags with 0 or nullptr in macOS-specific code
It is being deprecated. Change-Id: If1b0b058140e197d41efae93025c4eefc2ed9bbd Reviewed-by: Allan Sandfeld Jensen <allan.jensen@qt.io>
This commit is contained in:
parent
0d4dea728f
commit
5a26bf9d65
@ -2707,7 +2707,7 @@ bool QFontInfo::fixedPitch() const
|
||||
QChar ch[2] = { QLatin1Char('i'), QLatin1Char('m') };
|
||||
QGlyphLayoutArray<2> g;
|
||||
int l = 2;
|
||||
if (!engine->stringToCMap(ch, 2, &g, &l, 0))
|
||||
if (!engine->stringToCMap(ch, 2, &g, &l, {}))
|
||||
Q_UNREACHABLE();
|
||||
Q_ASSERT(l == 2);
|
||||
engine->fontDef.fixedPitch = g.advances[0] == g.advances[1];
|
||||
|
@ -70,7 +70,7 @@ public:
|
||||
const QPalette *palette(Palette type = SystemPalette) const override;
|
||||
const QFont *font(Font type = SystemFont) const override;
|
||||
QPixmap standardPixmap(StandardPixmap sp, const QSizeF &size) const override;
|
||||
QIcon fileIcon(const QFileInfo &fileInfo, QPlatformTheme::IconOptions options = 0) const override;
|
||||
QIcon fileIcon(const QFileInfo &fileInfo, QPlatformTheme::IconOptions options = {}) const override;
|
||||
|
||||
QVariant themeHint(ThemeHint hint) const override;
|
||||
QString standardButtonText(int button) const override;
|
||||
|
@ -149,8 +149,8 @@ QMacPinchGestureRecognizer::recognize(QGesture *gesture, QObject *obj, QEvent *e
|
||||
void QMacPinchGestureRecognizer::reset(QGesture *gesture)
|
||||
{
|
||||
QPinchGesture *g = static_cast<QPinchGesture *>(gesture);
|
||||
g->setChangeFlags(0);
|
||||
g->setTotalChangeFlags(0);
|
||||
g->setChangeFlags({});
|
||||
g->setTotalChangeFlags({});
|
||||
g->setScaleFactor(1.0f);
|
||||
g->setTotalScaleFactor(1.0f);
|
||||
g->setLastScaleFactor(1.0f);
|
||||
|
@ -138,7 +138,7 @@ QMacCocoaViewContainerPrivate::~QMacCocoaViewContainerPrivate()
|
||||
|
||||
*/
|
||||
QMacCocoaViewContainer::QMacCocoaViewContainer(NSView *view, QWidget *parent)
|
||||
: QWidget(*new QMacCocoaViewContainerPrivate, parent, 0)
|
||||
: QWidget(*new QMacCocoaViewContainerPrivate, parent, {})
|
||||
{
|
||||
// Ensures that we have a QWindow, even if we're not a top level widget
|
||||
setAttribute(Qt::WA_NativeWindow);
|
||||
|
Loading…
Reference in New Issue
Block a user