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>
This commit is contained in:
parent
8bc4ea1e97
commit
af2daafde7
@ -320,7 +320,7 @@ QGroupBox* MainWindow::createAlbumGroupBox()
|
||||
this, &MainWindow::showAlbumDetails);
|
||||
|
||||
QVBoxLayout *layout = new QVBoxLayout;
|
||||
layout->addWidget(albumView, 0, 0);
|
||||
layout->addWidget(albumView, 0, { });
|
||||
box->setLayout(layout);
|
||||
|
||||
return box;
|
||||
|
@ -492,7 +492,7 @@ void Dialog::questionMessage()
|
||||
void Dialog::warningMessage()
|
||||
{
|
||||
QMessageBox msgBox(QMessageBox::Warning, tr("QMessageBox::warning()"),
|
||||
MESSAGE, nullptr, this);
|
||||
MESSAGE, { }, this);
|
||||
msgBox.setDetailedText(MESSAGE_DETAILS);
|
||||
msgBox.addButton(tr("Save &Again"), QMessageBox::AcceptRole);
|
||||
msgBox.addButton(tr("&Continue"), QMessageBox::RejectRole);
|
||||
|
@ -59,7 +59,7 @@ class CustomProxy : public QGraphicsProxyWidget
|
||||
Q_OBJECT
|
||||
|
||||
public:
|
||||
explicit CustomProxy(QGraphicsItem *parent = nullptr, Qt::WindowFlags wFlags = nullptr);
|
||||
explicit CustomProxy(QGraphicsItem *parent = nullptr, Qt::WindowFlags wFlags = { });
|
||||
|
||||
QRectF boundingRect() const override;
|
||||
void paintWindowFrame(QPainter *painter, const QStyleOptionGraphicsItem *option,
|
||||
|
@ -123,7 +123,7 @@ QLayoutItem *FlowLayout::takeAt(int index)
|
||||
//! [6]
|
||||
Qt::Orientations FlowLayout::expandingDirections() const
|
||||
{
|
||||
return 0;
|
||||
return { };
|
||||
}
|
||||
//! [6]
|
||||
|
||||
|
@ -62,7 +62,7 @@ class ColorSwatch : public QDockWidget
|
||||
Q_OBJECT
|
||||
|
||||
public:
|
||||
explicit ColorSwatch(const QString &colorName, QMainWindow *parent = nullptr, Qt::WindowFlags flags = 0);
|
||||
explicit ColorSwatch(const QString &colorName, QMainWindow *parent = nullptr, Qt::WindowFlags flags = { });
|
||||
|
||||
void setCustomSizeHint(const QSize &size);
|
||||
QMenu *colorSwatchMenu() const { return menu; }
|
||||
|
@ -65,7 +65,7 @@ public:
|
||||
|
||||
explicit MainWindow(const CustomSizeHintMap &customSizeHints,
|
||||
QWidget *parent = nullptr,
|
||||
Qt::WindowFlags flags = 0);
|
||||
Qt::WindowFlags flags = { });
|
||||
|
||||
public slots:
|
||||
void actionTriggered(QAction *action);
|
||||
|
@ -50,6 +50,7 @@
|
||||
|
||||
//! [0]
|
||||
label->setAlignment(Qt::AlignLeft | Qt::AlignTop);
|
||||
label->setAlignment({ });
|
||||
//! [0]
|
||||
|
||||
|
||||
|
@ -93,8 +93,10 @@ class QFlags
|
||||
"long long will overflow.");
|
||||
Q_STATIC_ASSERT_X((std::is_enum<Enum>::value), "QFlags is only usable on enumeration types.");
|
||||
|
||||
#if QT_DEPRECATED_SINCE(5,15)
|
||||
struct Private;
|
||||
typedef int (Private::*Zero);
|
||||
#endif
|
||||
template <typename E> friend QDataStream &operator>>(QDataStream &, QFlags<E> &);
|
||||
template <typename E> friend QDataStream &operator<<(QDataStream &, QFlags<E>);
|
||||
public:
|
||||
@ -115,8 +117,11 @@ public:
|
||||
Q_DECL_CONSTEXPR inline QFlags(const QFlags &other);
|
||||
Q_DECL_CONSTEXPR inline QFlags &operator=(const QFlags &other);
|
||||
#endif
|
||||
Q_DECL_CONSTEXPR inline QFlags() noexcept : i(0) {}
|
||||
Q_DECL_CONSTEXPR inline QFlags(Enum flags) noexcept : i(Int(flags)) {}
|
||||
Q_DECL_CONSTEXPR inline QFlags(Zero = nullptr) noexcept : i(0) {}
|
||||
#if QT_DEPRECATED_SINCE(5,15)
|
||||
QT_DEPRECATED_X("Use default constructor instead") Q_DECL_CONSTEXPR inline QFlags(Zero) noexcept : i(0) {}
|
||||
#endif
|
||||
Q_DECL_CONSTEXPR inline QFlags(QFlag flag) noexcept : i(flag) {}
|
||||
|
||||
Q_DECL_CONSTEXPR inline QFlags(std::initializer_list<Enum> flags) noexcept
|
||||
|
@ -250,7 +250,7 @@ Q_STATIC_ASSERT((std::is_same<qsizetype, qptrdiff>::value));
|
||||
Qt::Alignment type is simply a typedef for
|
||||
QFlags<Qt::AlignmentFlag>. QLabel::setAlignment() takes a
|
||||
Qt::Alignment parameter, which means that any combination of
|
||||
Qt::AlignmentFlag values, or 0, is legal:
|
||||
Qt::AlignmentFlag values, or \c{{ }}, is legal:
|
||||
|
||||
\snippet code/src_corelib_global_qglobal.cpp 0
|
||||
|
||||
@ -317,11 +317,21 @@ Q_STATIC_ASSERT((std::is_same<qsizetype, qptrdiff>::value));
|
||||
Constructs a QFlags object storing the \a flags.
|
||||
*/
|
||||
|
||||
/*!
|
||||
\fn template <typename Enum> QFlags<Enum>::QFlags()
|
||||
\since 5.15
|
||||
|
||||
Constructs a QFlags object with no flags set.
|
||||
*/
|
||||
|
||||
/*!
|
||||
\fn template <typename Enum> QFlags<Enum>::QFlags(Zero)
|
||||
\deprecated
|
||||
|
||||
Constructs a QFlags object with no flags set. The parameter must be a
|
||||
literal 0 value.
|
||||
|
||||
Deprecated, use default constructor instead.
|
||||
*/
|
||||
|
||||
/*!
|
||||
|
@ -658,7 +658,7 @@ QStringList QAbstractFileEngine::entryList(QDir::Filters filters, const QStringL
|
||||
QAbstractFileEngine::FileFlags QAbstractFileEngine::fileFlags(FileFlags type) const
|
||||
{
|
||||
Q_UNUSED(type);
|
||||
return nullptr;
|
||||
return {};
|
||||
}
|
||||
|
||||
/*!
|
||||
|
@ -134,7 +134,7 @@ uint QFileInfoPrivate::getFileFlags(QAbstractFileEngine::FileFlags request) cons
|
||||
// extra syscall. Bundle detecton on Mac can be slow, expecially on network
|
||||
// paths, so we separate out that as well.
|
||||
|
||||
QAbstractFileEngine::FileFlags req = nullptr;
|
||||
QAbstractFileEngine::FileFlags req;
|
||||
uint cachedFlags = 0;
|
||||
|
||||
if (request & (QAbstractFileEngine::FlagsMask | QAbstractFileEngine::TypesMask)) {
|
||||
|
@ -76,8 +76,7 @@ class Q_AUTOTEST_EXPORT QFileSystemMetaData
|
||||
{
|
||||
public:
|
||||
QFileSystemMetaData()
|
||||
: knownFlagsMask(nullptr),
|
||||
size_(-1)
|
||||
: size_(-1)
|
||||
{
|
||||
}
|
||||
|
||||
@ -186,7 +185,7 @@ public:
|
||||
|
||||
void clear()
|
||||
{
|
||||
knownFlagsMask = nullptr;
|
||||
knownFlagsMask = {};
|
||||
}
|
||||
|
||||
void clearFlags(MetaDataFlags flags = AllMetaDataFlags)
|
||||
|
@ -591,14 +591,14 @@ QAbstractFileEngine::FileFlags QFSFileEngine::fileFlags(QAbstractFileEngine::Fil
|
||||
if (type & Refresh)
|
||||
d->metaData.clear();
|
||||
|
||||
QAbstractFileEngine::FileFlags ret = 0;
|
||||
QAbstractFileEngine::FileFlags ret;
|
||||
|
||||
if (type & FlagsMask)
|
||||
ret |= LocalDiskFlag;
|
||||
|
||||
bool exists;
|
||||
{
|
||||
QFileSystemMetaData::MetaDataFlags queryFlags = 0;
|
||||
QFileSystemMetaData::MetaDataFlags queryFlags;
|
||||
|
||||
queryFlags |= QFileSystemMetaData::MetaDataFlags(uint(type))
|
||||
& QFileSystemMetaData::Permissions;
|
||||
|
@ -1492,7 +1492,7 @@ bool QResourceFileEngine::isSequential() const
|
||||
QAbstractFileEngine::FileFlags QResourceFileEngine::fileFlags(QAbstractFileEngine::FileFlags type) const
|
||||
{
|
||||
Q_D(const QResourceFileEngine);
|
||||
QAbstractFileEngine::FileFlags ret = 0;
|
||||
QAbstractFileEngine::FileFlags ret;
|
||||
if(!d->resource.isValid())
|
||||
return ret;
|
||||
|
||||
|
@ -823,7 +823,7 @@ recodeFromUser(const QString &input, const ushort *actions, int from, int to)
|
||||
QString output;
|
||||
const QChar *begin = input.constData() + from;
|
||||
const QChar *end = input.constData() + to;
|
||||
if (qt_urlRecode(output, begin, end, nullptr, actions))
|
||||
if (qt_urlRecode(output, begin, end, {}, actions))
|
||||
return output;
|
||||
|
||||
return input.mid(from, to - from);
|
||||
|
@ -432,7 +432,7 @@ Qt::ItemFlags QPersistentModelIndex::flags() const
|
||||
{
|
||||
if (d)
|
||||
return d->index.flags();
|
||||
return 0;
|
||||
return { };
|
||||
}
|
||||
|
||||
/*!
|
||||
@ -2296,7 +2296,7 @@ Qt::ItemFlags QAbstractItemModel::flags(const QModelIndex &index) const
|
||||
{
|
||||
Q_D(const QAbstractItemModel);
|
||||
if (!d->indexValid(index))
|
||||
return 0;
|
||||
return { };
|
||||
|
||||
return Qt::ItemIsSelectable|Qt::ItemIsEnabled;
|
||||
}
|
||||
|
@ -96,7 +96,7 @@ public:
|
||||
void setLoadHints(QLibrary::LoadHints lh);
|
||||
|
||||
static QLibraryPrivate *findOrCreate(const QString &fileName, const QString &version = QString(),
|
||||
QLibrary::LoadHints loadHints = nullptr);
|
||||
QLibrary::LoadHints loadHints = { });
|
||||
static QStringList suffixes_sys(const QString &fullVersion);
|
||||
static QStringList prefixes_sys();
|
||||
|
||||
|
@ -912,7 +912,7 @@ QRegularExpression::QRegularExpression(QRegularExpressionPrivate &dd)
|
||||
*/
|
||||
QRegularExpressionPrivate::QRegularExpressionPrivate()
|
||||
: QSharedData(),
|
||||
patternOptions(0),
|
||||
patternOptions(),
|
||||
pattern(),
|
||||
mutex(),
|
||||
compiledPattern(nullptr),
|
||||
|
@ -71,7 +71,7 @@ static void init(QTextBoundaryFinder::BoundaryType type, const QChar *chars, int
|
||||
}
|
||||
}
|
||||
|
||||
QUnicodeTools::CharAttributeOptions options = 0;
|
||||
QUnicodeTools::CharAttributeOptions options;
|
||||
switch (type) {
|
||||
case QTextBoundaryFinder::Grapheme: options |= QUnicodeTools::GraphemeBreaks; break;
|
||||
case QTextBoundaryFinder::Word: options |= QUnicodeTools::WordBreaks; break;
|
||||
|
@ -3266,7 +3266,7 @@ inline QDateTime::Data::Data(Qt::TimeSpec spec)
|
||||
// the structure is too small, we need to detach
|
||||
d = new QDateTimePrivate;
|
||||
d->ref.ref();
|
||||
d->m_status = mergeSpec(nullptr, spec);
|
||||
d->m_status = mergeSpec({}, spec);
|
||||
}
|
||||
}
|
||||
|
||||
|
@ -407,7 +407,7 @@ bool QDateTimeParser::parseFormat(const QString &newFormat)
|
||||
QDTPDEBUGN("parseFormat: %s", newFormat.toLatin1().constData());
|
||||
|
||||
QVector<SectionNode> newSectionNodes;
|
||||
Sections newDisplay = 0;
|
||||
Sections newDisplay;
|
||||
QStringList newSeparators;
|
||||
int i, index = 0;
|
||||
int add = 0;
|
||||
@ -1799,7 +1799,7 @@ int QDateTimeParser::SectionNode::maxChange() const
|
||||
|
||||
QDateTimeParser::FieldInfo QDateTimeParser::fieldInfo(int index) const
|
||||
{
|
||||
FieldInfo ret = 0;
|
||||
FieldInfo ret;
|
||||
const SectionNode &sn = sectionNode(index);
|
||||
switch (sn.type) {
|
||||
case MSecSection:
|
||||
|
@ -84,7 +84,7 @@ public:
|
||||
DateTimeEdit
|
||||
};
|
||||
QDateTimeParser(QVariant::Type t, Context ctx, const QCalendar &cal = QCalendar())
|
||||
: currentSectionIndex(-1), display(nullptr), cachedDay(-1), parserType(t),
|
||||
: currentSectionIndex(-1), cachedDay(-1), parserType(t),
|
||||
fixday(false), spec(Qt::LocalTime), context(ctx), calendar(cal)
|
||||
{
|
||||
defaultLocale = QLocale::system();
|
||||
|
@ -1139,7 +1139,7 @@ QString QDBusConnection::name() const
|
||||
*/
|
||||
QDBusConnection::ConnectionCapabilities QDBusConnection::connectionCapabilities() const
|
||||
{
|
||||
return d ? d->capabilities : ConnectionCapabilities(0);
|
||||
return d ? d->capabilities : ConnectionCapabilities();
|
||||
}
|
||||
|
||||
/*!
|
||||
|
@ -1026,7 +1026,7 @@ void QDBusConnectionPrivate::deliverCall(QObject *object, int /*flags*/, const Q
|
||||
extern bool qDBusInitThreads();
|
||||
|
||||
QDBusConnectionPrivate::QDBusConnectionPrivate(QObject *p)
|
||||
: QObject(p), ref(1), capabilities(0), mode(InvalidMode), busService(0),
|
||||
: QObject(p), ref(1), mode(InvalidMode), busService(0),
|
||||
connection(0),
|
||||
rootNode(QString(QLatin1Char('/'))),
|
||||
anonymousAuthenticationAllowed(false),
|
||||
@ -1770,7 +1770,7 @@ void QDBusConnectionPrivate::setPeer(DBusConnection *c, const QDBusErrorInternal
|
||||
|
||||
static QDBusConnection::ConnectionCapabilities connectionCapabilies(DBusConnection *connection)
|
||||
{
|
||||
QDBusConnection::ConnectionCapabilities result = 0;
|
||||
QDBusConnection::ConnectionCapabilities result;
|
||||
typedef dbus_bool_t (*can_send_type_t)(DBusConnection *, int);
|
||||
static can_send_type_t can_send_type = 0;
|
||||
|
||||
|
@ -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);
|
||||
}
|
||||
}
|
||||
|
@ -103,7 +103,7 @@ QT_BEGIN_NAMESPACE
|
||||
QPlatformCursor::clearOverrideCursor().
|
||||
*/
|
||||
|
||||
QPlatformCursor::Capabilities QPlatformCursor::m_capabilities = 0;
|
||||
QPlatformCursor::Capabilities QPlatformCursor::m_capabilities = { };
|
||||
|
||||
/*!
|
||||
\fn QPlatformCursor::QPlatformCursor()
|
||||
|
@ -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
|
||||
|
@ -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()
|
||||
|
@ -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)
|
||||
|
@ -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;
|
||||
|
@ -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);
|
||||
|
@ -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)) {
|
||||
|
@ -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;
|
||||
|
@ -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
|
||||
|
@ -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;
|
||||
|
@ -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:
|
||||
|
@ -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;
|
||||
|
@ -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);
|
||||
|
||||
|
@ -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);
|
||||
|
@ -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();
|
||||
}
|
||||
|
@ -279,7 +279,7 @@ void QGlyphRun::clear()
|
||||
{
|
||||
detach();
|
||||
d->rawFont = QRawFont();
|
||||
d->flags = 0;
|
||||
d->flags = { };
|
||||
|
||||
setPositions(QVector<QPointF>());
|
||||
setGlyphIndexes(QVector<quint32>());
|
||||
|
@ -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)
|
||||
|
@ -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;
|
||||
}
|
||||
|
||||
|
@ -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;
|
||||
|
@ -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))
|
||||
|
@ -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;
|
||||
|
@ -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;
|
||||
|
@ -613,7 +613,7 @@ void QSpdyProtocolHandler::sendSYN_STREAM(const HttpMessagePair &messagePair,
|
||||
QHttpNetworkRequest request = messagePair.first;
|
||||
QHttpNetworkReply *reply = messagePair.second;
|
||||
|
||||
ControlFrameFlags flags = 0;
|
||||
ControlFrameFlags flags;
|
||||
|
||||
if (!request.uploadByteDevice()) {
|
||||
// no upload -> this is the last frame, send the FIN flag
|
||||
@ -675,14 +675,14 @@ void QSpdyProtocolHandler::sendRST_STREAM(qint32 streamID, RST_STREAM_STATUS_COD
|
||||
char wireData[8];
|
||||
appendIntToFourBytes(wireData, streamID);
|
||||
appendIntToFourBytes(wireData + 4, statusCode);
|
||||
sendControlFrame(FrameType_RST_STREAM, /* flags = */ 0, wireData, /* length = */ 8);
|
||||
sendControlFrame(FrameType_RST_STREAM, /* flags = */ { }, wireData, /* length = */ 8);
|
||||
}
|
||||
|
||||
void QSpdyProtocolHandler::sendPING(quint32 pingID)
|
||||
{
|
||||
char rawData[4];
|
||||
appendIntToFourBytes(rawData, pingID);
|
||||
sendControlFrame(FrameType_PING, /* flags = */ 0, rawData, /* length = */ 4);
|
||||
sendControlFrame(FrameType_PING, /* flags = */ { }, rawData, /* length = */ 4);
|
||||
}
|
||||
|
||||
bool QSpdyProtocolHandler::uploadData(qint32 streamID)
|
||||
@ -724,7 +724,7 @@ bool QSpdyProtocolHandler::uploadData(qint32 streamID)
|
||||
// nothing to read currently, break the loop
|
||||
break;
|
||||
} else {
|
||||
DataFrameFlags flags = 0;
|
||||
DataFrameFlags flags;
|
||||
// we will send the FIN flag later if appropriate
|
||||
qint64 currentWriteSize = sendDataFrame(streamID, flags, currentReadSize, readPointer);
|
||||
if (currentWriteSize == -1 || currentWriteSize != currentReadSize) {
|
||||
@ -774,7 +774,7 @@ void QSpdyProtocolHandler::sendWINDOW_UPDATE(qint32 streamID, quint32 deltaWindo
|
||||
appendIntToFourBytes(windowUpdateData, streamID);
|
||||
appendIntToFourBytes(windowUpdateData + 4, deltaWindowSize);
|
||||
|
||||
sendControlFrame(FrameType_WINDOW_UPDATE, /* flags = */ 0, windowUpdateData, /* length = */ 8);
|
||||
sendControlFrame(FrameType_WINDOW_UPDATE, /* flags = */ { }, windowUpdateData, /* length = */ 8);
|
||||
}
|
||||
|
||||
qint64 QSpdyProtocolHandler::sendDataFrame(qint32 streamID, DataFrameFlags flags,
|
||||
|
@ -82,7 +82,7 @@ public:
|
||||
class QNetworkInterfacePrivate: public QSharedData
|
||||
{
|
||||
public:
|
||||
QNetworkInterfacePrivate() : index(0), flags(nullptr)
|
||||
QNetworkInterfacePrivate() : index(0)
|
||||
{ }
|
||||
~QNetworkInterfacePrivate()
|
||||
{ }
|
||||
|
@ -80,7 +80,7 @@ QT_BEGIN_NAMESPACE
|
||||
|
||||
static QNetworkInterface::InterfaceFlags convertFlags(uint rawFlags)
|
||||
{
|
||||
QNetworkInterface::InterfaceFlags flags = nullptr;
|
||||
QNetworkInterface::InterfaceFlags flags;
|
||||
flags |= (rawFlags & IFF_UP) ? QNetworkInterface::IsUp : QNetworkInterface::InterfaceFlag(0);
|
||||
flags |= (rawFlags & IFF_RUNNING) ? QNetworkInterface::IsRunning : QNetworkInterface::InterfaceFlag(0);
|
||||
flags |= (rawFlags & IFF_BROADCAST) ? QNetworkInterface::CanBroadcast : QNetworkInterface::InterfaceFlag(0);
|
||||
|
@ -341,7 +341,7 @@ void QLocalSocketPrivate::_q_connectToSocket()
|
||||
}
|
||||
connectingSocket = -1;
|
||||
connectingName.clear();
|
||||
connectingOpenMode = 0;
|
||||
connectingOpenMode = { };
|
||||
}
|
||||
|
||||
bool QLocalSocket::setSocketDescriptor(qintptr socketDescriptor,
|
||||
@ -438,7 +438,7 @@ void QLocalSocket::close()
|
||||
::close(d->connectingSocket);
|
||||
d->connectingSocket = -1;
|
||||
d->connectingName.clear();
|
||||
d->connectingOpenMode = 0;
|
||||
d->connectingOpenMode = { };
|
||||
d->serverName.clear();
|
||||
d->fullServerName.clear();
|
||||
QIODevice::close();
|
||||
|
@ -279,7 +279,7 @@ QGLFunctions::OpenGLFeatures QGLFunctions::openGLFeatures() const
|
||||
{
|
||||
QGLFunctionsPrivateEx *d = static_cast<QGLFunctionsPrivateEx *>(d_ptr);
|
||||
if (!d)
|
||||
return 0;
|
||||
return { };
|
||||
if (d->m_features == -1)
|
||||
d->m_features = qt_gl_resolve_features();
|
||||
return QGLFunctions::OpenGLFeatures(d->m_features);
|
||||
|
@ -60,7 +60,7 @@ class QEGLPbuffer : public QPlatformOffscreenSurface
|
||||
{
|
||||
public:
|
||||
QEGLPbuffer(EGLDisplay display, const QSurfaceFormat &format, QOffscreenSurface *offscreenSurface,
|
||||
QEGLPlatformContext::Flags flags = nullptr);
|
||||
QEGLPlatformContext::Flags flags = { });
|
||||
~QEGLPbuffer();
|
||||
|
||||
QSurfaceFormat format() const override { return m_format; }
|
||||
|
@ -69,7 +69,7 @@ public:
|
||||
|
||||
QEGLPlatformContext(const QSurfaceFormat &format, QPlatformOpenGLContext *share, EGLDisplay display,
|
||||
EGLConfig *config = nullptr, const QVariant &nativeHandle = QVariant(),
|
||||
Flags flags = nullptr);
|
||||
Flags flags = { });
|
||||
~QEGLPlatformContext();
|
||||
|
||||
void initialize() override;
|
||||
|
@ -255,7 +255,7 @@ QFbWindow *QFbScreen::windowForId(WId wid) const
|
||||
|
||||
QFbScreen::Flags QFbScreen::flags() const
|
||||
{
|
||||
return 0;
|
||||
return { };
|
||||
}
|
||||
|
||||
QT_END_NAMESPACE
|
||||
|
@ -136,7 +136,7 @@ void QLibInputTouch::processTouchUp(libinput_event_touch *e)
|
||||
if (tp) {
|
||||
tp->state = Qt::TouchPointReleased;
|
||||
// There may not be a Frame event after the last Up. Work this around.
|
||||
Qt::TouchPointStates s = 0;
|
||||
Qt::TouchPointStates s;
|
||||
for (int i = 0; i < state->m_points.count(); ++i)
|
||||
s |= state->m_points.at(i).state;
|
||||
if (s == Qt::TouchPointReleased)
|
||||
|
@ -873,7 +873,7 @@ void QKmsDevice::discoverPlanes()
|
||||
plane.type = QKmsPlane::Type(value);
|
||||
} else if (!strcmp(prop->name, "rotation")) {
|
||||
plane.initialRotation = QKmsPlane::Rotations(int(value));
|
||||
plane.availableRotations = 0;
|
||||
plane.availableRotations = { };
|
||||
if (propTypeIs(prop, DRM_MODE_PROP_BITMASK)) {
|
||||
for (int i = 0; i < prop->count_enums; ++i)
|
||||
plane.availableRotations |= QKmsPlane::Rotation(1 << prop->enums[i].value);
|
||||
|
@ -109,7 +109,7 @@ public:
|
||||
QVariant themeHint(ThemeHint hint) const override;
|
||||
|
||||
QIcon fileIcon(const QFileInfo &fileInfo,
|
||||
QPlatformTheme::IconOptions iconOptions = nullptr) const override;
|
||||
QPlatformTheme::IconOptions iconOptions = { }) const override;
|
||||
|
||||
const QPalette *palette(Palette type = SystemPalette) const override;
|
||||
|
||||
@ -134,7 +134,7 @@ public:
|
||||
QGnomeTheme();
|
||||
QVariant themeHint(ThemeHint hint) const override;
|
||||
QIcon fileIcon(const QFileInfo &fileInfo,
|
||||
QPlatformTheme::IconOptions = nullptr) const override;
|
||||
QPlatformTheme::IconOptions = { }) const override;
|
||||
const QFont *font(Font type) const override;
|
||||
QString standardButtonText(int button) const override;
|
||||
|
||||
|
@ -62,7 +62,7 @@ QImageIOPlugin::Capabilities QGifPlugin::capabilities(QIODevice *device, const Q
|
||||
{
|
||||
if (format == "gif" || (device && device->isReadable() && QGifHandler::canRead(device)))
|
||||
return Capabilities(CanRead);
|
||||
return 0;
|
||||
return { };
|
||||
}
|
||||
|
||||
QImageIOHandler *QGifPlugin::create(QIODevice *device, const QByteArray &format) const
|
||||
|
@ -46,9 +46,9 @@ QImageIOPlugin::Capabilities QICOPlugin::capabilities(QIODevice *device, const Q
|
||||
if (format == "ico" || format == "cur")
|
||||
return Capabilities(CanRead | CanWrite);
|
||||
if (!format.isEmpty())
|
||||
return 0;
|
||||
return { };
|
||||
if (!device->isOpen())
|
||||
return 0;
|
||||
return { };
|
||||
|
||||
Capabilities cap;
|
||||
if (device->isReadable() && QtIcoHandler::canRead(device))
|
||||
|
@ -51,9 +51,9 @@ QImageIOPlugin::Capabilities QJpegPlugin::capabilities(QIODevice *device, const
|
||||
if (format == "jpeg" || format == "jpg")
|
||||
return Capabilities(CanRead | CanWrite);
|
||||
if (!format.isEmpty())
|
||||
return 0;
|
||||
return { };
|
||||
if (!device->isOpen())
|
||||
return 0;
|
||||
return { };
|
||||
|
||||
Capabilities cap;
|
||||
if (device->isReadable() && QJpegHandler::canRead(device))
|
||||
|
@ -61,7 +61,7 @@ public:
|
||||
explicit QIBusFilterEventWatcher(const QDBusPendingCall &call,
|
||||
QObject *parent = nullptr,
|
||||
QWindow *window = nullptr,
|
||||
const Qt::KeyboardModifiers modifiers = nullptr,
|
||||
const Qt::KeyboardModifiers modifiers = { },
|
||||
const QVariantList arguments = QVariantList())
|
||||
: QDBusPendingCallWatcher(call, parent)
|
||||
, m_window(window)
|
||||
|
@ -236,7 +236,7 @@ QPlatformOffscreenSurface *QEglFSIntegration::createPlatformOffscreenSurface(QOf
|
||||
EGLDisplay dpy = surface->screen() ? static_cast<QEglFSScreen *>(surface->screen()->handle())->display() : display();
|
||||
QSurfaceFormat fmt = qt_egl_device_integration()->surfaceFormatFor(surface->requestedFormat());
|
||||
if (qt_egl_device_integration()->supportsPBuffers()) {
|
||||
QEGLPlatformContext::Flags flags = 0;
|
||||
QEGLPlatformContext::Flags flags;
|
||||
if (!qt_egl_device_integration()->supportsSurfacelessContexts())
|
||||
flags |= QEGLPlatformContext::NoSurfaceless;
|
||||
return new QEGLPbuffer(dpy, fmt, surface, flags);
|
||||
|
@ -186,7 +186,7 @@ void QEglFSWindow::destroy()
|
||||
#endif
|
||||
}
|
||||
|
||||
m_flags = 0;
|
||||
m_flags = { };
|
||||
}
|
||||
|
||||
void QEglFSWindow::invalidateSurface()
|
||||
|
@ -373,7 +373,7 @@ bool QIOSFileEngineAssetsLibrary::close()
|
||||
|
||||
QAbstractFileEngine::FileFlags QIOSFileEngineAssetsLibrary::fileFlags(QAbstractFileEngine::FileFlags type) const
|
||||
{
|
||||
QAbstractFileEngine::FileFlags flags = 0;
|
||||
QAbstractFileEngine::FileFlags flags;
|
||||
const bool isDir = (m_assetUrl == QLatin1String("assets-library://"));
|
||||
const bool exists = isDir || m_assetUrl == g_iteratorCurrentUrl.localData() || loadAsset();
|
||||
|
||||
|
@ -455,7 +455,7 @@ void QXcbConnection::printXcbError(const char *message, xcb_generic_error_t *err
|
||||
|
||||
static Qt::MouseButtons translateMouseButtons(int s)
|
||||
{
|
||||
Qt::MouseButtons ret = 0;
|
||||
Qt::MouseButtons ret;
|
||||
if (s & XCB_BUTTON_MASK_1)
|
||||
ret |= Qt::LeftButton;
|
||||
if (s & XCB_BUTTON_MASK_2)
|
||||
|
@ -294,7 +294,7 @@ private:
|
||||
int deviceId = 0;
|
||||
QTabletEvent::PointerType pointerType = QTabletEvent::UnknownPointer;
|
||||
QTabletEvent::TabletDevice tool = QTabletEvent::Stylus;
|
||||
Qt::MouseButtons buttons = 0;
|
||||
Qt::MouseButtons buttons;
|
||||
qint64 serialId = 0;
|
||||
bool inProximity = false;
|
||||
struct ValuatorClassInfo {
|
||||
@ -318,8 +318,8 @@ private:
|
||||
int horizontalIndex = 0;
|
||||
double verticalIncrement = 0;
|
||||
double horizontalIncrement = 0;
|
||||
Qt::Orientations orientations = 0;
|
||||
Qt::Orientations legacyOrientations = 0;
|
||||
Qt::Orientations orientations;
|
||||
Qt::Orientations legacyOrientations;
|
||||
QPointF lastScrollPosition;
|
||||
};
|
||||
QHash<int, ScrollingDevice> m_scrollingDevices;
|
||||
@ -360,7 +360,7 @@ private:
|
||||
|
||||
WindowMapper m_mapper;
|
||||
|
||||
Qt::MouseButtons m_buttonState = nullptr;
|
||||
Qt::MouseButtons m_buttonState;
|
||||
Qt::MouseButton m_button = Qt::NoButton;
|
||||
|
||||
QXcbWindow *m_focusWindow = nullptr;
|
||||
|
@ -424,7 +424,7 @@ QXcbConnection::TouchDeviceData *QXcbConnection::touchDeviceForId(int id)
|
||||
QXcbConnection::TouchDeviceData *QXcbConnection::populateTouchDevices(void *info)
|
||||
{
|
||||
auto *deviceinfo = reinterpret_cast<xcb_input_xi_device_info_t *>(info);
|
||||
QTouchDevice::Capabilities caps = 0;
|
||||
QTouchDevice::Capabilities caps;
|
||||
int type = -1;
|
||||
int maxTouchPoints = 1;
|
||||
bool isTouchDevice = false;
|
||||
|
@ -883,7 +883,7 @@ void QXcbDrag::handleLeave(QPlatformWindow *w, const xcb_client_message_event_t
|
||||
event->data.data32[0], xdnd_dragsource);
|
||||
}
|
||||
|
||||
QWindowSystemInterface::handleDrag(w->window(), nullptr, QPoint(), Qt::IgnoreAction, 0, 0);
|
||||
QWindowSystemInterface::handleDrag(w->window(), nullptr, QPoint(), Qt::IgnoreAction, { }, { });
|
||||
}
|
||||
|
||||
void QXcbDrag::send_leave()
|
||||
|
@ -86,7 +86,7 @@ public:
|
||||
void handlePosition(QPlatformWindow *w, const xcb_client_message_event_t *event);
|
||||
void handleLeave(QPlatformWindow *w, const xcb_client_message_event_t *event);
|
||||
void handleDrop(QPlatformWindow *, const xcb_client_message_event_t *event,
|
||||
Qt::MouseButtons b = nullptr, Qt::KeyboardModifiers mods = nullptr);
|
||||
Qt::MouseButtons b = { }, Qt::KeyboardModifiers mods = { });
|
||||
|
||||
void handleStatus(const xcb_client_message_event_t *event);
|
||||
void handleSelectionRequest(const xcb_selection_request_event_t *event);
|
||||
@ -109,7 +109,7 @@ private:
|
||||
void init();
|
||||
|
||||
void handle_xdnd_position(QPlatformWindow *w, const xcb_client_message_event_t *event,
|
||||
Qt::MouseButtons b = nullptr, Qt::KeyboardModifiers mods = nullptr);
|
||||
Qt::MouseButtons b = { }, Qt::KeyboardModifiers mods = { });
|
||||
void handle_xdnd_status(const xcb_client_message_event_t *event);
|
||||
void send_leave();
|
||||
|
||||
|
@ -927,7 +927,7 @@ void QXcbWindow::setWindowFlags(Qt::WindowFlags flags)
|
||||
|
||||
xcb_change_window_attributes(xcb_connection(), xcb_window(), mask, values);
|
||||
|
||||
QXcbWindowFunctions::WmWindowTypes wmWindowTypes = 0;
|
||||
QXcbWindowFunctions::WmWindowTypes wmWindowTypes;
|
||||
if (window()->dynamicPropertyNames().contains(wm_window_type_property_id)) {
|
||||
wmWindowTypes = static_cast<QXcbWindowFunctions::WmWindowTypes>(
|
||||
window()->property(wm_window_type_property_id).value<int>());
|
||||
|
@ -72,7 +72,7 @@ public:
|
||||
|
||||
QPixmap standardPixmap(StandardPixmap sp, const QSizeF &size) const override;
|
||||
QIcon fileIcon(const QFileInfo &fileInfo,
|
||||
QPlatformTheme::IconOptions iconOptions = nullptr) const override;
|
||||
QPlatformTheme::IconOptions iconOptions = { }) const override;
|
||||
|
||||
QIconEngine *createIconEngine(const QString &iconName) const override;
|
||||
|
||||
|
@ -81,7 +81,7 @@ public:
|
||||
void drawTiledPixmap(const QRectF &r, const QPixmap &pixmap, const QPointF &s) override;
|
||||
|
||||
protected:
|
||||
QAlphaPaintEngine(QAlphaPaintEnginePrivate &data, PaintEngineFeatures devcaps = 0);
|
||||
QAlphaPaintEngine(QAlphaPaintEnginePrivate &data, PaintEngineFeatures devcaps = { });
|
||||
QRegion alphaClipping() const;
|
||||
bool continueCall() const;
|
||||
void flushAndInit(bool init = true);
|
||||
|
@ -1305,7 +1305,7 @@ Qt::ItemFlags QSqlTableModel::flags(const QModelIndex &index) const
|
||||
Q_D(const QSqlTableModel);
|
||||
if (index.internalPointer() || index.column() < 0 || index.column() >= d->rec.count()
|
||||
|| index.row() < 0)
|
||||
return 0;
|
||||
return { };
|
||||
|
||||
bool editable = true;
|
||||
|
||||
|
@ -370,7 +370,7 @@ QFileDialog::QFileDialog(QWidget *parent,
|
||||
const QString &caption,
|
||||
const QString &directory,
|
||||
const QString &filter)
|
||||
: QDialog(*new QFileDialogPrivate, parent, 0)
|
||||
: QDialog(*new QFileDialogPrivate, parent, { })
|
||||
{
|
||||
Q_D(QFileDialog);
|
||||
d->init(QUrl::fromLocalFile(directory), filter, caption);
|
||||
@ -380,7 +380,7 @@ QFileDialog::QFileDialog(QWidget *parent,
|
||||
\internal
|
||||
*/
|
||||
QFileDialog::QFileDialog(const QFileDialogArgs &args)
|
||||
: QDialog(*new QFileDialogPrivate, args.parent, 0)
|
||||
: QDialog(*new QFileDialogPrivate, args.parent, { })
|
||||
{
|
||||
Q_D(QFileDialog);
|
||||
d->init(args.directory, args.filter, args.caption);
|
||||
|
@ -116,7 +116,7 @@ public:
|
||||
inline qint64 size() const { if (info && !info->isDir()) return info->size(); return 0; }
|
||||
inline QString type() const { if (info) return info->displayType; return QLatin1String(""); }
|
||||
inline QDateTime lastModified() const { if (info) return info->lastModified(); return QDateTime(); }
|
||||
inline QFile::Permissions permissions() const { if (info) return info->permissions(); return nullptr; }
|
||||
inline QFile::Permissions permissions() const { if (info) return info->permissions(); return { }; }
|
||||
inline bool isReadable() const { return ((permissions() & QFile::ReadUser) != 0); }
|
||||
inline bool isWritable() const { return ((permissions() & QFile::WriteUser) != 0); }
|
||||
inline bool isExecutable() const { return ((permissions() & QFile::ExeUser) != 0); }
|
||||
|
@ -391,7 +391,7 @@ QFont QFontDialog::getFont(bool *ok, const QFont &initial, QWidget *parent, cons
|
||||
QFont QFontDialog::getFont(bool *ok, QWidget *parent)
|
||||
{
|
||||
QFont initial;
|
||||
return QFontDialogPrivate::getFont(ok, initial, parent, QString(), 0);
|
||||
return QFontDialogPrivate::getFont(ok, initial, parent, QString(), { });
|
||||
}
|
||||
|
||||
QFont QFontDialogPrivate::getFont(bool *ok, const QFont &initial, QWidget *parent,
|
||||
|
@ -492,7 +492,7 @@ void QProgressDialogPrivate::adoptChildWidget(QWidget *c)
|
||||
if (c->parentWidget() == q)
|
||||
c->hide(); // until after ensureSizeIsAtLeastSizeHint()
|
||||
else
|
||||
c->setParent(q, 0);
|
||||
c->setParent(q, { });
|
||||
}
|
||||
ensureSizeIsAtLeastSizeHint();
|
||||
if (c)
|
||||
|
@ -3444,7 +3444,7 @@ int QWizard::nextId() const
|
||||
\sa wizard()
|
||||
*/
|
||||
QWizardPage::QWizardPage(QWidget *parent)
|
||||
: QWidget(*new QWizardPagePrivate, parent, 0)
|
||||
: QWidget(*new QWizardPagePrivate, parent, { })
|
||||
{
|
||||
connect(this, SIGNAL(completeChanged()), this, SLOT(_q_updateCachedCompleteState()));
|
||||
}
|
||||
|
@ -96,7 +96,7 @@ Qt::Alignment QGraphicsGridLayoutEngine::alignment(QGraphicsLayoutItem *graphics
|
||||
{
|
||||
if (QGraphicsGridLayoutEngineItem *gridEngineItem = findLayoutItem(graphicsLayoutItem))
|
||||
return gridEngineItem->alignment();
|
||||
return 0;
|
||||
return { };
|
||||
}
|
||||
|
||||
|
||||
|
@ -68,7 +68,7 @@ class QGraphicsLayoutPrivate;
|
||||
class QGraphicsGridLayoutEngineItem : public QGridLayoutItem {
|
||||
public:
|
||||
QGraphicsGridLayoutEngineItem(QGraphicsLayoutItem *item, int row, int columns, int rowSpan = 1, int columnSpan = 1,
|
||||
Qt::Alignment alignment = nullptr)
|
||||
Qt::Alignment alignment = { })
|
||||
: QGridLayoutItem(row, columns, rowSpan, columnSpan, alignment), q_layoutItem(item) {}
|
||||
|
||||
virtual QLayoutPolicy::Policy sizePolicy(Qt::Orientation orientation) const override
|
||||
|
@ -280,7 +280,7 @@ void QGraphicsLinearLayout::insertItem(int index, QGraphicsLayoutItem *item)
|
||||
Q_ASSERT(item);
|
||||
d->fixIndex(&index);
|
||||
d->engine.insertRow(index, d->orientation);
|
||||
QGraphicsGridLayoutEngineItem *gridEngineItem = new QGraphicsGridLayoutEngineItem(item, d->gridRow(index), d->gridColumn(index), 1, 1, 0);
|
||||
QGraphicsGridLayoutEngineItem *gridEngineItem = new QGraphicsGridLayoutEngineItem(item, d->gridRow(index), d->gridColumn(index), 1, 1, { });
|
||||
d->engine.insertItem(gridEngineItem, index);
|
||||
invalidate();
|
||||
}
|
||||
|
@ -235,7 +235,7 @@ void QGraphicsProxyWidgetPrivate::sendWidgetMouseEvent(QGraphicsSceneHoverEvent
|
||||
mouseEvent.setPos(event->pos());
|
||||
mouseEvent.setScreenPos(event->screenPos());
|
||||
mouseEvent.setButton(Qt::NoButton);
|
||||
mouseEvent.setButtons(0);
|
||||
mouseEvent.setButtons({ });
|
||||
mouseEvent.setModifiers(event->modifiers());
|
||||
sendWidgetMouseEvent(&mouseEvent);
|
||||
event->setAccepted(mouseEvent.isAccepted());
|
||||
|
@ -348,7 +348,7 @@ QGraphicsViewPrivate::QGraphicsViewPrivate()
|
||||
hasUpdateClip(false),
|
||||
mousePressButton(Qt::NoButton),
|
||||
leftIndent(0), topIndent(0),
|
||||
lastMouseEvent(QEvent::None, QPointF(), QPointF(), QPointF(), Qt::NoButton, 0, 0),
|
||||
lastMouseEvent(QEvent::None, QPointF(), QPointF(), QPointF(), Qt::NoButton, { }, { }),
|
||||
alignment(Qt::AlignCenter),
|
||||
transformationAnchor(QGraphicsView::AnchorViewCenter), resizeAnchor(QGraphicsView::NoAnchor),
|
||||
viewportUpdateMode(QGraphicsView::MinimalViewportUpdate),
|
||||
@ -1170,7 +1170,7 @@ void QGraphicsViewPrivate::updateInputMethodSensitivity()
|
||||
q->viewport()->setAttribute(Qt::WA_InputMethodEnabled, enabled);
|
||||
|
||||
if (!enabled) {
|
||||
q->setInputMethodHints(0);
|
||||
q->setInputMethodHints({ });
|
||||
return;
|
||||
}
|
||||
|
||||
@ -1183,7 +1183,7 @@ void QGraphicsViewPrivate::updateInputMethodSensitivity()
|
||||
widget = fw;
|
||||
q->setInputMethodHints(widget->inputMethodHints());
|
||||
} else {
|
||||
q->setInputMethodHints(0);
|
||||
q->setInputMethodHints({ });
|
||||
}
|
||||
}
|
||||
|
||||
|
@ -65,7 +65,7 @@ QT_BEGIN_NAMESPACE
|
||||
Use setModel() to set the model.
|
||||
*/
|
||||
QColumnViewGrip::QColumnViewGrip(QWidget *parent)
|
||||
: QWidget(*new QColumnViewGripPrivate, parent, 0)
|
||||
: QWidget(*new QColumnViewGripPrivate, parent, { })
|
||||
{
|
||||
#ifndef QT_NO_CURSOR
|
||||
setCursor(Qt::SplitHCursor);
|
||||
|
@ -73,7 +73,7 @@ public:
|
||||
int moveGrip(int offset);
|
||||
|
||||
protected:
|
||||
QColumnViewGrip(QColumnViewGripPrivate &, QWidget *parent = nullptr, Qt::WindowFlags f = nullptr);
|
||||
QColumnViewGrip(QColumnViewGripPrivate &, QWidget *parent = nullptr, Qt::WindowFlags f = { });
|
||||
void paintEvent(QPaintEvent *event) override;
|
||||
void mouseDoubleClickEvent(QMouseEvent *event) override;
|
||||
void mouseMoveEvent(QMouseEvent *event) override;
|
||||
|
@ -1696,7 +1696,7 @@ Qt::Orientations QFormLayout::expandingDirections() const
|
||||
QFormLayoutPrivate *e = const_cast<QFormLayoutPrivate *>(d);
|
||||
e->updateSizes();
|
||||
|
||||
Qt::Orientations o = 0;
|
||||
Qt::Orientations o;
|
||||
if (e->expandHorizontal)
|
||||
o = Qt::Horizontal;
|
||||
if (e->expandVertical)
|
||||
@ -2326,7 +2326,7 @@ void QFormLayout::resetRowWrapPolicy()
|
||||
void QFormLayout::resetFormAlignment()
|
||||
{
|
||||
Q_D(QFormLayout);
|
||||
d->formAlignment = 0;
|
||||
d->formAlignment = { };
|
||||
}
|
||||
|
||||
/*!
|
||||
@ -2336,7 +2336,7 @@ void QFormLayout::resetFormAlignment()
|
||||
void QFormLayout::resetLabelAlignment()
|
||||
{
|
||||
Q_D(QFormLayout);
|
||||
d->labelAlignment = 0;
|
||||
d->labelAlignment = { };
|
||||
}
|
||||
|
||||
#if 0
|
||||
|
@ -111,8 +111,7 @@ class QPinchGesturePrivate : public QGesturePrivate
|
||||
|
||||
public:
|
||||
QPinchGesturePrivate()
|
||||
: totalChangeFlags(nullptr), changeFlags(nullptr),
|
||||
totalScaleFactor(1), lastScaleFactor(1), scaleFactor(1),
|
||||
: totalScaleFactor(1), lastScaleFactor(1), scaleFactor(1),
|
||||
totalRotationAngle(0), lastRotationAngle(0), rotationAngle(0),
|
||||
isNewSequence(true)
|
||||
{
|
||||
|
@ -1337,7 +1337,7 @@ QRect QLayout::alignmentRect(const QRect &r) const
|
||||
returned by QLayoutItems that have an alignment.
|
||||
*/
|
||||
QLayout *that = const_cast<QLayout *>(this);
|
||||
that->setAlignment(0);
|
||||
that->setAlignment({ });
|
||||
QSize ms = that->maximumSize();
|
||||
that->setAlignment(a);
|
||||
|
||||
|
@ -105,9 +105,9 @@ Q_WIDGETS_EXPORT QSize qSmartMinSize(const QWidgetItem *i);
|
||||
Q_WIDGETS_EXPORT QSize qSmartMinSize(const QWidget *w);
|
||||
Q_WIDGETS_EXPORT QSize qSmartMaxSize(const QSize &sizeHint,
|
||||
const QSize &minSize, const QSize &maxSize,
|
||||
const QSizePolicy &sizePolicy, Qt::Alignment align = nullptr);
|
||||
Q_WIDGETS_EXPORT QSize qSmartMaxSize(const QWidgetItem *i, Qt::Alignment align = nullptr);
|
||||
Q_WIDGETS_EXPORT QSize qSmartMaxSize(const QWidget *w, Qt::Alignment align = nullptr);
|
||||
const QSizePolicy &sizePolicy, Qt::Alignment align = { });
|
||||
Q_WIDGETS_EXPORT QSize qSmartMaxSize(const QWidgetItem *i, Qt::Alignment align = { });
|
||||
Q_WIDGETS_EXPORT QSize qSmartMaxSize(const QWidget *w, Qt::Alignment align = { });
|
||||
|
||||
Q_WIDGETS_EXPORT int qSmartSpacing(const QLayout *layout, QStyle::PixelMetric pm);
|
||||
|
||||
|
@ -183,7 +183,7 @@ QGestureRecognizer::Result QPinchGestureRecognizer::recognize(QGesture *state,
|
||||
}
|
||||
case QEvent::TouchUpdate: {
|
||||
const QTouchEvent *ev = static_cast<const QTouchEvent *>(event);
|
||||
d->changeFlags = 0;
|
||||
d->changeFlags = { };
|
||||
if (ev->touchPoints().size() == 2) {
|
||||
QTouchEvent::TouchPoint p1 = ev->touchPoints().at(0);
|
||||
QTouchEvent::TouchPoint p2 = ev->touchPoints().at(1);
|
||||
@ -256,7 +256,7 @@ void QPinchGestureRecognizer::reset(QGesture *state)
|
||||
QPinchGesture *pinch = static_cast<QPinchGesture *>(state);
|
||||
QPinchGesturePrivate *d = pinch->d_func();
|
||||
|
||||
d->totalChangeFlags = d->changeFlags = 0;
|
||||
d->totalChangeFlags = d->changeFlags = { };
|
||||
|
||||
d->startCenterPoint = d->lastCenterPoint = d->centerPoint = QPointF();
|
||||
d->totalScaleFactor = d->lastScaleFactor = d->scaleFactor = 1;
|
||||
|
@ -396,7 +396,7 @@ void QWidget::setAutoFillBackground(bool enabled)
|
||||
If it is \nullptr (the default), the new widget will be a window.
|
||||
If not, it will be a child of \e parent, and be constrained by
|
||||
\e parent's geometry (unless you specify Qt::Window as window flag).
|
||||
\li \c{Qt::WindowFlags f = 0} (where available) sets the window flags;
|
||||
\li \c{Qt::WindowFlags f = { }} (where available) sets the window flags;
|
||||
the default is suitable for almost all widgets, but to get, for
|
||||
example, a window without a window system frame, you must use
|
||||
special flags.
|
||||
@ -1595,7 +1595,7 @@ void QWidgetPrivate::createTLExtra()
|
||||
x->basew = x->baseh = 0;
|
||||
x->frameStrut.setCoords(0, 0, 0, 0);
|
||||
x->normalGeometry = QRect(0,0,-1,-1);
|
||||
x->savedFlags = 0;
|
||||
x->savedFlags = { };
|
||||
x->opacity = 255;
|
||||
x->posIncludesFrame = 0;
|
||||
x->sizeAdjusted = false;
|
||||
|
@ -592,7 +592,7 @@ public:
|
||||
Q_Q(QWidget);
|
||||
return q->testAttribute(Qt::WA_AlwaysStackOnTop)
|
||||
? QPlatformTextureList::StacksOnTop
|
||||
: QPlatformTextureList::Flags(nullptr);
|
||||
: QPlatformTextureList::Flags();
|
||||
}
|
||||
virtual QImage grabFramebuffer() { return QImage(); }
|
||||
virtual void beginBackingStorePainting() { }
|
||||
|
@ -64,7 +64,7 @@ class Q_WIDGETS_EXPORT QWindowContainer : public QWidget
|
||||
Q_DECLARE_PRIVATE(QWindowContainer)
|
||||
|
||||
public:
|
||||
explicit QWindowContainer(QWindow *embeddedWindow, QWidget *parent = nullptr, Qt::WindowFlags f = nullptr);
|
||||
explicit QWindowContainer(QWindow *embeddedWindow, QWidget *parent = nullptr, Qt::WindowFlags f = { });
|
||||
~QWindowContainer();
|
||||
QWindow *containedWindow() const;
|
||||
|
||||
|
@ -479,7 +479,7 @@ struct QStyleSheetGeometryData : public QSharedData
|
||||
|
||||
struct QStyleSheetPositionData : public QSharedData
|
||||
{
|
||||
QStyleSheetPositionData(int l, int t, int r, int b, Origin o, Qt::Alignment p, QCss::PositionMode m, Qt::Alignment a = 0)
|
||||
QStyleSheetPositionData(int l, int t, int r, int b, Origin o, Qt::Alignment p, QCss::PositionMode m, Qt::Alignment a = { })
|
||||
: left(l), top(t), bottom(b), right(r), origin(o), position(p), mode(m), textAlignment(a) { }
|
||||
|
||||
int left, top, bottom, right;
|
||||
@ -922,9 +922,9 @@ QRenderRule::QRenderRule(const QVector<Declaration> &declarations, const QObject
|
||||
|
||||
int left = 0, top = 0, right = 0, bottom = 0;
|
||||
Origin origin = Origin_Unknown;
|
||||
Qt::Alignment position = 0;
|
||||
Qt::Alignment position;
|
||||
QCss::PositionMode mode = PositionMode_Unknown;
|
||||
Qt::Alignment textAlignment = 0;
|
||||
Qt::Alignment textAlignment;
|
||||
if (v.extractPosition(&left, &top, &right, &bottom, &origin, &position, &mode, &textAlignment))
|
||||
p = new QStyleSheetPositionData(left, top, right, bottom, origin, position, mode, textAlignment);
|
||||
|
||||
@ -2231,7 +2231,7 @@ static Qt::Alignment defaultPosition(int pe)
|
||||
return Qt::AlignRight | Qt::AlignVCenter;
|
||||
|
||||
default:
|
||||
return 0;
|
||||
return { };
|
||||
}
|
||||
}
|
||||
|
||||
@ -3341,7 +3341,7 @@ void QStyleSheetStyle::drawComplexControl(ComplexControl cc, const QStyleOptionC
|
||||
layout = subControlLayout(QLatin1String("mNX"));
|
||||
|
||||
QStyleOptionComplex optCopy(*opt);
|
||||
optCopy.subControls = 0;
|
||||
optCopy.subControls = { };
|
||||
for (int i = 0; i < layout.count(); i++) {
|
||||
int layoutButton = layout[i].toInt();
|
||||
if (layoutButton < PseudoElement_MdiCloseButton
|
||||
@ -4242,7 +4242,7 @@ void QStyleSheetStyle::drawControl(ControlElement ce, const QStyleOption *opt, Q
|
||||
}
|
||||
r = subRule.contentsRect(r);
|
||||
|
||||
Qt::Alignment alignment = 0;
|
||||
Qt::Alignment alignment;
|
||||
if (subRule.hasPosition())
|
||||
alignment = subRule.position()->textAlignment;
|
||||
if (alignment == 0)
|
||||
|
@ -468,7 +468,7 @@ void QAbstractButtonPrivate::emitToggled(bool checked)
|
||||
Constructs an abstract button with a \a parent.
|
||||
*/
|
||||
QAbstractButton::QAbstractButton(QWidget *parent)
|
||||
: QWidget(*new QAbstractButtonPrivate, parent, 0)
|
||||
: QWidget(*new QAbstractButtonPrivate, parent, { })
|
||||
{
|
||||
Q_D(QAbstractButton);
|
||||
d->init();
|
||||
@ -490,7 +490,7 @@ QAbstractButton::QAbstractButton(QWidget *parent)
|
||||
/*! \internal
|
||||
*/
|
||||
QAbstractButton::QAbstractButton(QAbstractButtonPrivate &dd, QWidget *parent)
|
||||
: QWidget(dd, parent, 0)
|
||||
: QWidget(dd, parent, { })
|
||||
{
|
||||
Q_D(QAbstractButton);
|
||||
d->init();
|
||||
|
@ -273,13 +273,13 @@ void QAbstractSliderPrivate::setSteps(int single, int page)
|
||||
\l value of 0.
|
||||
*/
|
||||
QAbstractSlider::QAbstractSlider(QWidget *parent)
|
||||
:QWidget(*new QAbstractSliderPrivate, parent, 0)
|
||||
:QWidget(*new QAbstractSliderPrivate, parent, { })
|
||||
{
|
||||
}
|
||||
|
||||
/*! \internal */
|
||||
QAbstractSlider::QAbstractSlider(QAbstractSliderPrivate &dd, QWidget *parent)
|
||||
:QWidget(dd, parent, 0)
|
||||
:QWidget(dd, parent, { })
|
||||
{
|
||||
}
|
||||
|
||||
|
@ -147,7 +147,7 @@ QT_BEGIN_NAMESPACE
|
||||
*/
|
||||
|
||||
QAbstractSpinBox::QAbstractSpinBox(QWidget *parent)
|
||||
: QWidget(*new QAbstractSpinBoxPrivate, parent, 0)
|
||||
: QWidget(*new QAbstractSpinBoxPrivate, parent, { })
|
||||
{
|
||||
Q_D(QAbstractSpinBox);
|
||||
d->init();
|
||||
@ -157,7 +157,7 @@ QAbstractSpinBox::QAbstractSpinBox(QWidget *parent)
|
||||
\internal
|
||||
*/
|
||||
QAbstractSpinBox::QAbstractSpinBox(QAbstractSpinBoxPrivate &dd, QWidget *parent)
|
||||
: QWidget(dd, parent, 0)
|
||||
: QWidget(dd, parent, { })
|
||||
{
|
||||
Q_D(QAbstractSpinBox);
|
||||
d->init();
|
||||
|
@ -1207,9 +1207,9 @@ Qt::ItemFlags QCalendarModel::flags(const QModelIndex &index) const
|
||||
if (!date.isValid())
|
||||
return QAbstractTableModel::flags(index);
|
||||
if (date < m_minimumDate)
|
||||
return 0;
|
||||
return { };
|
||||
if (date > m_maximumDate)
|
||||
return 0;
|
||||
return { };
|
||||
return QAbstractTableModel::flags(index);
|
||||
}
|
||||
|
||||
@ -2135,7 +2135,7 @@ void QCalendarWidgetPrivate::_q_editingFinished()
|
||||
\sa setCurrentPage()
|
||||
*/
|
||||
QCalendarWidget::QCalendarWidget(QWidget *parent)
|
||||
: QWidget(*new QCalendarWidgetPrivate, parent, 0)
|
||||
: QWidget(*new QCalendarWidgetPrivate, parent, { })
|
||||
{
|
||||
Q_D(QCalendarWidget);
|
||||
|
||||
|
@ -931,7 +931,7 @@ QStyleOptionComboBox QComboBoxPrivateContainer::comboStyleOption() const
|
||||
model QStandardItemModel.
|
||||
*/
|
||||
QComboBox::QComboBox(QWidget *parent)
|
||||
: QWidget(*new QComboBoxPrivate(), parent, 0)
|
||||
: QWidget(*new QComboBoxPrivate(), parent, { })
|
||||
{
|
||||
Q_D(QComboBox);
|
||||
d->init();
|
||||
@ -941,7 +941,7 @@ QComboBox::QComboBox(QWidget *parent)
|
||||
\internal
|
||||
*/
|
||||
QComboBox::QComboBox(QComboBoxPrivate &dd, QWidget *parent)
|
||||
: QWidget(dd, parent, 0)
|
||||
: QWidget(dd, parent, { })
|
||||
{
|
||||
Q_D(QComboBox);
|
||||
d->init();
|
||||
|
Some files were not shown because too many files have changed in this diff Show More
Loading…
x
Reference in New Issue
Block a user